|
|||||||||
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 ConstructorDecl
public ConstructorDecl flags(Flags flags)
flags
in interface ConstructorDecl
public java.lang.String name()
name
in interface ConstructorDecl
public ConstructorDecl name(java.lang.String name)
name
in interface ConstructorDecl
public java.util.List formals()
formals
in interface ConstructorDecl
public ConstructorDecl formals(java.util.List formals)
formals
in interface ConstructorDecl
public java.util.List exceptionTypes()
exceptionTypes
in interface ConstructorDecl
public ConstructorDecl exceptionTypes(java.util.List exceptionTypes)
exceptionTypes
in interface ConstructorDecl
public <>Block body()
body
in interface ConstructorDecl
public ConstructorDecl body(<>Block body)
public ConstructorInstance constructorInstance()
constructorInstance
in interface ConstructorDecl
public ProcedureInstance procedureInstance()
procedureInstance
in interface ProcedureDecl
public 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 Node
visitChildren
in class Node_c
public Node buildTypesOverride_(TypeBuilder tb) throws SemanticException
buildTypesOverride_
in interface Node
buildTypesOverride_
in class Node_c
jltools.ast.Node
cb
- The visitor which adds new type objects to the
TypeSystem
.public void enterScope(Context c)
Node
enterScope
in interface Node
enterScope
in class Node_c
public void leaveScope(Context c)
Node
leaveScope
in interface Node
leaveScope
in class Node_c
public Node typeCheck_(TypeChecker tc) throws SemanticException
typeCheck_
in interface Node
typeCheck_
in class Node_c
public Node exceptionCheck_(ExceptionChecker ec) throws SemanticException
exceptionCheck_
in interface Node
exceptionCheck_
in class Node_c
public java.lang.String toString()
toString
in class Node_c
public void translate_(CodeWriter w, Translator tr)
translate_
in interface Node
translate_
in class Node_c
jltools.ast.Node
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.public void dump(CodeWriter w)
Node
dump
in interface Node
dump
in class Node_c
public Node reconstructTypes_(NodeFactory nf, TypeSystem ts, Context c) throws SemanticException
reconstructTypes_
in interface Node
reconstructTypes_
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 |