|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.is.util.KeyPathHelper
This class executes recursive getter methods (no parameters) using reflection. i.e. If you have an Employee instance that has a Manager instance, you could get the name of the employees manager with this key path string: "getManager.getName"
Inner Class Summary | |
static class |
KeyPathHelper.KeyPathException
|
Constructor Summary | |
KeyPathHelper()
|
Method Summary | |
static java.lang.Object |
getValueForKeyPath(java.lang.Object obj,
java.lang.String keyPath)
Recursively execute methods on the result of the previous method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyPathHelper()
Method Detail |
public static java.lang.Object getValueForKeyPath(java.lang.Object obj, java.lang.String keyPath) throws KeyPathHelper.KeyPathException
obj
- a value of type 'Object' - i.e. an Employee instancekeyPath
- a value of type 'String' - i.e. "getManager.getName"
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |