Class ExpressionUtils

java.lang.Object
org.apache.el.util.ExpressionUtils

public final class ExpressionUtils extends Object
Compares expression trees using their captured function mappings. Parsed nodes are shared between expressions, so function mappings must be considered separately rather than stored on the nodes.
  • Method Details

    • equals

      public static boolean equals(org.apache.el.parser.Node first, FunctionMapper firstMapper, org.apache.el.parser.Node second, FunctionMapper secondMapper)
      Compare parsed expressions and the functions they reference.
      Parameters:
      first - First expression tree
      firstMapper - First expression's captured function mapper
      second - Second expression tree
      secondMapper - Second expression's captured function mapper
      Returns:
      true if the expressions have identical parsed representations and function mappings
    • hashCode

      public static int hashCode(org.apache.el.parser.Node node, FunctionMapper mapper)
      Hash a parsed expression and the functions it references.
      Parameters:
      node - Expression tree
      mapper - Expression's captured function mapper
      Returns:
      Hash consistent with function-aware expression equality