Class SingleResponseValueSource

  • All Implemented Interfaces:
    ValueSource

    public class SingleResponseValueSource
    extends java.lang.Object
    implements ValueSource
    If the expression matches, simply return the response object.
    Since:
    1.12
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String expression  
      private java.lang.Object response  
    • Constructor Summary

      Constructors 
      Constructor Description
      SingleResponseValueSource​(java.lang.String expression, java.lang.Object response)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearFeedback()
      Clear the feedback accumulated by a prior interpolation run.
      java.util.List getFeedback()
      Return the feedback about resolution failures for a particular expression.
      java.lang.Object getValue​(java.lang.String expression)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • expression

        private final java.lang.String expression
      • response

        private final java.lang.Object response
    • Constructor Detail

      • SingleResponseValueSource

        public SingleResponseValueSource​(java.lang.String expression,
                                         java.lang.Object response)
    • Method Detail

      • clearFeedback

        public void clearFeedback()
        Description copied from interface: ValueSource
        Clear the feedback accumulated by a prior interpolation run.
        Specified by:
        clearFeedback in interface ValueSource
      • getFeedback

        public java.util.List getFeedback()
        Description copied from interface: ValueSource
        Return the feedback about resolution failures for a particular expression.
        Specified by:
        getFeedback in interface ValueSource
        Returns:
        a combination of String and Throwable instances, where strings related to throwables are listed first.
      • getValue

        public java.lang.Object getValue​(java.lang.String expression)
        Specified by:
        getValue in interface ValueSource
        Parameters:
        expression - The string expression.
        Returns:
        the value related to the expression, or null if not found.