Class CompositeStringExpression

java.lang.Object
org.springframework.binding.expression.support.CompositeStringExpression
All Implemented Interfaces:
Expression

public class CompositeStringExpression extends Object implements Expression
Evaluates an array of expressions to build a concatenated string.
Author:
Keith Donald
  • Constructor Details

    • CompositeStringExpression

      public CompositeStringExpression(Expression... expressions)
      Creates a new composite string expression.
      Parameters:
      expressions - the ordered set of expressions that when evaluated will have their results stringed together to build the composite string
  • Method Details

    • getValue

      public Object getValue(Object context) throws EvaluationException
      Description copied from interface: Expression
      Evaluate this expression in the provided context and return the result of evaluation.
      Specified by:
      getValue in interface Expression
      Parameters:
      context - the context to evaluate this expression in
      Returns:
      the evaluation result
      Throws:
      EvaluationException - an exception occurred during expression evaluation
    • setValue

      public void setValue(Object context, Object value) throws EvaluationException
      Description copied from interface: Expression
      Set this expression in the provided context to the value provided.
      Specified by:
      setValue in interface Expression
      Parameters:
      context - the context on which the new value should be set
      value - the new value to set
      Throws:
      EvaluationException - an exception occurred during expression evaluation
    • getValueType

      public Class<?> getValueType(Object context)
      Description copied from interface: Expression
      Returns the most general type that can be passed to the Expression.setValue(Object, Object) method for the given context.
      Specified by:
      getValueType in interface Expression
      Parameters:
      context - the context to evaluate
      Returns:
      the most general type of value that can be set on this context, or null if the type information cannot be determined
    • getExpressionString

      public String getExpressionString()
      Description copied from interface: Expression
      Returns the original string used to create this expression, unmodified.
      Specified by:
      getExpressionString in interface Expression
      Returns:
      the original expression string
    • toString

      public String toString()
      Overrides:
      toString in class Object