|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.util.introspection.ReflectionValueExtractor
Using simple dotted expressions to extract the values from an Object instance,
For example we might want to extract a value like: project.build.sourceDirectory
The implementation supports indexed, nested and mapped properties similar to the JSP way.
Method Summary | |
static Object |
evaluate(String expression,
Object root)
The implementation supports indexed, nested and mapped properties. |
static Object |
evaluate(String expression,
Object root,
boolean trimRootToken)
The implementation supports indexed, nested and mapped properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Object evaluate(String expression, Object root) throws Exception
The implementation supports indexed, nested and mapped properties.
(\\w+)\\[(\\d+)\\]
pattern, i.e. "user.addresses[1].street"(\\w+)\\((.+)\\)
pattern, i.e. "user.addresses(myAddress).street"
expression
- not null expressionroot
- not null object
Exception
- if anypublic static Object evaluate(String expression, Object root, boolean trimRootToken) throws Exception
The implementation supports indexed, nested and mapped properties.
(\\w+)\\[(\\d+)\\]
pattern, i.e. "user.addresses[1].street"(\\w+)\\((.+)\\)
pattern, i.e. "user.addresses(myAddress).street"
expression
- not null expressionroot
- not null object
Exception
- if any
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |