org.tango.server.attribute
Class ReflectAttributeBehavior

java.lang.Object
  extended by org.tango.server.attribute.ReflectAttributeBehavior
All Implemented Interfaces:
IAttributeBehavior

public final class ReflectAttributeBehavior
extends java.lang.Object
implements IAttributeBehavior

Behavior a Tango attribute using java reflection

Author:
ABEILLE

Constructor Summary
ReflectAttributeBehavior(AttributeConfiguration config, java.lang.Object businessObject, java.lang.reflect.Method getter, java.lang.reflect.Method setter)
          Ctr
 
Method Summary
 AttributeConfiguration getConfiguration()
           
 StateMachineBehavior getStateMachine()
           
 AttributeValue getValue()
          Read attribute
 void setValue(AttributeValue value)
          Write attribute
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReflectAttributeBehavior

public ReflectAttributeBehavior(AttributeConfiguration config,
                                java.lang.Object businessObject,
                                java.lang.reflect.Method getter,
                                java.lang.reflect.Method setter)
Ctr

Parameters:
config - The attribute configuration
businessObject - The object that contains the attribute
getter - The method to read the attribute
setter - The method to write the attribute
Method Detail

getValue

public AttributeValue getValue()
                        throws fr.esrf.Tango.DevFailed
Description copied from interface: IAttributeBehavior
Read attribute

Specified by:
getValue in interface IAttributeBehavior
Returns:
the read value
Throws:
fr.esrf.Tango.DevFailed

setValue

public void setValue(AttributeValue value)
              throws fr.esrf.Tango.DevFailed
Description copied from interface: IAttributeBehavior
Write attribute

Specified by:
setValue in interface IAttributeBehavior
Throws:
fr.esrf.Tango.DevFailed

getConfiguration

public AttributeConfiguration getConfiguration()
Specified by:
getConfiguration in interface IAttributeBehavior
Returns:
attribute configuration

getStateMachine

public StateMachineBehavior getStateMachine()
Specified by:
getStateMachine in interface IAttributeBehavior
Returns:
The state machine of this attribute

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012-2015. All Rights Reserved.