C
- class containing the fieldT
- class of fieldpublic class MethodAccessField<C,T> extends RowField<C,T>
Column.fieldAccess()
or Row.fieldAccess()
is
FieldAccessType.Method
.Constructor and Description |
---|
MethodAccessField(java.lang.reflect.Field field)
Constructs for a field.
|
Modifier and Type | Method and Description |
---|---|
T |
get(C object)
Gets field value with row getter method using
Method.invoke(Object, Object...) . |
java.lang.reflect.Method |
getGetMethod() |
java.lang.reflect.Method |
getSetMethod() |
void |
set(C object,
T value)
Sets field value with row setter method using
Method.invoke(Object, Object...) . |
getField, isArray, isBooleanMethod, isClass, isCollection, isMap, isScalar, newInstance
public MethodAccessField(java.lang.reflect.Field field) throws ReflectException
field
- java reflection Field that corresponds to class variableReflectException
- if errorpublic T get(C object) throws ReflectException
Method.invoke(Object, Object...)
.get
in class RowField<C,T>
object
- instance of field to getReflectException
- if errorpublic void set(C object, T value) throws ReflectException
Method.invoke(Object, Object...)
.set
in class RowField<C,T>
object
- instance of field to setvalue
- new value of field instanceReflectException
- if errorpublic java.lang.reflect.Method getGetMethod()
public java.lang.reflect.Method getSetMethod()