Class ExpressionAbstract

  • All Implemented Interfaces:
    Expression
    Direct Known Subclasses:
    DefaultExpression, FunctionImpl

    public abstract class ExpressionAbstract
    extends Object
    implements Expression
    Abstract superclass of these Expression implementations.
    Author:
    Jody Garnett
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object evaluate​(Object object)
      Subclass should override, default implementation returns null.
      <T> T evaluate​(Object object, Class<T> context)
      Default implementation delegates handling of context conversion to Converters utility class.
      • Methods inherited from class Object

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

      • ExpressionAbstract

        public ExpressionAbstract()
    • Method Detail

      • evaluate

        public Object evaluate​(Object object)
        Subclass should override, default implementation returns null.
        Specified by:
        evaluate in interface Expression
        Returns:
        default implementation returns null
      • evaluate

        public <T> T evaluate​(Object object,
                              Class<T> context)
        Default implementation delegates handling of context conversion to Converters utility class.

        Subclasses are expected to make use of the Converters utility class (as the easiest way to provide value morphing in conformance with the Filter specification).

        Specified by:
        evaluate in interface Expression
        Type Parameters:
        T - The type of the returned object.
        Parameters:
        object - The object to evaluate the expression against.
        context - The type of the resulting value of the expression.
        Returns:
        Evaluates the given expression based on the content of the given object an an instance of context.