polyglot.ext.jl.ast
Class LocalClassDecl_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.Stmt_c
              extended by polyglot.ext.jl.ast.LocalClassDecl_c
All Implemented Interfaces:
java.lang.Cloneable, CompoundStmt, JL, LocalClassDecl, Node, NodeOps, Stmt, Term, Copy

public class LocalClassDecl_c
extends Stmt_c
implements LocalClassDecl

A local class declaration statement. The node is just a wrapper around a class declaration.


Field Summary
protected  ClassDecl decl
           
 
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
LocalClassDecl_c(Position pos, ClassDecl decl)
           
 
Method Summary
 java.util.List acceptCFG(CFGBuilder v, java.util.List succs)
          Visit this term in evaluation order.
 void addDecls(Context c)
          Add any declarations to the context that should be in scope when visiting later sibling nodes.
 ClassDecl decl()
          Get the class declaration.
 LocalClassDecl decl(ClassDecl decl)
          Set the class declaration.
 Node disambiguate(AmbiguityRemover ar)
          Remove any remaining ambiguities from the AST.
 NodeVisitor disambiguateEnter(AmbiguityRemover ar)
          Remove any remaining ambiguities from the AST.
 Term entry()
          Return the first (sub)term performed when evaluating this term.
 void prettyPrint(CodeWriter w, PrettyPrinter tr)
          Write the statement to an output file.
protected  LocalClassDecl_c reconstruct(ClassDecl decl)
          Reconstruct the statement.
 java.lang.String toString()
           
 Node visitChildren(NodeVisitor v)
          Visit the children of the statement.
 
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
addMembers, addMembersEnter, addMembersOverride, buildTypes, buildTypesEnter, buildTypesOverride, childExpectedType, copy, del, del, disambiguateOverride, dump, enterScope, enterScope, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visit, visitChild, 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.Term
exceptions, exceptions, reachable, reachable
 
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
addMembers, addMembersEnter, buildTypes, buildTypesEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, throwTypes, translate, typeCheck, typeCheckEnter
 
Methods inherited from interface polyglot.util.Copy
copy
 

Field Detail

decl

protected ClassDecl decl
Constructor Detail

LocalClassDecl_c

public LocalClassDecl_c(Position pos,
                        ClassDecl decl)
Method Detail

decl

public ClassDecl decl()
Get the class declaration.

Specified by:
decl in interface LocalClassDecl

decl

public LocalClassDecl decl(ClassDecl decl)
Set the class declaration.


reconstruct

protected LocalClassDecl_c reconstruct(ClassDecl decl)
Reconstruct the statement.


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

visitChildren

public Node visitChildren(NodeVisitor v)
Visit the children of the statement.

Specified by:
visitChildren in interface NodeOps
Overrides:
visitChildren in class Node_c
Parameters:
v - The visitor that will traverse/rewrite the AST.
Returns:
A new AST if a change was made, or this.

addDecls

public void addDecls(Context c)
Description copied from class: Node_c
Add any declarations to the context that should be in scope when visiting later sibling nodes.

Specified by:
addDecls in interface NodeOps
Overrides:
addDecls in class Node_c
Parameters:
c - The context to which to add declarations.

disambiguateEnter

public NodeVisitor disambiguateEnter(AmbiguityRemover ar)
                              throws SemanticException
Description copied from interface: NodeOps
Remove any remaining ambiguities from the AST. This method is called by the enter() method of the visitor. The * method should perform work that should be done before visiting the children of the node. The method may return this or a new copy of the node on which visitChildren() and leave() will be invoked.

Specified by:
disambiguateEnter in interface NodeOps
Overrides:
disambiguateEnter in class Node_c
Parameters:
ar - The visitor which disambiguates.
Throws:
SemanticException

disambiguate

public Node disambiguate(AmbiguityRemover ar)
                  throws SemanticException
Description copied from interface: NodeOps
Remove any remaining ambiguities from the AST. This method is called by the leave() method of the visitor. The method should perform work that should be done after visiting the children of the node. The method may return this or a new copy of the node which will be installed as a child of the node's parent.

Specified by:
disambiguate in interface NodeOps
Overrides:
disambiguate in class Node_c
Parameters:
ar - The visitor which disambiguates.
Throws:
SemanticException

toString

public java.lang.String toString()
Overrides:
toString in class Node_c

prettyPrint

public void prettyPrint(CodeWriter w,
                        PrettyPrinter tr)
Write the statement to an output file.

Specified by:
prettyPrint in interface NodeOps
Overrides:
prettyPrint in class Node_c
Parameters:
w - The code writer to which to write.
tr - The pretty printer. This is not a visitor.