|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jltools.ext.jl.ast.Node_c
|
+--jltools.ext.jl.ast.ConstructorDecl_c
A ConstructorDecl is an immutable representation of a
constructor declaration as part of a class body.
| Inner classes inherited from class jltools.ext.jl.ast.Node_c |
Node_c.StringCodeWriter |
| Field Summary | |
protected < |
body
|
protected ConstructorInstance |
ci
|
protected java.util.List |
exceptionTypes
|
protected Flags |
flags
|
protected java.util.List |
formals
|
protected java.lang.String |
name
|
| Fields inherited from class jltools.ext.jl.ast.Node_c |
ext, position |
| Constructor Summary | |
ConstructorDecl_c(Ext ext,
Position pos,
Flags flags,
java.lang.String name,
java.util.List formals,
java.util.List exceptionTypes,
<
|
|
| Method Summary | |
< |
body()
Get the body of the constructor. |
ConstructorDecl |
body(<
Set the body of the constructor. |
Node |
buildTypesOverride_(TypeBuilder tb)
Build type objects for the constructor. |
ConstructorInstance |
constructorInstance()
Get the constructorInstance of the constructor. |
ConstructorDecl |
constructorInstance(ConstructorInstance ci)
Set the constructorInstance of the constructor. |
void |
dump(CodeWriter w)
Dump the AST node for debugging purposes. |
void |
enterScope(Context c)
Adjust the environment on entering the scope of the method. |
Node |
exceptionCheck_(ExceptionChecker ec)
Check exceptions thrown by the constructor. |
java.util.List |
exceptionTypes()
Get the exceptionTypes of the constructor. |
ConstructorDecl |
exceptionTypes(java.util.List exceptionTypes)
Set the exceptionTypes of the constructor. |
Flags |
flags()
Get the flags of the constructor. |
ConstructorDecl |
flags(Flags flags)
Set the flags of the constructor. |
java.util.List |
formals()
Get the formals of the constructor. |
ConstructorDecl |
formals(java.util.List formals)
Set the formals of the constructor. |
void |
leaveScope(Context c)
Adjust the environment on leaving the scope of the method. |
protected ConstructorInstance |
makeConstructorInstance(ClassType ct,
TypeSystem ts)
|
java.lang.String |
name()
Get the name of the constructor. |
ConstructorDecl |
name(java.lang.String name)
Set the name of the constructor. |
ProcedureInstance |
procedureInstance()
Get the procedureInstance of the constructor. |
protected ConstructorDecl_c |
reconstruct(java.util.List formals,
java.util.List exceptionTypes,
<
Reconstruct the constructor. |
Node |
reconstructTypes_(NodeFactory nf,
TypeSystem ts,
Context c)
Reconstruct the type objects for the constructor. |
java.lang.String |
toString()
|
void |
translate_(CodeWriter w,
Translator tr)
Write the constructor to an output file. |
Node |
typeCheck_(TypeChecker tc)
Type check the constructor. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jltools.ast.ConstructorDecl |
body |
| Methods inherited from interface jltools.ast.Node |
buildTypes_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, position, position, typeCheckOverride_, visit |
| Field Detail |
protected Flags flags
protected java.lang.String name
protected java.util.List formals
protected java.util.List exceptionTypes
protected <>Block body
protected ConstructorInstance ci
| Constructor Detail |
public ConstructorDecl_c(Ext ext,
Position pos,
Flags flags,
java.lang.String name,
java.util.List formals,
java.util.List exceptionTypes,
<>Block body)
| Method Detail |
public Flags flags()
flags in interface ConstructorDeclpublic ConstructorDecl flags(Flags flags)
flags in interface ConstructorDeclpublic java.lang.String name()
name in interface ConstructorDeclpublic ConstructorDecl name(java.lang.String name)
name in interface ConstructorDeclpublic java.util.List formals()
formals in interface ConstructorDeclpublic ConstructorDecl formals(java.util.List formals)
formals in interface ConstructorDeclpublic java.util.List exceptionTypes()
exceptionTypes in interface ConstructorDeclpublic ConstructorDecl exceptionTypes(java.util.List exceptionTypes)
exceptionTypes in interface ConstructorDeclpublic <>Block body()
body in interface ConstructorDeclpublic ConstructorDecl body(<>Block body)
public ConstructorInstance constructorInstance()
constructorInstance in interface ConstructorDeclpublic ProcedureInstance procedureInstance()
procedureInstance in interface ProcedureDeclpublic ConstructorDecl constructorInstance(ConstructorInstance ci)
constructorInstance in interface ConstructorDecl
protected ConstructorDecl_c reconstruct(java.util.List formals,
java.util.List exceptionTypes,
<>Block body)
public Node visitChildren(NodeVisitor v)
visitChildren in interface NodevisitChildren in class Node_c
public Node buildTypesOverride_(TypeBuilder tb)
throws SemanticException
buildTypesOverride_ in interface NodebuildTypesOverride_ in class Node_cjltools.ast.Nodecb - The visitor which adds new type objects to the
TypeSystem.public void enterScope(Context c)
NodeenterScope in interface NodeenterScope in class Node_cpublic void leaveScope(Context c)
NodeleaveScope in interface NodeleaveScope in class Node_c
public Node typeCheck_(TypeChecker tc)
throws SemanticException
typeCheck_ in interface NodetypeCheck_ in class Node_c
public Node exceptionCheck_(ExceptionChecker ec)
throws SemanticException
exceptionCheck_ in interface NodeexceptionCheck_ in class Node_cpublic java.lang.String toString()
toString in class Node_c
public void translate_(CodeWriter w,
Translator tr)
translate_ in interface Nodetranslate_ in class Node_cjltools.ast.Nodew - The code writer to which to write.tr - The translation pass. This is not a visitor.public void dump(CodeWriter w)
Nodedump in interface Nodedump in class Node_c
public Node reconstructTypes_(NodeFactory nf,
TypeSystem ts,
Context c)
throws SemanticException
reconstructTypes_ in interface NodereconstructTypes_ in class Node_c
protected ConstructorInstance makeConstructorInstance(ClassType ct,
TypeSystem ts)
throws SemanticException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||