Class ExpressionVariable

java.lang.Object
org.springframework.binding.expression.ExpressionVariable

public class ExpressionVariable extends Object
An expression variable.
Author:
Keith Donald
  • Constructor Details

    • ExpressionVariable

      public ExpressionVariable(String name, String valueExpression)
      Creates a new expression variable.
      Parameters:
      name - the name of the variable, acting as an convenient alias (required)
      valueExpression - the value expression (required)
    • ExpressionVariable

      public ExpressionVariable(String name, String valueExpression, ParserContext parserContext)
      Creates a new expression variable with a populated parser context.
      Parameters:
      name - the name of the variable, acting as an convenient alias (required)
      valueExpression - the value expression (required)
      parserContext - the parser context to use to parse the value expression (optional)
  • Method Details

    • getName

      public String getName()
      Returns the variable name.
      Returns:
      the variable name
    • getValueExpression

      public String getValueExpression()
      Returns the expression that will be evaluated when the variable is referenced by its name in another expression.
      Returns:
      the expression value.
    • getParserContext

      public ParserContext getParserContext()
      Returns the parser context to use to parse the variable's value expression.
      Returns:
      the value expression parser context
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object