polyglot.ext.coffer.ast
Class CofferClassDecl_c
java.lang.Object
polyglot.ext.jl.ast.Node_c
polyglot.ext.jl.ast.Term_c
polyglot.ext.jl.ast.ClassDecl_c
polyglot.ext.coffer.ast.CofferClassDecl_c
- All Implemented Interfaces:
- ClassDecl, ClassMember, java.lang.Cloneable, CofferClassDecl, Copy, JL, Node, NodeOps, Term, TopLevelDecl
- public class CofferClassDecl_c
- extends ClassDecl_c
- implements CofferClassDecl
An implementation of the CofferClassDecl
interface.
ClassDecl
is extended with a possibly-null key name.
Methods inherited from class polyglot.ext.jl.ast.ClassDecl_c |
acceptCFG, addDefaultConstructor, addDefaultConstructorIfNeeded, addMembers, body, body, buildTypesEnter, defaultConstructorNeeded, disambiguate, disambiguateEnter, disambiguateSuperType, dump, enterScope, entry, flags, flags, interfaces, interfaces, name, name, prettyPrint, prettyPrintFooter, reconstruct, superClass, superClass, toString, type, type, typeCheck |
Methods inherited from class polyglot.ext.jl.ast.Node_c |
addDecls, addMembersEnter, addMembersOverride, buildTypesOverride, childExpectedType, copy, del, del, disambiguateOverride, exceptionCheck, exceptionCheckEnter, exceptionCheckOverride, ext, ext, ext, ext, init, node, position, position, print, printBlock, printSubStmt, throwTypes, 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.ClassDecl |
body, body, flags, flags, interfaces, interfaces, name, name, superClass, superClass, type, type |
Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge |
Methods inherited from interface polyglot.ast.JL |
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
addDecls, addMembers, addMembersEnter, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, typeCheck, typeCheckEnter |
Methods inherited from interface polyglot.util.Copy |
copy |
key
protected KeyNode key
CofferClassDecl_c
public CofferClassDecl_c(Position pos,
Flags flags,
java.lang.String name,
KeyNode key,
TypeNode superClass,
java.util.List interfaces,
ClassBody body)
key
public KeyNode key()
- Specified by:
key
in interface CofferClassDecl
key
public CofferClassDecl key(KeyNode key)
- Specified by:
key
in interface CofferClassDecl
reconstruct
protected CofferClassDecl_c reconstruct(KeyNode key,
TypeNode superClass,
java.util.List interfaces,
ClassBody body)
visitChildren
public Node visitChildren(NodeVisitor v)
- Description copied from interface:
NodeOps
- Visit the children of the node.
- Specified by:
visitChildren
in interface NodeOps
- Overrides:
visitChildren
in class ClassDecl_c
enterScope
public Context enterScope(Context context)
- Description copied from interface:
NodeOps
- Push a new scope upon entering this node, and add any declarations to the
context that should be in scope when visiting children of this node.
This should not update the old context
imperatively. Use
addDecls
when leaving the node
for that.
- Specified by:
enterScope
in interface NodeOps
- Overrides:
enterScope
in class Node_c
- Parameters:
context
- the current Context
- Returns:
- the
Context
to be used for visiting this node.
buildTypes
public Node buildTypes(TypeBuilder tb)
throws SemanticException
- Description copied from interface:
NodeOps
- Collects classes, methods, and fields from the AST rooted at this node
and constructs type objects for these. These type objects may be
ambiguous. Inserts classes into the
TypeSystem
.
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:
buildTypes
in interface NodeOps
- Overrides:
buildTypes
in class ClassDecl_c
- Throws:
SemanticException
prettyPrintHeader
public void prettyPrintHeader(CodeWriter w,
PrettyPrinter tr)
- Overrides:
prettyPrintHeader
in class ClassDecl_c
translate
public void translate(CodeWriter w,
Translator tr)
- Description copied from interface:
NodeOps
- Translate the AST using the given code writer.
- Specified by:
translate
in interface NodeOps
- Overrides:
translate
in class Node_c
superTranslate
public void superTranslate(CodeWriter w,
Translator tr)