Class DynamicExpression
java.lang.Object
org.springframework.integration.expression.DynamicExpression
- All Implemented Interfaces:
org.springframework.expression.Expression
public class DynamicExpression
extends java.lang.Object
implements org.springframework.expression.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
Constructors Constructor Description DynamicExpression(java.lang.String key, ExpressionSource expressionSource) -
Method Summary
Modifier and Type Method Description java.lang.StringgetExpressionString()java.lang.ObjectgetValue()<T> TgetValue(java.lang.Class<T> desiredResultType)java.lang.ObjectgetValue(java.lang.Object rootObject)<T> TgetValue(java.lang.Object rootObject, java.lang.Class<T> desiredResultType)java.lang.ObjectgetValue(org.springframework.expression.EvaluationContext context)<T> TgetValue(org.springframework.expression.EvaluationContext context, java.lang.Class<T> desiredResultType)java.lang.ObjectgetValue(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)<T> TgetValue(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject, java.lang.Class<T> desiredResultType)java.lang.Class<?>getValueType()java.lang.Class<?>getValueType(java.lang.Object rootObject)java.lang.Class<?>getValueType(org.springframework.expression.EvaluationContext context)java.lang.Class<?>getValueType(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)org.springframework.core.convert.TypeDescriptorgetValueTypeDescriptor()org.springframework.core.convert.TypeDescriptorgetValueTypeDescriptor(java.lang.Object rootObject)org.springframework.core.convert.TypeDescriptorgetValueTypeDescriptor(org.springframework.expression.EvaluationContext context)org.springframework.core.convert.TypeDescriptorgetValueTypeDescriptor(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)booleanisWritable(java.lang.Object rootObject)booleanisWritable(org.springframework.expression.EvaluationContext context)booleanisWritable(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)voidsetValue(java.lang.Object rootObject, java.lang.Object value)voidsetValue(org.springframework.expression.EvaluationContext context, java.lang.Object value)voidsetValue(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject, java.lang.Object value)
-
Constructor Details
-
Method Details
-
getValue
public java.lang.Object getValue() throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValue
public java.lang.Object getValue(java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValue
public <T> T getValue(java.lang.Class<T> desiredResultType) throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValue
public <T> T getValue(java.lang.Object rootObject, java.lang.Class<T> desiredResultType) throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValue
public java.lang.Object getValue(org.springframework.expression.EvaluationContext context) throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValue
public java.lang.Object getValue(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValue
public <T> T getValue(org.springframework.expression.EvaluationContext context, java.lang.Class<T> desiredResultType) throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValue
public <T> T getValue(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject, java.lang.Class<T> desiredResultType) throws org.springframework.expression.EvaluationException- Specified by:
getValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueType
public java.lang.Class<?> getValueType() throws org.springframework.expression.EvaluationException- Specified by:
getValueTypein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueType
public java.lang.Class<?> getValueType(java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
getValueTypein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueType
public java.lang.Class<?> getValueType(org.springframework.expression.EvaluationContext context) throws org.springframework.expression.EvaluationException- Specified by:
getValueTypein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueType
public java.lang.Class<?> getValueType(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
getValueTypein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueTypeDescriptor
public org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor() throws org.springframework.expression.EvaluationException- Specified by:
getValueTypeDescriptorin interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueTypeDescriptor
public org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor(java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
getValueTypeDescriptorin interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueTypeDescriptor
public org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor(org.springframework.expression.EvaluationContext context) throws org.springframework.expression.EvaluationException- Specified by:
getValueTypeDescriptorin interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getValueTypeDescriptor
public org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
getValueTypeDescriptorin interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
isWritable
public boolean isWritable(org.springframework.expression.EvaluationContext context) throws org.springframework.expression.EvaluationException- Specified by:
isWritablein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
isWritable
public boolean isWritable(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
isWritablein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
isWritable
public boolean isWritable(java.lang.Object rootObject) throws org.springframework.expression.EvaluationException- Specified by:
isWritablein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
setValue
public void setValue(org.springframework.expression.EvaluationContext context, java.lang.Object value) throws org.springframework.expression.EvaluationException- Specified by:
setValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
setValue
public void setValue(java.lang.Object rootObject, java.lang.Object value) throws org.springframework.expression.EvaluationException- Specified by:
setValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
setValue
public void setValue(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject, java.lang.Object value) throws org.springframework.expression.EvaluationException- Specified by:
setValuein interfaceorg.springframework.expression.Expression- Throws:
org.springframework.expression.EvaluationException
-
getExpressionString
public java.lang.String getExpressionString()- Specified by:
getExpressionStringin interfaceorg.springframework.expression.Expression
-