Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.binding.expression.spel
Class SpringELExpression

    java.lang.Object
      org.springframework.binding.expression.spel.SpringELExpression

All Implemented Interfaces:
  Expression

    public class SpringELExpression

extends java.lang.Object
implements Expression

A wrapper for a Spring EL `Expression` allowing it to be used under the Spring Binding `Expression` abstraction.

Since:
  2.1.0
Author:
  Rossen Stoyanchev

Constructor Summary
`SpringELExpression(org.springframework.expression.Expression expression, java.util.Map expressionVariables, java.lang.Class expectedType, org.springframework.core.convert.ConversionService conversionService, java.util.List<org.springframework.expression.PropertyAccessor> propertyAccessors)` Constructor for SpringELExpression.

Method Summary
`java.lang.String` | `getExpressionString()` Returns the original string used to create this expression, unmodified.
`java.lang.Object` | `getValue(java.lang.Object rootObject)` Evaluate this expression in the provided context and return the result of evaluation.
`java.lang.Class` | `getValueType(java.lang.Object rootObject)` Returns the most general type that can be passed to the `Expression.setValue(Object, Object)` method for the given context.
`void` | `setValue(java.lang.Object rootObject, java.lang.Object value)` Set this expression in the provided context 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

### SpringELExpression

    public SpringELExpression(org.springframework.expression.Expression expression,
                              java.util.Map expressionVariables,
                              java.lang.Class expectedType,
                              org.springframework.core.convert.ConversionService conversionService,
                              java.util.List<org.springframework.expression.PropertyAccessor> propertyAccessors)

  Constructor for SpringELExpression.

  Parameters:
    `expression` - a parsed Spring EL expression instance. Must not be null.
    `expressionVariables` - provides a mapping between variables names and parsed Spring EL expression instances. This parameter is optional (may be null).
    `expectedType` - the target type expected from the evaluation of the expression or null. This parameter is optional (may be null).
    `conversionService` - the Spring ConversionService instance to use for type conversion
    `propertyAccessors` - propertyAccessors for Spring EL to use when evaluating expressions

Method Detail

### getExpressionString

    public java.lang.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

### getValue

    public java.lang.Object getValue(java.lang.Object rootObject)
                              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:
    `rootObject` - the context to evaluate this expression in
  Returns:
    the evaluation result
  Throws:
    `EvaluationException` - an exception occurred during expression evaluation

### getValueType

    public java.lang.Class getValueType(java.lang.Object rootObject)
                                 throws EvaluationException

  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:
    `rootObject` - 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
  Throws:
    `EvaluationException` - an exception occurred during expression evaluation

### setValue

    public void setValue(java.lang.Object rootObject,
                         java.lang.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:
    `rootObject` - the context on which the new value should be set
    `value` - the new value to set
  Throws:
    `EvaluationException` - an exception occurred during expression evaluation

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD