Class ReflectionValueExtractor
java.lang.Object
org.apache.maven.model.interpolation.reflection.ReflectionValueExtractor
Deprecated.
Using simple dotted expressions to extract the values from an Object instance using JSP-like expressions
such as
project.build.sourceDirectory
.
In addition to usual getters using getXxx
or isXxx
suffixes, accessors
using asXxx
or toXxx
prefixes are also supported.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Deprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map
<Class<?>, WeakReference<ClassMap>> Deprecated.Use a WeakHashMap here, so the keys (Class objects) can be garbage collected.(package private) static final int
Deprecated.(package private) static final char
Deprecated.(package private) static final char
Deprecated.(package private) static final char
Deprecated.(package private) static final char
Deprecated.private static final Object[]
Deprecated.(package private) static final char
Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Deprecated.The implementation supports indexed, nested and mapped properties.static Object
Deprecated.The implementation supports indexed, nested and mapped properties.private static ClassMap
getClassMap
(Class<?> clazz) Deprecated.private static Object
getIndexedValue
(String expression, int from, int to, Object value, String indexStr) Deprecated.private static Object
getMappedValue
(String expression, int from, int to, Object value, String key) Deprecated.private static Object
getPropertyValue
(Object value, String property) Deprecated.
-
Field Details
-
OBJECT_ARGS
Deprecated. -
CLASS_MAPS
Deprecated.Use a WeakHashMap here, so the keys (Class objects) can be garbage collected. This approach prevents permgen space overflows due to retention of discarded classloaders. -
EOF
static final int EOFDeprecated.- See Also:
-
PROPERTY_START
static final char PROPERTY_STARTDeprecated.- See Also:
-
INDEXED_START
static final char INDEXED_STARTDeprecated.- See Also:
-
INDEXED_END
static final char INDEXED_ENDDeprecated.- See Also:
-
MAPPED_START
static final char MAPPED_STARTDeprecated.- See Also:
-
MAPPED_END
static final char MAPPED_ENDDeprecated.- See Also:
-
-
Constructor Details
-
ReflectionValueExtractor
private ReflectionValueExtractor()Deprecated.
-
-
Method Details
-
evaluate
public static Object evaluate(@Nonnull String expression, @Nullable Object root) throws IntrospectionException Deprecated.The implementation supports indexed, nested and mapped properties.
- nested properties should be defined by a dot, i.e. "user.address.street"
- indexed properties (java.util.List or array instance) should be contains
(\\w+)\\[(\\d+)\\]
pattern, i.e. "user.addresses[1].street" - mapped properties should be contains
(\\w+)\\((.+)\\)
pattern, i.e. "user.addresses(myAddress).street"
- Parameters:
expression
- not null expressionroot
- not null object- Returns:
- the object defined by the expression
- Throws:
IntrospectionException
- if any
-
evaluate
public static Object evaluate(@Nonnull String expression, @Nullable Object root, boolean trimRootToken) throws IntrospectionException Deprecated.The implementation supports indexed, nested and mapped properties.
- nested properties should be defined by a dot, i.e. "user.address.street"
- indexed properties (java.util.List or array instance) should be contains
(\\w+)\\[(\\d+)\\]
pattern, i.e. "user.addresses[1].street" - mapped properties should be contains
(\\w+)\\((.+)\\)
pattern, i.e. "user.addresses(myAddress).street"
- Parameters:
expression
- not null expressionroot
- not null objecttrimRootToken
- trim root token yes/no.- Returns:
- the object defined by the expression
- Throws:
IntrospectionException
- if any
-
getMappedValue
private static Object getMappedValue(String expression, int from, int to, Object value, String key) throws IntrospectionException Deprecated.- Throws:
IntrospectionException
-
getIndexedValue
private static Object getIndexedValue(String expression, int from, int to, Object value, String indexStr) throws IntrospectionException Deprecated.- Throws:
IntrospectionException
-
getPropertyValue
Deprecated.- Throws:
IntrospectionException
-
getClassMap
Deprecated.
-
ModelBuilder
instead