public class JL5EnumDeclExt extends JL5ClassDeclExt
paramTypes
annotations
Constructor and Description |
---|
JL5EnumDeclExt() |
JL5EnumDeclExt(java.util.List<AnnotationElem> annotations) |
Modifier and Type | Method and Description |
---|---|
Node |
addDefaultConstructor(TypeSystem ts,
NodeFactory nf,
ConstructorInstance defaultCI) |
Node |
addEnumMethodTypesIfNeeded(TypeSystem ts) |
ClassDecl |
addValueOfMethodType(TypeSystem ts) |
ClassDecl |
addValuesMethodType(TypeSystem ts) |
Node |
buildTypes(TypeBuilder tb)
Collects classes, methods, and fields from the AST rooted at this node
and constructs type objects for these.
|
void |
prettyPrint(CodeWriter w,
PrettyPrinter tr)
Pretty-print the AST using the given
CodeWriter . |
Node |
typeCheck(TypeChecker tc)
Type check the AST.
|
NodeVisitor |
typeCheckEnter(TypeChecker tc)
Type check the AST.
|
annotationCheck, declaration, enterChildScope, node, paramTypes, paramTypes, paramTypes, prettyPrintFooter, prettyPrintHeader, prettyPrintHeaderRest, prettyPrintModifiers, prettyPrintName, setAnnotations, visitChildren
annotationElems, annotationElems, annotationElems
acceptCFG, firstChild
addDecls, buildTypesEnter, checkConstants, childExpectedType, copy, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, dump, enterScope, exceptionCheck, exceptionCheckEnter, ext, ext, extRewrite, extRewriteEnter, init, initPred, pred, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, superLang, throwTypes, toString, typeCheckOverride, visitChild, visitList
public JL5EnumDeclExt()
public JL5EnumDeclExt(java.util.List<AnnotationElem> annotations)
public ClassDecl addValueOfMethodType(TypeSystem ts)
public ClassDecl addValuesMethodType(TypeSystem ts)
public Node addEnumMethodTypesIfNeeded(TypeSystem ts)
public Node buildTypes(TypeBuilder tb) throws SemanticException
NodeOps
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.buildTypes
in interface NodeOps
buildTypes
in class JL5ClassDeclExt
tb
- The visitor which adds new type objects to the
TypeSystem
.SemanticException
public NodeVisitor typeCheckEnter(TypeChecker tc) throws SemanticException
NodeOps
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.typeCheckEnter
in interface NodeOps
typeCheckEnter
in class Ext_c
tc
- The type checking visitor.SemanticException
public Node typeCheck(TypeChecker tc) throws SemanticException
NodeOps
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.typeCheck
in interface NodeOps
typeCheck
in class JL5ClassDeclExt
tc
- The type checking visitor.SemanticException
public Node addDefaultConstructor(TypeSystem ts, NodeFactory nf, ConstructorInstance defaultCI) throws SemanticException
addDefaultConstructor
in interface ClassDeclOps
addDefaultConstructor
in class JL5ClassDeclExt
SemanticException
public void prettyPrint(CodeWriter w, PrettyPrinter tr)
NodeOps
CodeWriter
.prettyPrint
in interface NodeOps
prettyPrint
in class JL5ClassDeclExt
w
- The code writer to which to write.tr
- The pretty printer. This is not a visitor.