Package de.intarsys.tools.reflect
Interface IFieldHandler
-
- All Known Implementing Classes:
FunctorFieldHandler
public interface IFieldHandler
An object able to access a field within a delegate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getValue(java.lang.Object receiver)
Make a reflective read access to the field represented by this within thereceiver
.java.lang.Object
setValue(java.lang.Object receiver, java.lang.Object value)
Make a reflective write access to the field represented by this withinreceiver
.
-
-
-
Method Detail
-
getValue
java.lang.Object getValue(java.lang.Object receiver) throws FieldAccessException
Make a reflective read access to the field represented by this within thereceiver
.- Parameters:
receiver
- The object hosting the field.- Returns:
- The field value
- Throws:
FieldException
FieldAccessException
-
setValue
java.lang.Object setValue(java.lang.Object receiver, java.lang.Object value) throws FieldAccessException
Make a reflective write access to the field represented by this withinreceiver
.- Parameters:
receiver
- The object hosting the field.value
- The new value for the field- Returns:
- The previous field value. This is an optional feature.
- Throws:
FieldException
FieldAccessException
-
-