Class ELNodes

java.lang.Object
io.micronaut.el.parser.ELNodes

public final class ELNodes extends Object
Utilities over the parsed form of an expression.
Since:
1.0
Author:
Denis Stepanov
  • Method Details

    • canonical

      public static String canonical(ELNode node)
      Renders a parsed expression in a canonical form, so that two expressions that differ only in whitespace, in the delimiters or in the spelling of an operator render identically.

      The canonical form is what jakarta.el.Expression.equals compares, which the specification defines as representing the same expression "taking whitespace and operator aliases into account". Every sub-expression is parenthesised, so precedence never has to be reconstructed.

      Parameters:
      node - The parsed expression
      Returns:
      The canonical form