org.progeeks.meta.util
Class MetaPropertyUtils

java.lang.Object
  extended by org.progeeks.meta.util.MetaPropertyUtils

public class MetaPropertyUtils
extends java.lang.Object

Extends the org.progeeks.util.beans.PropertyUtils class to also deal with MetaObjects. Convenience methods are provided that simply delegate to the PropertyUtils methods for some things.

Version:
$Revision: 1.6 $
Author:
Paul Speed

Field Summary
static SimpleExpressionLanguage EL
           
 
Constructor Summary
MetaPropertyUtils()
           
 
Method Summary
static java.lang.Object getProperty(java.lang.Object object, java.util.List expressionElements)
          Uses a PropertyAdapter to traverse the bean and meta-object properties specified by the pre-parsed list of expression elements.
static java.lang.Object getProperty(java.lang.Object object, java.lang.String expression)
          Uses bean Introspection via org.progeeks.util.Inspector to access a sequence of nested properties specified by the spring expression.
static java.util.List parseExpression(java.lang.String expression)
          Parses the expression and returns a list of elements found.
static void setProperty(java.lang.Object object, java.util.List expressionElements, java.lang.Object value)
          Uses bean introspection via org.progeeks.util.Inspector to access a sequence of nested properties specified by the string expression and set the last property in the chain.
static void setProperty(java.lang.Object object, java.lang.String expression, java.lang.Object value)
          Uses bean introspection via org.progeeks.util.Inspector to access a sequence of nested properties specified by the string expression and set the last property in the chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EL

public static final SimpleExpressionLanguage EL
Constructor Detail

MetaPropertyUtils

public MetaPropertyUtils()
Method Detail

parseExpression

public static java.util.List parseExpression(java.lang.String expression)
Parses the expression and returns a list of elements found. Otherwise, throws a RuntimeException. This simply delegates to the PropertyUtils version.


getProperty

public static java.lang.Object getProperty(java.lang.Object object,
                                           java.util.List expressionElements)
Uses a PropertyAdapter to traverse the bean and meta-object properties specified by the pre-parsed list of expression elements. Returns the single value at the end of the chain. If the chain ends early then null is returned.


getProperty

public static java.lang.Object getProperty(java.lang.Object object,
                                           java.lang.String expression)
Uses bean Introspection via org.progeeks.util.Inspector to access a sequence of nested properties specified by the spring expression. Returns the single value at the end of the chain. If the chain ends early then null is returned.


setProperty

public static void setProperty(java.lang.Object object,
                               java.lang.String expression,
                               java.lang.Object value)
Uses bean introspection via org.progeeks.util.Inspector to access a sequence of nested properties specified by the string expression and set the last property in the chain.


setProperty

public static void setProperty(java.lang.Object object,
                               java.util.List expressionElements,
                               java.lang.Object value)
Uses bean introspection via org.progeeks.util.Inspector to access a sequence of nested properties specified by the string expression and set the last property in the chain.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.