Class ELLiterals

java.lang.Object
io.micronaut.el.runtime.ELLiterals

@Internal public final class ELLiterals extends Object
The handling of the literal-expressions described in the section 1.2.2 of the Jakarta Expression Language specification.
Since:
1.0
Author:
Denis Stepanov
  • Method Details

    • literalTextOrNull

      public static @Nullable String literalTextOrNull(String expression)
      Returns the text of a literal-expression, with the \$ and \# escapes resolved.
      Parameters:
      expression - The expression
      Returns:
      The literal text or null when the expression contains an eval-expression
    • integerValue

      public static Number integerValue(String image)
      Returns the value of an integer literal, which is a Long unless it does not fit in one.
      Parameters:
      image - The literal as it appears in the expression
      Returns:
      The value of the literal
    • floatingPointValue

      public static Number floatingPointValue(String image)
      Returns the value of a floating point literal, which is a Double unless it does not fit in one.
      Parameters:
      image - The literal as it appears in the expression
      Returns:
      The value of the literal