Class ValueExpression<V>
- java.lang.Object
-
- org.springframework.amqp.rabbit.support.ValueExpression<V>
-
- Type Parameters:
V
- - The expected value type.
- All Implemented Interfaces:
Expression
public class ValueExpression<V> extends Object implements Expression
A very simple hardcoded implementation of theExpression
interface that represents an immutable value. It is used as value holder in the context of expression evaluation.- Since:
- 1.4
- Author:
- Artem Bilan
-
-
Constructor Summary
Constructors Constructor Description ValueExpression(V value)
-
Method Summary
-
-
-
Constructor Detail
-
ValueExpression
public ValueExpression(V value)
-
-
Method Detail
-
getValue
public V getValue() throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public V getValue(Object rootObject) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public V getValue(EvaluationContext context) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public V getValue(EvaluationContext context, Object rootObject) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(Object rootObject, Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(EvaluationContext context, Object rootObject, Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(EvaluationContext context, Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public Class<V> getValueType() throws EvaluationException
- Specified by:
getValueType
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public Class<V> getValueType(Object rootObject) throws EvaluationException
- Specified by:
getValueType
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public Class<V> getValueType(EvaluationContext context) throws EvaluationException
- Specified by:
getValueType
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public Class<V> getValueType(EvaluationContext context, Object rootObject) throws EvaluationException
- Specified by:
getValueType
in interfaceExpression
- Throws:
EvaluationException
-
getValueTypeDescriptor
public TypeDescriptor getValueTypeDescriptor() throws EvaluationException
- Specified by:
getValueTypeDescriptor
in interfaceExpression
- Throws:
EvaluationException
-
getValueTypeDescriptor
public TypeDescriptor getValueTypeDescriptor(Object rootObject) throws EvaluationException
- Specified by:
getValueTypeDescriptor
in interfaceExpression
- Throws:
EvaluationException
-
getValueTypeDescriptor
public TypeDescriptor getValueTypeDescriptor(EvaluationContext context) throws EvaluationException
- Specified by:
getValueTypeDescriptor
in interfaceExpression
- Throws:
EvaluationException
-
getValueTypeDescriptor
public TypeDescriptor getValueTypeDescriptor(EvaluationContext context, Object rootObject) throws EvaluationException
- Specified by:
getValueTypeDescriptor
in interfaceExpression
- Throws:
EvaluationException
-
isWritable
public boolean isWritable(EvaluationContext context) throws EvaluationException
- Specified by:
isWritable
in interfaceExpression
- Throws:
EvaluationException
-
isWritable
public boolean isWritable(EvaluationContext context, Object rootObject) throws EvaluationException
- Specified by:
isWritable
in interfaceExpression
- Throws:
EvaluationException
-
isWritable
public boolean isWritable(Object rootObject) throws EvaluationException
- Specified by:
isWritable
in interfaceExpression
- Throws:
EvaluationException
-
setValue
public void setValue(EvaluationContext context, Object value) throws EvaluationException
- Specified by:
setValue
in interfaceExpression
- Throws:
EvaluationException
-
setValue
public void setValue(Object rootObject, Object value) throws EvaluationException
- Specified by:
setValue
in interfaceExpression
- Throws:
EvaluationException
-
setValue
public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException
- Specified by:
setValue
in interfaceExpression
- Throws:
EvaluationException
-
getExpressionString
public String getExpressionString()
- Specified by:
getExpressionString
in interfaceExpression
-
-