Class Java.Literal

All Implemented Interfaces:
Java.ArrayInitializerOrRvalue, Java.ElementValue, Java.Locatable
Direct Known Subclasses:
Java.BooleanLiteral, Java.CharacterLiteral, Java.FloatingPointLiteral, Java.IntegerLiteral, Java.NullLiteral, Java.StringLiteral
Enclosing class:
Java

public abstract static class Java.Literal extends Java.Rvalue
Abstract base class for the various Java literals; see JLS7 3.10.
  • Field Details

    • value

      public final String value
      The text of the literal token, as in the source code.

      For true, false and null, this string value is guaranteed to be interned, so it can safely be reference-compared with other interned strings.

  • Constructor Details

    • Literal

      public Literal(Location location, String value)
      Parameters:
      value - The text of the literal token, as in the source code
  • Method Details