public class ReflectionValueExtractor
extends java.lang.Object
Using simple dotted expressions extract the values from a MavenProject instance, For example we might want to extract a value like: project.build.sourceDirectory
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
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 objectjava.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 objecttrimRootToken - trim the token or not.java.lang.Exception - if anyCopyright © 2018. All rights reserved.