Package de.intarsys.tools.functor
Class FunctorFieldHandler
java.lang.Object
de.intarsys.tools.functor.FunctorFieldHandler
- All Implemented Interfaces:
IAttributeSupport
,INotificationSupport
,IFieldHandler
public class FunctorFieldHandler
extends Object
implements IFieldHandler, INotificationSupport, IAttributeSupport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotificationListener
(EventType type, INotificationListener listener) Addlistener
to the collection of objects to be informed when the receiver triggers an event of typename
.getAttribute
(Object key) Get an attribute value from the contextgetName()
Make a reflective read access to the field represented by this within thereceiver
.removeAttribute
(Object key) Remove an attribute binding in the contextvoid
removeNotificationListener
(EventType type, INotificationListener listener) Removelistener
from the collection of objects to be informed about events of typename
.setAttribute
(Object key, Object value) Set the value of an attribute in the contextvoid
void
void
Make a reflective write access to the field represented by this withinreceiver
.
-
Constructor Details
-
FunctorFieldHandler
public FunctorFieldHandler() -
FunctorFieldHandler
-
-
Method Details
-
addNotificationListener
Description copied from interface:INotificationSupport
Addlistener
to the collection of objects to be informed when the receiver triggers an event of typename
.- Specified by:
addNotificationListener
in interfaceINotificationSupport
- Parameters:
type
- The event type we are interested in.listener
- The object to be informed about an event occurrence
-
getAttribute
Description copied from interface:IAttributeSupport
Get an attribute value from the context- Specified by:
getAttribute
in interfaceIAttributeSupport
- Parameters:
key
- the name of the attribute to get- Returns:
- The value of the attribute
key
-
getGetter
-
getName
-
getSetter
-
getValue
Description copied from interface:IFieldHandler
Make a reflective read access to the field represented by this within thereceiver
.- Specified by:
getValue
in interfaceIFieldHandler
- Parameters:
object
- The object hosting the field.- Returns:
- The field value
- Throws:
FieldAccessException
-
removeAttribute
Description copied from interface:IAttributeSupport
Remove an attribute binding in the context- Specified by:
removeAttribute
in interfaceIAttributeSupport
- Parameters:
key
- the name of the attribute to remove- Returns:
- The previously associated value for
key
-
removeNotificationListener
Description copied from interface:INotificationSupport
Removelistener
from the collection of objects to be informed about events of typename
.- Specified by:
removeNotificationListener
in interfaceINotificationSupport
- Parameters:
type
- The event type we are no longer interested in.listener
- The object registered for the event till now.
-
setAttribute
Description copied from interface:IAttributeSupport
Set the value of an attribute in the context- Specified by:
setAttribute
in interfaceIAttributeSupport
- Parameters:
key
- the name of the attribute to setvalue
- the new value the attribute- Returns:
- The previously associated value for
key
-
setGetter
-
setName
-
setSetter
-
setValue
Description copied from interface:IFieldHandler
Make a reflective write access to the field represented by this withinreceiver
.- Specified by:
setValue
in interfaceIFieldHandler
- Parameters:
object
- The object hosting the field.value
- The new value for the field- Returns:
- The previous field value. This is an optional feature.
- Throws:
FieldAccessException
-