|
|||||||||
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.MethodDecl_c
A method declaration.
Inner classes inherited from class jltools.ext.jl.ast.Node_c |
Node_c.StringCodeWriter |
Field Summary | |
protected < |
body
|
protected java.util.List |
exceptionTypes
|
protected Flags |
flags
|
protected java.util.List |
formals
|
protected MethodInstance |
mi
|
protected java.lang.String |
name
|
protected TypeNode |
returnType
|
Fields inherited from class jltools.ext.jl.ast.Node_c |
ext, position |
Constructor Summary | |
MethodDecl_c(Ext ext,
Position pos,
Flags flags,
TypeNode returnType,
java.lang.String name,
java.util.List formals,
java.util.List exceptionTypes,
<
|
Method Summary | |
< |
body()
Get the body of the method. |
MethodDecl |
body(<
Set the body of the method. |
Node |
buildTypesOverride_(TypeBuilder tb)
Build type objects for the method. |
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 method. |
java.util.List |
exceptionTypes()
Get the exception types of the method. |
MethodDecl |
exceptionTypes(java.util.List exceptionTypes)
Set the exception types of the method. |
Flags |
flags()
Get the flags of the method. |
MethodDecl |
flags(Flags flags)
Set the flags of the method. |
java.util.List |
formals()
Get the formals of the method. |
MethodDecl |
formals(java.util.List formals)
Set the formals of the method. |
void |
leaveScope(Context c)
Adjust the environment on leaving the scope of the method. |
protected MethodInstance |
makeMethodInstance(ClassType ct,
TypeSystem ts)
|
MethodInstance |
methodInstance()
Get the method instance of the method. |
MethodDecl |
methodInstance(MethodInstance mi)
Set the method instance of the method. |
java.lang.String |
name()
Get the name of the method. |
MethodDecl |
name(java.lang.String name)
Set the name of the method. |
ProcedureInstance |
procedureInstance()
Get the procedure instance of the method. |
protected MethodDecl_c |
reconstruct(TypeNode returnType,
java.util.List formals,
java.util.List exceptionTypes,
<
Reconstruct the method. |
Node |
reconstructTypes_(NodeFactory nf,
TypeSystem ts,
Context c)
Reconstruct the type objects for the method. |
TypeNode |
returnType()
Get the return type of the method. |
MethodDecl |
returnType(TypeNode returnType)
Set the return type of the method. |
java.lang.String |
toString()
|
void |
translate_(CodeWriter w,
Translator tr)
Write the method to an output file. |
Node |
typeCheck_(TypeChecker tc)
Type check the method. |
Node |
visitChildren(NodeVisitor v)
Visit the children of the method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jltools.ast.MethodDecl |
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 TypeNode returnType
protected java.lang.String name
protected java.util.List formals
protected java.util.List exceptionTypes
protected <>Block body
protected MethodInstance mi
Constructor Detail |
public MethodDecl_c(Ext ext, Position pos, Flags flags, TypeNode returnType, java.lang.String name, java.util.List formals, java.util.List exceptionTypes, <>Block body)
Method Detail |
public Flags flags()
flags
in interface MethodDecl
public MethodDecl flags(Flags flags)
flags
in interface MethodDecl
public TypeNode returnType()
returnType
in interface MethodDecl
public MethodDecl returnType(TypeNode returnType)
returnType
in interface MethodDecl
public java.lang.String name()
name
in interface MethodDecl
public MethodDecl name(java.lang.String name)
name
in interface MethodDecl
public java.util.List formals()
formals
in interface MethodDecl
public MethodDecl formals(java.util.List formals)
formals
in interface MethodDecl
public java.util.List exceptionTypes()
exceptionTypes
in interface MethodDecl
public MethodDecl exceptionTypes(java.util.List exceptionTypes)
exceptionTypes
in interface MethodDecl
public <>Block body()
body
in interface MethodDecl
public MethodDecl body(<>Block body)
public MethodInstance methodInstance()
methodInstance
in interface MethodDecl
public MethodDecl methodInstance(MethodInstance mi)
methodInstance
in interface MethodDecl
public ProcedureInstance procedureInstance()
procedureInstance
in interface ProcedureDecl
protected MethodDecl_c reconstruct(TypeNode returnType, 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 MethodInstance makeMethodInstance(ClassType ct, TypeSystem ts) throws SemanticException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |