Class ValueExpression<V>

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

public class ValueExpression<V>
extends java.lang.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:
4.0
  • Constructor Summary

    Constructors 
    Constructor Description
    ValueExpression​(V value)  
  • Method Summary

    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​(org.springframework.expression.EvaluationContext context)  
    <T> T getValue​(org.springframework.expression.EvaluationContext context, java.lang.Class<T> desiredResultType)  
    V getValue​(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)  
    <T> T getValue​(org.springframework.expression.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​(org.springframework.expression.EvaluationContext context)  
    java.lang.Class<V> getValueType​(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)  
    org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor()  
    org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor​(java.lang.Object rootObject)  
    org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor​(org.springframework.expression.EvaluationContext context)  
    org.springframework.core.convert.TypeDescriptor getValueTypeDescriptor​(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)  
    boolean isWritable​(java.lang.Object rootObject)  
    boolean isWritable​(org.springframework.expression.EvaluationContext context)  
    boolean isWritable​(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject)  
    void setValue​(java.lang.Object rootObject, java.lang.Object value)  
    void setValue​(org.springframework.expression.EvaluationContext context, java.lang.Object value)  
    void setValue​(org.springframework.expression.EvaluationContext context, java.lang.Object rootObject, java.lang.Object value)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • 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​(java.lang.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, java.lang.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​(java.lang.Object rootObject, java.lang.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​(java.lang.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, java.lang.Object rootObject, java.lang.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, java.lang.Class<T> desiredResultType) throws org.springframework.expression.EvaluationException
      Specified by:
      getValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getValueType

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

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

      public java.lang.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 java.lang.Class<V> getValueType​(org.springframework.expression.EvaluationContext context, java.lang.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​(java.lang.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, java.lang.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, java.lang.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​(java.lang.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, java.lang.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​(java.lang.Object rootObject, java.lang.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, java.lang.Object rootObject, java.lang.Object value) throws org.springframework.expression.EvaluationException
      Specified by:
      setValue in interface org.springframework.expression.Expression
      Throws:
      org.springframework.expression.EvaluationException
    • getExpressionString

      public java.lang.String getExpressionString()
      Specified by:
      getExpressionString in interface org.springframework.expression.Expression
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object