org.springframework.integration.expression
Class DynamicExpression

java.lang.Object
  extended by org.springframework.integration.expression.DynamicExpression
All Implemented Interfaces:
Expression

public class DynamicExpression
extends java.lang.Object
implements Expression

An implementation of Expression that delegates to an ExpressionSource for resolving the actual Expression instance per-invocation at runtime.

Since:
2.0

Constructor Summary
DynamicExpression(java.lang.String key, ExpressionSource expressionSource)
           
 
Method Summary
 java.lang.String getExpressionString()
           
 java.lang.Object getValue()
           
<T> T
getValue(java.lang.Class<T> desiredResultType)
           
 java.lang.Object getValue(EvaluationContext context)
           
<T> T
getValue(EvaluationContext context, java.lang.Class<T> desiredResultType)
           
 java.lang.Object getValue(EvaluationContext context, java.lang.Object rootObject)
           
<T> T
getValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Class<T> desiredResultType)
           
 java.lang.Object getValue(java.lang.Object rootObject)
           
<T> T
getValue(java.lang.Object rootObject, java.lang.Class<T> desiredResultType)
           
 java.lang.Class<?> getValueType()
           
 java.lang.Class<?> getValueType(EvaluationContext context)
           
 java.lang.Class<?> getValueType(EvaluationContext context, java.lang.Object rootObject)
           
 java.lang.Class<?> getValueType(java.lang.Object rootObject)
           
 TypeDescriptor getValueTypeDescriptor()
           
 TypeDescriptor getValueTypeDescriptor(EvaluationContext context)
           
 TypeDescriptor getValueTypeDescriptor(EvaluationContext context, java.lang.Object rootObject)
           
 TypeDescriptor getValueTypeDescriptor(java.lang.Object rootObject)
           
 boolean isWritable(EvaluationContext context)
           
 boolean isWritable(EvaluationContext context, java.lang.Object rootObject)
           
 boolean isWritable(java.lang.Object rootObject)
           
 void setValue(EvaluationContext context, java.lang.Object value)
           
 void setValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Object value)
           
 void setValue(java.lang.Object rootObject, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicExpression

public DynamicExpression(java.lang.String key,
                         ExpressionSource expressionSource)
Method Detail

getValue

public java.lang.Object getValue()
                          throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValue

public java.lang.Object getValue(java.lang.Object rootObject)
                          throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValue

public <T> T getValue(java.lang.Class<T> desiredResultType)
           throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValue

public <T> T getValue(java.lang.Object rootObject,
                      java.lang.Class<T> desiredResultType)
           throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValue

public java.lang.Object getValue(EvaluationContext context)
                          throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValue

public java.lang.Object getValue(EvaluationContext context,
                                 java.lang.Object rootObject)
                          throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValue

public <T> T getValue(EvaluationContext context,
                      java.lang.Class<T> desiredResultType)
           throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValue

public <T> T getValue(EvaluationContext context,
                      java.lang.Object rootObject,
                      java.lang.Class<T> desiredResultType)
           throws EvaluationException
Specified by:
getValue in interface Expression
Throws:
EvaluationException

getValueType

public java.lang.Class<?> getValueType()
                                throws EvaluationException
Specified by:
getValueType in interface Expression
Throws:
EvaluationException

getValueType

public java.lang.Class<?> getValueType(java.lang.Object rootObject)
                                throws EvaluationException
Specified by:
getValueType in interface Expression
Throws:
EvaluationException

getValueType

public java.lang.Class<?> getValueType(EvaluationContext context)
                                throws EvaluationException
Specified by:
getValueType in interface Expression
Throws:
EvaluationException

getValueType

public java.lang.Class<?> getValueType(EvaluationContext context,
                                       java.lang.Object rootObject)
                                throws EvaluationException
Specified by:
getValueType in interface Expression
Throws:
EvaluationException

getValueTypeDescriptor

public TypeDescriptor getValueTypeDescriptor()
                                      throws EvaluationException
Specified by:
getValueTypeDescriptor in interface Expression
Throws:
EvaluationException

getValueTypeDescriptor

public TypeDescriptor getValueTypeDescriptor(java.lang.Object rootObject)
                                      throws EvaluationException
Specified by:
getValueTypeDescriptor in interface Expression
Throws:
EvaluationException

getValueTypeDescriptor

public TypeDescriptor getValueTypeDescriptor(EvaluationContext context)
                                      throws EvaluationException
Specified by:
getValueTypeDescriptor in interface Expression
Throws:
EvaluationException

getValueTypeDescriptor

public TypeDescriptor getValueTypeDescriptor(EvaluationContext context,
                                             java.lang.Object rootObject)
                                      throws EvaluationException
Specified by:
getValueTypeDescriptor in interface Expression
Throws:
EvaluationException

isWritable

public boolean isWritable(EvaluationContext context)
                   throws EvaluationException
Specified by:
isWritable in interface Expression
Throws:
EvaluationException

isWritable

public boolean isWritable(EvaluationContext context,
                          java.lang.Object rootObject)
                   throws EvaluationException
Specified by:
isWritable in interface Expression
Throws:
EvaluationException

isWritable

public boolean isWritable(java.lang.Object rootObject)
                   throws EvaluationException
Specified by:
isWritable in interface Expression
Throws:
EvaluationException

setValue

public void setValue(EvaluationContext context,
                     java.lang.Object value)
              throws EvaluationException
Specified by:
setValue in interface Expression
Throws:
EvaluationException

setValue

public void setValue(java.lang.Object rootObject,
                     java.lang.Object value)
              throws EvaluationException
Specified by:
setValue in interface Expression
Throws:
EvaluationException

setValue

public void setValue(EvaluationContext context,
                     java.lang.Object rootObject,
                     java.lang.Object value)
              throws EvaluationException
Specified by:
setValue in interface Expression
Throws:
EvaluationException

getExpressionString

public java.lang.String getExpressionString()
Specified by:
getExpressionString in interface Expression