Package com.gentlyweb.utils
Class DynamicGetter
java.lang.Object
com.gentlyweb.utils.DynamicGetter
This class is used to perform access into a Java object using a
String value with a specific notation. This class differs from the
Getter
class in that instead of creating the chain of methods when the getter is
instantiated it will instead get the actual method from the object passed in.-
Constructor Summary
ConstructorsConstructorDescriptionDynamicGetter
(String ref, Object obj) Get the getter associated with the named reference. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
Get the class of the type of object we would return from thegetValue(Object)
method.
-
Constructor Details
-
DynamicGetter
public DynamicGetter(String ref, Object obj) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException Get the getter associated with the named reference. Return null if there isn't one, or if we can't access it.- Parameters:
ref
- The reference for the getter.obj
- The Object to build up the getter from.- Throws:
IllegalArgumentException
IllegalAccessException
InvocationTargetException
-
-
Method Details
-
getBaseClass
-
getType
Get the class of the type of object we would return from thegetValue(Object)
method.- Returns:
- The class.
-
getValue
-