|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sormula.reflect.SormulaField<C,T>
C
- class containing the fieldT
- class of fieldpublic class SormulaField<C,T>
A field within a class with additional methods needed by sormula for reflection.
Constructor Summary | |
---|---|
SormulaField(java.lang.reflect.Field field)
Constructs for a field. |
Method Summary | |
---|---|
java.lang.String |
getCanonicalGetMethodName()
Gets cannonical "get" method name. |
java.lang.String |
getCanonicalSetMethodName()
Gets cannonical "set" method name. |
java.lang.reflect.Field |
getField()
Gets field supplied in constructor. |
T |
invokeGetMethod(C object)
Gets value from get method of an object using reflection. |
void |
invokeSetMethod(C object,
T value)
Sets value on object with set method using reflection. |
boolean |
isArray()
Gets field array type. |
boolean |
isBooleanMethod()
Reports boolean return type of field. |
boolean |
isClass(java.lang.Class<?> c)
Tests if field is instance of class. |
boolean |
isCollection()
Gets field Collection inheritance. |
boolean |
isMap()
Gets field Map inheritance. |
boolean |
isScalar()
Reports if field is scalar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SormulaField(java.lang.reflect.Field field) throws ReflectException
field
- java reflection Field that corresponds to class variable
ReflectException
- if errorMethod Detail |
---|
public java.lang.reflect.Field getField()
public boolean isArray()
public boolean isCollection()
Collection
inheritance.
collection
public boolean isMap()
Map
inheritance.
Map
public boolean isBooleanMethod()
public T invokeGetMethod(C object) throws ReflectException
object
- object to invoke get method upon
ReflectException
- if errorpublic void invokeSetMethod(C object, T value) throws ReflectException
object
- object to invoke set method uponvalue
- value to set
ReflectException
- if errorpublic boolean isScalar()
Collection
and not a Map
isClass(Class)
public boolean isClass(java.lang.Class<?> c)
c
- class to test
Class.isAssignableFrom(Class)
public java.lang.String getCanonicalGetMethodName()
public java.lang.String getCanonicalSetMethodName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |