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 java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getExpressionString()
V
getValue()
<T> T
getValue(java.lang.Class<T> desiredResultType)
V
getValue(java.lang.Object rootObject)
<T> T
getValue(java.lang.Object rootObject, java.lang.Class<T> desiredResultType)
V
getValue(EvaluationContext context)
<T> T
getValue(EvaluationContext context, java.lang.Class<T> desiredResultType)
V
getValue(EvaluationContext context, java.lang.Object rootObject)
<T> T
getValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Class<T> desiredResultType)
java.lang.Class<V>
getValueType()
java.lang.Class<V>
getValueType(java.lang.Object rootObject)
java.lang.Class<V>
getValueType(EvaluationContext context)
java.lang.Class<V>
getValueType(EvaluationContext context, java.lang.Object rootObject)
TypeDescriptor
getValueTypeDescriptor()
TypeDescriptor
getValueTypeDescriptor(java.lang.Object rootObject)
TypeDescriptor
getValueTypeDescriptor(EvaluationContext context)
TypeDescriptor
getValueTypeDescriptor(EvaluationContext context, java.lang.Object rootObject)
boolean
isWritable(java.lang.Object rootObject)
boolean
isWritable(EvaluationContext context)
boolean
isWritable(EvaluationContext context, java.lang.Object rootObject)
void
setValue(java.lang.Object rootObject, java.lang.Object value)
void
setValue(EvaluationContext context, java.lang.Object value)
void
setValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Object value)
-
-
-
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(java.lang.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, java.lang.Object rootObject) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(java.lang.Object rootObject, java.lang.Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(java.lang.Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValue
public <T> T getValue(EvaluationContext context, java.lang.Class<T> desiredResultType) throws EvaluationException
- Specified by:
getValue
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public java.lang.Class<V> getValueType() throws EvaluationException
- Specified by:
getValueType
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public java.lang.Class<V> getValueType(java.lang.Object rootObject) throws EvaluationException
- Specified by:
getValueType
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public java.lang.Class<V> getValueType(EvaluationContext context) throws EvaluationException
- Specified by:
getValueType
in interfaceExpression
- Throws:
EvaluationException
-
getValueType
public java.lang.Class<V> getValueType(EvaluationContext context, java.lang.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(java.lang.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, java.lang.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, java.lang.Object rootObject) throws EvaluationException
- Specified by:
isWritable
in interfaceExpression
- Throws:
EvaluationException
-
isWritable
public boolean isWritable(java.lang.Object rootObject) throws EvaluationException
- Specified by:
isWritable
in interfaceExpression
- Throws:
EvaluationException
-
setValue
public void setValue(EvaluationContext context, java.lang.Object value) throws EvaluationException
- Specified by:
setValue
in interfaceExpression
- Throws:
EvaluationException
-
setValue
public void setValue(java.lang.Object rootObject, java.lang.Object value) throws EvaluationException
- Specified by:
setValue
in interfaceExpression
- Throws:
EvaluationException
-
setValue
public void setValue(EvaluationContext context, java.lang.Object rootObject, java.lang.Object value) throws EvaluationException
- Specified by:
setValue
in interfaceExpression
- Throws:
EvaluationException
-
getExpressionString
public java.lang.String getExpressionString()
- Specified by:
getExpressionString
in interfaceExpression
-
-