org.springframework.binding.expression.support
Class CollectionAddingExpression

java.lang.Object
  extended by org.springframework.binding.expression.support.CollectionAddingExpression
All Implemented Interfaces:
Expression, SettableExpression

public class CollectionAddingExpression
extends java.lang.Object
implements SettableExpression

A settable expression that adds non-null values to a collection.

Author:
Keith Donald

Constructor Summary
CollectionAddingExpression(Expression collectionExpression)
          Creates a collection adding property expression.
 
Method Summary
 java.lang.Object evaluate(java.lang.Object target, EvaluationContext context)
          Evaluate the expression encapsulated by this evaluator against the provided target object and return the result of the evaluation.
 void evaluateToSet(java.lang.Object target, java.lang.Object value, EvaluationContext context)
          Evaluate this expression against the target object to set its value to the value provided.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionAddingExpression

public CollectionAddingExpression(Expression collectionExpression)
Creates a collection adding property expression.

Parameters:
collectionExpression - the collection expression
Method Detail

evaluate

public java.lang.Object evaluate(java.lang.Object target,
                                 EvaluationContext context)
                          throws EvaluationException
Description copied from interface: Expression
Evaluate the expression encapsulated by this evaluator against the provided target object and return the result of the evaluation.

Specified by:
evaluate in interface Expression
Parameters:
target - the target of the expression
context - the expression evaluation context
Returns:
the evaluation result
Throws:
EvaluationException - an exception occured during evaluation

evaluateToSet

public void evaluateToSet(java.lang.Object target,
                          java.lang.Object value,
                          EvaluationContext context)
                   throws EvaluationException
Description copied from interface: SettableExpression
Evaluate this expression against the target object to set its value to the value provided.

Specified by:
evaluateToSet in interface SettableExpression
Parameters:
target - the target object
value - the new value to be set
context - the evaluation context
Throws:
EvaluationException - an exception occured during evaluation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright � 2004-2007. All Rights Reserved.