Class ValueExpression<V>

java.lang.Object
org.springframework.amqp.rabbit.support.ValueExpression<V>
Type Parameters:
V - - The expected value type.
All Implemented Interfaces:
org.springframework.expression.Expression

public class ValueExpression<V> extends Object implements org.springframework.expression.Expression
A very simple hardcoded implementation of the Expression interface that represents an immutable value. It is used as value holder in the context of expression evaluation.
Since:
1.4
  • Constructor Details

    • ValueExpression

      public ValueExpression(V value)
  • Method Details

    • getValue

      public V getValue() throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValue

      public V getValue(Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValue

      public V getValue(org.springframework.expression.EvaluationContext context) throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValue

      public V getValue(org.springframework.expression.EvaluationContext context, Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValue

      public <T> T getValue(Object rootObject, Class<T> desiredResultType) throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValue

      public <T> T getValue(Class<T> desiredResultType) throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValue

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

      public <T> T getValue(org.springframework.expression.EvaluationContext context, Class<T> desiredResultType) throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueType

      public Class<V> getValueType() throws org.springframework.expression.EvaluationException
      Specified by:
      getValueType in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueType

      public Class<V> getValueType(Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      getValueType in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueType

      public Class<V> getValueType(org.springframework.expression.EvaluationContext context) throws org.springframework.expression.EvaluationException
      Specified by:
      getValueType in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueType

      public Class<V> getValueType(org.springframework.expression.EvaluationContext context, Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      getValueType in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueTypeDescriptor

      public org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor() throws org.springframework.expression.EvaluationException
      Specified by:
      getValueTypeDescriptor in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueTypeDescriptor

      public org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor(Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      getValueTypeDescriptor in interface org.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:
      getValueTypeDescriptor in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueTypeDescriptor

      public org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor(org.springframework.expression.EvaluationContext context, Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      getValueTypeDescriptor in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • isWritable

      public boolean isWritable(org.springframework.expression.EvaluationContext context) throws org.springframework.expression.EvaluationException
      Specified by:
      isWritable in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • isWritable

      public boolean isWritable(org.springframework.expression.EvaluationContext context, Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      isWritable in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • isWritable

      public boolean isWritable(Object rootObject) throws org.springframework.expression.EvaluationException
      Specified by:
      isWritable in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • setValue

      public void setValue(org.springframework.expression.EvaluationContext context, Object value) throws org.springframework.expression.EvaluationException
      Specified by:
      setValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • setValue

      public void setValue(Object rootObject, Object value) throws org.springframework.expression.EvaluationException
      Specified by:
      setValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • setValue

      public void setValue(org.springframework.expression.EvaluationContext context, Object rootObject, Object value) throws org.springframework.expression.EvaluationException
      Specified by:
      setValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getExpressionString

      public String getExpressionString()
      Specified by:
      getExpressionString in interface org.springframework.expression.Expression