Class ExpressionUtils


  • public final class ExpressionUtils
    extends java.lang.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 Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      static int hashCode​(org.apache.el.parser.Node node, FunctionMapper mapper)
      Hash a parsed expression and the functions it references.
      • Methods inherited from class java.lang.Object

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

      • 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