Class Expression

java.lang.Object
jakarta.el.Expression
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MethodExpression, ValueExpression

public abstract class Expression extends Object implements Serializable
Base class for EL expression objects. An Expression represents a compiled EL expression that can be evaluated. Subclasses include ValueExpression and MethodExpression.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an Expression.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract boolean
     
    abstract String
    Returns the original string representation of this EL expression as it was parsed.
    abstract int
     
    abstract boolean
    Returns whether this expression is a literal text expression, meaning it does not contain any variables, functions, or operators and evaluates to a constant value.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Expression

      public Expression()
      Constructs an Expression. Subclasses should invoke this constructor to initialize the base expression state.
  • Method Details

    • getExpressionString

      public abstract String getExpressionString()
      Returns the original string representation of this EL expression as it was parsed.
      Returns:
      the string representation of this expression
    • equals

      public abstract boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object
    • isLiteralText

      public abstract boolean isLiteralText()
      Returns whether this expression is a literal text expression, meaning it does not contain any variables, functions, or operators and evaluates to a constant value.
      Returns:
      true if this expression is a literal text, false otherwise