|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.util.introspection.ReflectionValueExtractor
public class 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 java.lang.Object |
evaluate(java.lang.String expression,
java.lang.Object root)
The implementation supports indexed, nested and mapped properties. |
static java.lang.Object |
evaluate(java.lang.String expression,
java.lang.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 java.lang.Object evaluate(java.lang.String expression, java.lang.Object root) throws java.lang.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
java.lang.Exception
- if anypublic static java.lang.Object evaluate(java.lang.String expression, java.lang.Object root, boolean trimRootToken) throws java.lang.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
java.lang.Exception
- if any
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |