public abstract class

Literal

extends SpelNodeImpl
java.lang.Object
   ↳ org.springframework.expression.spel.ast.SpelNodeImpl
     ↳ org.springframework.expression.spel.ast.Literal
Known Direct Subclasses

Class Overview

Common superclass for nodes representing literals (boolean, string, number, etc).

Summary

Fields
protected String literalValue
[Expand]
Inherited Fields
From class org.springframework.expression.spel.ast.SpelNodeImpl
Public Constructors
Literal(String payload, int pos)
Public Methods
static Literal getIntLiteral(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.
abstract TypedValue getLiteralValue()
static Literal getLongLiteral(String numberToken, int pos, int radix)
static Literal getRealLiteral(String numberToken, int pos, boolean isFloat)
final TypedValue getValueInternal(ExpressionState state)
String toString()
String toStringAST()
[Expand]
Inherited Methods
From class org.springframework.expression.spel.ast.SpelNodeImpl
From class java.lang.Object
From interface org.springframework.expression.spel.SpelNode

Fields

protected String literalValue

Public Constructors

public Literal (String payload, int pos)

Public Methods

public static Literal getIntLiteral (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).

Parameters
numberToken the token holding the number as its payload (eg. 1234 or 0xCAFE)
radix the base of number
Returns
  • a subtype of Literal that can represent it

public abstract TypedValue getLiteralValue ()

public static Literal getLongLiteral (String numberToken, int pos, int radix)

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

public final TypedValue getValueInternal (ExpressionState state)

public String toString ()

public String toStringAST ()