|
|||||||||
| 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 MethodDeclpublic MethodDecl flags(Flags flags)
flags in interface MethodDeclpublic TypeNode returnType()
returnType in interface MethodDeclpublic MethodDecl returnType(TypeNode returnType)
returnType in interface MethodDeclpublic java.lang.String name()
name in interface MethodDeclpublic MethodDecl name(java.lang.String name)
name in interface MethodDeclpublic java.util.List formals()
formals in interface MethodDeclpublic MethodDecl formals(java.util.List formals)
formals in interface MethodDeclpublic java.util.List exceptionTypes()
exceptionTypes in interface MethodDeclpublic MethodDecl exceptionTypes(java.util.List exceptionTypes)
exceptionTypes in interface MethodDeclpublic <>Block body()
body in interface MethodDeclpublic MethodDecl body(<>Block body)
public MethodInstance methodInstance()
methodInstance in interface MethodDeclpublic MethodDecl methodInstance(MethodInstance mi)
methodInstance in interface MethodDeclpublic 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 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 MethodInstance makeMethodInstance(ClassType ct,
TypeSystem ts)
throws SemanticException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||