AST
node type Literal

General Info

Production
Literal : PrimaryExpr ::= <LITERAL:String>;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Expr
              extended by AST.PrimaryExpr
                  extended by AST.Literal
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>
Direct Known Subclasses:
BooleanLiteral, CharacterLiteral, IllegalLiteral, NullLiteral, NumericLiteral, StringLiteral

Description

The abstract base class for all literals.
Source
Declared in Java7Frontend/Literals.ast at line 4

Member Filters

API level:

Aspect:

Constructors

public Literal()
 
public Literal(java.lang.String p0)
 
public Literal(beaver.Symbol p0)
 

Attributes

Overrides:constant in class Expr
Source
Declared in Java7Frontend/ConstantExpression.jrag at line 96
Aspect
ConstantExpression
syn boolean isConstant()
Overrides:isConstant in class Expr
Source
Declared in Java7Frontend/ConstantExpression.jrag at line 336
Aspect
ConstantExpression
syn java.lang.String dumpString()
Overrides:dumpString in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 800
Aspect
PrettyPrint

Methods

public void flushCache()
Overrides:flushCache in class PrimaryExpr
public void flushCollectionCache()
Overrides:flushCollectionCache in class PrimaryExpr
public Literal clone()
              throws java.lang.CloneNotSupportedException
Overrides:clone in class PrimaryExpr
Throws:
java.lang.CloneNotSupportedException
public static Literal buildBooleanLiteral(boolean value)
Source
Declared in Java1.4Frontend/BytecodeCONSTANT.jrag at line 75
Aspect
BytecodeCONSTANT
public static Literal buildStringLiteral(java.lang.String value)
Source
Declared in Java1.4Frontend/BytecodeCONSTANT.jrag at line 79
Aspect
BytecodeCONSTANT
public void toString(java.lang.StringBuffer s)
Overrides:toString in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 263
Aspect
PrettyPrint
protected static java.lang.String escape(java.lang.String s)
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 290
Aspect
PrettyPrint
protected static java.lang.String asEscape(int value)
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 312
Aspect
PrettyPrint
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 550
Aspect
CodeGeneration
public void createBCode(CodeGeneration gen)
Overrides:createBCode in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 207
Aspect
CreateBCode
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class PrimaryExpr
protected int numChildren()
Overrides:numChildren in class PrimaryExpr
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class PrimaryExpr
public void setLITERAL(java.lang.String value)
Replaces the lexeme LITERAL.
Parameters:
value - The new value for the lexeme LITERAL.
public void setLITERAL(beaver.Symbol symbol)
JastAdd-internal setter for lexeme LITERAL using the Beaver parser.
public java.lang.String getLITERAL()
Retrieves the value for the lexeme LITERAL.
Returns:
The value for the lexeme LITERAL.
public static Literal buildDoubleLiteral(double value)
Returns:
a fresh double literal representing the given value
Source
Declared in Java7Frontend/Literals.jrag at line 50
Aspect
Literals
public static Literal buildFloatLiteral(float value)
Returns:
a fresh float literal representing the given value
Source
Declared in Java7Frontend/Literals.jrag at line 62
Aspect
Literals
public static Literal buildIntegerLiteral(int value)
Returns:
a fresh integer literal representing the given value
Source
Declared in Java7Frontend/Literals.jrag at line 74
Aspect
Literals
public static Literal buildLongLiteral(long value)
Returns:
a fresh long literal representing the given value
Source
Declared in Java7Frontend/Literals.jrag at line 86
Aspect
Literals
Overrides:rewriteTo in class PrimaryExpr

Fields

protected java.lang.String tokenString_LITERAL
public int LITERALstart
public int LITERALend
protected boolean constant_computed

Inherited Members

Attributes inherited from AST.Expr

Attributes inherited from AST.ASTNode

Methods inherited from class AST.Expr

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Fields inherited from AST.Expr

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value