类 Literal

java.lang.Object
cn.taketoday.expression.spel.ast.SpelNodeImpl
cn.taketoday.expression.spel.ast.Literal
所有已实现的接口:
Opcodes, SpelNode
直接已知子类:
BooleanLiteral, FloatLiteral, IntLiteral, LongLiteral, NullLiteral, RealLiteral, StringLiteral

public abstract class Literal extends SpelNodeImpl
Common superclass for nodes representing literals (boolean, string, number, etc).
作者:
Andy Clement, Juergen Hoeller
  • 构造器详细资料

    • Literal

      public Literal(@Nullable String originalValue, int startPos, int endPos)
  • 方法详细资料

    • getOriginalValue

      @Nullable public final String getOriginalValue()
    • getValueInternal

      public final TypedValue getValueInternal(ExpressionState state) throws SpelEvaluationException
      指定者:
      getValueInternal 在类中 SpelNodeImpl
      抛出:
      SpelEvaluationException
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • toStringAST

      public String toStringAST()
      从接口复制的说明: SpelNode
      Return the string form the this AST node.
      返回:
      the string form
    • getLiteralValue

      public abstract TypedValue getLiteralValue()
    • getIntLiteral

      public static Literal getIntLiteral(String numberToken, int startPos, int endPos, 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(String numberToken, int startPos, int endPos, int radix)
    • getRealLiteral

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