Decl
::= Type:Access
ParamDecl
* Body:Block
;- Type Hierarchy:
java.lang.Object
AST.ASTNode<ASTNode>
AST.BlockStmt
AST.Decl
AST.MethodDecl
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Iterable<ASTNode>
|
|||||||
FRAMES NO FRAMES |
Decl
::= Type:Access
ParamDecl
* Body:Block
;java.lang.ObjectAST.ASTNode<ASTNode>
AST.BlockStmt
AST.Decl
AST.MethodDecl
spec/picojava-method.ast
at line 2
public MethodDecl()
public MethodDecl(java.lang.String p0, Access p1, List<ParamDecl> p2, Block p3)
syn boolean endsWithReturn()
endsWithReturn
in class BlockStmt
spec/ErrorCheck.jrag
at line 11
syn Decl declarationOf(java.lang.String name, List argList)
declarationOf
in class BlockStmt
spec/NameResolution.jrag
at line 58
syn boolean hasEnclosingClass()
spec/TypeAnalysis.jrag
at line 11
inh ClassDecl enclosingClassDecl()
spec/TypeAnalysis.jrag
at line 8
public MethodDecl clone() throws java.lang.CloneNotSupportedException
public MethodDecl copy()
public MethodDecl fullCopy()
public void collectErrors(java.util.Collection c)
collectErrors
in class ASTNode<ASTNode>
spec/ErrorCheck.jrag
at line 5
public void prettyPrint(java.lang.StringBuilder sb, int t)
spec/PrettyPrint.jadd
at line 2
public void init$Children()
init$Children
in class Decl
protected int numChildren()
numChildren
in class Decl
public boolean mayHaveRewrite()
mayHaveRewrite
in class Decl
public void flushCache()
flushCache
in class Decl
public void flushCollectionCache()
flushCollectionCache
in class Decl
public void setName(java.lang.String value)
public java.lang.String getName()
node
- The new node to replace the Type child.public Access getTypeNoTransform()
This method does not invoke AST transformations.
public void setParamDeclList(List<ParamDecl> list)
list
- The new list node to be used as the ParamDecl list.public int getNumParamDecl()
public int getNumParamDeclNoTransform()
public ParamDecl getParamDecl(int i)
i
in the ParamDecl list.i
- Index of the element to return.
i
in the ParamDecl list.public boolean hasParamDecl()
true
if it has at least one child, false
otherwise.public void addParamDecl(ParamDecl node)
node
- The element to append to the ParamDecl list.public void addParamDeclNoTransform(ParamDecl node)
public void setParamDecl(ParamDecl node, int i)
i
with the new node node
.node
- The new node to replace the old list element.i
- The list index of the node to be replaced.public List<ParamDecl> getParamDeclList()
public List<ParamDecl> getParamDeclListNoTransform()
This method does not invoke AST transformations.
public List<ParamDecl> getParamDecls()
public List<ParamDecl> getParamDeclsNoTransform()
This method does not invoke AST transformations.
node
- The new node to replace the Body child.public Block getBodyNoTransform()
This method does not invoke AST transformations.
protected int endsWithReturn_visited
protected java.util.Map declarationOf_String_List_visited
protected java.util.Map declarationOf_String_List_values
protected int type_visited
protected boolean type_computed
protected TypeDecl type_value
protected int hasEnclosingClass_visited
protected int enclosingClassDecl_visited
|
|||||||
FRAMES NO FRAMES |