org.unitils.reflectionassert
Class ReflectionAssert.OgnlTransformer

java.lang.Object
  extended by org.unitils.reflectionassert.ReflectionAssert.OgnlTransformer
All Implemented Interfaces:
org.apache.commons.collections.Transformer
Enclosing class:
ReflectionAssert

protected static class ReflectionAssert.OgnlTransformer
extends Object
implements org.apache.commons.collections.Transformer

A commons collections transformer that takes an object and returns the value of the property that is specified by the given ognl expression.


Constructor Summary
ReflectionAssert.OgnlTransformer(String ognlExpression)
          Creates a transformer with the given ognl expression.
 
Method Summary
 Object transform(Object object)
          Transforms the given object in the value of the property that is specified by the ognl expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionAssert.OgnlTransformer

public ReflectionAssert.OgnlTransformer(String ognlExpression)
Creates a transformer with the given ognl expression.

Parameters:
ognlExpression - The expression, not null
Method Detail

transform

public Object transform(Object object)
Transforms the given object in the value of the property that is specified by the ognl expression.

Specified by:
transform in interface org.apache.commons.collections.Transformer
Parameters:
object - The object
Returns:
The value, null if object was null


Copyright © 2011. All Rights Reserved.