public class FunctorFieldHandler extends java.lang.Object implements IFieldHandler, INotificationSupport, IAttributeSupport
| Constructor and Description |
|---|
FunctorFieldHandler() |
FunctorFieldHandler(java.lang.String name,
IFunctor getter,
IFunctor setter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(EventType type,
INotificationListener listener)
Add
listener to the collection of objects to be informed
when the receiver triggers an event of type name. |
java.lang.Object |
getAttribute(java.lang.Object key)
Get an attribute value from the context
|
IFunctor |
getGetter() |
java.lang.String |
getName() |
IFunctor |
getSetter() |
java.lang.Object |
getValue(java.lang.Object object)
Make a reflective read access to the field represented by this within the
receiver. |
java.lang.Object |
removeAttribute(java.lang.Object key)
Remove an attribute binding in the context
|
void |
removeNotificationListener(EventType type,
INotificationListener listener)
Remove
listener from the collection of objects to be
informed about events of type name. |
java.lang.Object |
setAttribute(java.lang.Object key,
java.lang.Object value)
Set the value of an attribute in the context
|
void |
setGetter(IFunctor getter) |
void |
setName(java.lang.String name) |
void |
setSetter(IFunctor setter) |
java.lang.Object |
setValue(java.lang.Object object,
java.lang.Object value)
Make a reflective write access to the field represented by this within
receiver. |
public void addNotificationListener(EventType type, INotificationListener listener)
INotificationSupportlistener to the collection of objects to be informed
when the receiver triggers an event of type name.addNotificationListener in interface INotificationSupporttype - The event type we are interested in.listener - The object to be informed about an event occurrencepublic java.lang.Object getAttribute(java.lang.Object key)
IAttributeSupportgetAttribute in interface IAttributeSupportkey - the name of the attribute to getkeypublic IFunctor getGetter()
public java.lang.String getName()
public IFunctor getSetter()
public java.lang.Object getValue(java.lang.Object object)
throws FieldAccessException
IFieldHandlerreceiver.getValue in interface IFieldHandlerobject - The object hosting the field.FieldAccessExceptionpublic java.lang.Object removeAttribute(java.lang.Object key)
IAttributeSupportremoveAttribute in interface IAttributeSupportkey - the name of the attribute to removekeypublic void removeNotificationListener(EventType type, INotificationListener listener)
INotificationSupportlistener from the collection of objects to be
informed about events of type name.removeNotificationListener in interface INotificationSupporttype - The event type we are no longer interested in.listener - The object registered for the event till now.public java.lang.Object setAttribute(java.lang.Object key,
java.lang.Object value)
IAttributeSupportsetAttribute in interface IAttributeSupportkey - the name of the attribute to setvalue - the new value the attributekeypublic void setGetter(IFunctor getter)
public void setName(java.lang.String name)
public void setSetter(IFunctor setter)
public java.lang.Object setValue(java.lang.Object object,
java.lang.Object value)
throws FieldAccessException
IFieldHandlerreceiver.setValue in interface IFieldHandlerobject - The object hosting the field.value - The new value for the fieldFieldAccessException