polyglot.ext.jl.ast
Class Lit_c

java.lang.Object
  extended by polyglot.ext.jl.ast.Node_c
      extended by polyglot.ext.jl.ast.Term_c
          extended by polyglot.ext.jl.ast.Expr_c
              extended by polyglot.ext.jl.ast.Lit_c
All Implemented Interfaces:
java.lang.Cloneable, Expr, JL, Lit, Node, NodeOps, Prefix, Receiver, Term, Typed, Copy
Direct Known Subclasses:
BooleanLit_c, ClassLit_c, FloatLit_c, NullLit_c, NumLit_c, StringLit_c

public abstract class Lit_c
extends Expr_c
implements Lit

Lit represents any Java literal.


Field Summary
 
Fields inherited from class polyglot.ext.jl.ast.Expr_c
type
 
Fields inherited from class polyglot.ext.jl.ast.Term_c
exceptions, reachable
 
Fields inherited from class polyglot.ext.jl.ast.Node_c
del, ext, position
 
Constructor Summary
Lit_c(Position pos)
           
 
Method Summary
 java.util.List acceptCFG(CFGBuilder v, java.util.List succs)
          Visit this term in evaluation order.
abstract  java.lang.Object constantValue()
          Returns the constant value of the expression, if any.
 Term entry()
          Return the first (sub)term performed when evaluating this term.
 boolean isConstant()
          Return whether the expression evaluates to a constant.
 Precedence precedence()
          Get the precedence of the expression.
 
Methods inherited from class polyglot.ext.jl.ast.Expr_c
booleanValue, buildTypes, byteValue, charValue, doubleValue, dump, floatValue, intValue, longValue, printSubExpr, printSubExpr, shortValue, stringValue, type, type
 
Methods inherited from class polyglot.ext.jl.ast.Term_c
exceptionCheck, exceptions, exceptions, listEntry, reachable, reachable
 
Methods inherited from class polyglot.ext.jl.ast.Node_c
addDecls, addMembers, addMembersEnter, addMembersOverride, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguate, disambiguateEnter, disambiguateOverride, enterScope, enterScope, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, prettyPrint, print, printBlock, printSubStmt, throwTypes, toString, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, visitChildren, visitEdge, visitList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface polyglot.ast.Expr
printSubExpr, printSubExpr, type
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 
Methods inherited from interface polyglot.ast.Typed
type
 
Methods inherited from interface polyglot.ast.Term
exceptions, exceptions, reachable, reachable
 

Constructor Detail

Lit_c

public Lit_c(Position pos)
Method Detail

precedence

public Precedence precedence()
Get the precedence of the expression.

Specified by:
precedence in interface Expr
Overrides:
precedence in class Expr_c

entry

public Term entry()
Return the first (sub)term performed when evaluating this term.

Specified by:
entry in interface Term
Specified by:
entry in class Term_c

acceptCFG

public java.util.List acceptCFG(CFGBuilder v,
                                java.util.List succs)
Visit this term in evaluation order.

Specified by:
acceptCFG in interface Term
Specified by:
acceptCFG in class Term_c

isConstant

public boolean isConstant()
Description copied from interface: Expr
Return whether the expression evaluates to a constant. This is not valid until after disambiguation.

Specified by:
isConstant in interface Expr
Overrides:
isConstant in class Expr_c

constantValue

public abstract java.lang.Object constantValue()
Description copied from interface: Expr
Returns the constant value of the expression, if any.

Specified by:
constantValue in interface Expr
Overrides:
constantValue in class Expr_c