org.apache.maven.shared.utils.introspection
Class ReflectionValueExtractor

java.lang.Object
  extended by org.apache.maven.shared.utils.introspection.ReflectionValueExtractor

public class ReflectionValueExtractor
extends Object

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.

Version:
$Id$
Author:
Jason van Zyl , Vincent Siveton
See Also:
http://struts.apache.org/1.x/struts-taglib/indexedprops.html

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

evaluate

public static Object evaluate(@Nonnull
                              String expression,
                              @Nullable
                              Object root)
                       throws org.apache.maven.shared.utils.introspection.IntrospectionException

The implementation supports indexed, nested and mapped properties.


evaluate

public static Object evaluate(@Nonnull
                              String expression,
                              @Nullable
                              Object root,
                              boolean trimRootToken)
                       throws org.apache.maven.shared.utils.introspection.IntrospectionException

The implementation supports indexed, nested and mapped properties.



Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.