Class Literal

    • Constructor Detail

      • Literal

        public Literal(@Nullable
                       java.lang.String originalValue,
                       int pos)
    • Method Detail

      • getOriginalValue

        public final java.lang.String getOriginalValue()
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • toStringAST

        public java.lang.String toStringAST()
        Description copied from interface: SpelNode
        Return the string form the this AST node.
        the string form
      • getLiteralValue

        public abstract TypedValue getLiteralValue()
      • getIntLiteral

        public static Literal getIntLiteral(java.lang.String numberToken,
                                            int pos,
                                            int radix)
        Process the string form of a number, using the specified base if supplied and return an appropriate literal to hold it. Any suffix to indicate a long will be taken into account (either 'l' or 'L' is supported).
        numberToken - the token holding the number as its payload (eg. 1234 or 0xCAFE)
        radix - the base of number
        a subtype of Literal that can represent it
      • getLongLiteral

        public static Literal getLongLiteral(java.lang.String numberToken,
                                             int pos,
                                             int radix)
      • getRealLiteral

        public static Literal getRealLiteral(java.lang.String numberToken,
                                             int pos,
                                             boolean isFloat)