com.gentlyweb.utils
Class DynamicGetter
java.lang.Object
com.gentlyweb.utils.DynamicGetter
public class DynamicGetter
- extends Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
getBaseClass
public Class getBaseClass()
getType
public Class getType()
- Get the class of the type of object we would return from the
getValue(Object)
method.
- Returns:
- The class.
getValue
public Object getValue(Object obj)
throws IllegalAccessException,
InvocationTargetException
- Throws:
IllegalAccessException
InvocationTargetException