junc.ast
Class MethodDeclarationNode
java.lang.Object
|
+--antlr.BaseAST
|
+--antlr.CommonAST
|
+--junc.ast.JUnCASTNode
|
+--junc.ast.ClassBodyDeclarationNode
|
+--junc.ast.MethodDeclarationNode
- All Implemented Interfaces:
- antlr.collections.AST, java.io.Serializable
- Direct Known Subclasses:
- ConstructorDeclarationNode
- public class MethodDeclarationNode
- extends ClassBodyDeclarationNode
- See Also:
- Serialized Form
Fields inherited from class antlr.BaseAST |
down, right |
Method Summary |
protected java.lang.String[] |
argsNames()
|
protected org.apache.bcel.generic.Type[] |
argsType()
|
void |
encodeType()
Move the ['s defined on the method name to the type and encode
param types with return types. |
protected boolean |
isReturn(org.apache.bcel.generic.Instruction in)
|
protected org.apache.bcel.generic.Type |
returnType()
|
void |
translate(org.apache.bcel.generic.ClassGen classGen)
Describe translate method here. |
junc.types.JUnCBaseType |
typeCheck(junc.symtab.SymbolTable stable)
Describe typeCheck method here. |
Methods inherited from class antlr.CommonAST |
getText, getType, initialize, initialize, initialize, setText, setType |
Methods inherited from class antlr.BaseAST |
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NUMBER_FORMALS
public static int NUMBER_FORMALS
name
public junc.symtab.Symbol name
formalParameters
public java.util.Vector formalParameters
exceptions
public java.util.Vector exceptions
block
public junc.ast.BlockNode block
scope
public java.lang.Integer scope
MethodDeclarationNode
public MethodDeclarationNode()
encodeType
public void encodeType()
- Move the ['s defined on the method name to the type and encode
param types with return types.
- Specified by:
encodeType
in class ClassBodyDeclarationNode
typeCheck
public junc.types.JUnCBaseType typeCheck(junc.symtab.SymbolTable stable)
throws TypeCheckError
- Description copied from class:
ClassBodyDeclarationNode
- Describe
typeCheck
method here.
- Specified by:
typeCheck
in class ClassBodyDeclarationNode
- Parameters:
stable
- a SymbolTable
value
- Returns:
- a
JUnCBaseType
value
- Throws:
TypeCheckError
- if an error occurs
argsNames
protected java.lang.String[] argsNames()
argsType
protected org.apache.bcel.generic.Type[] argsType()
returnType
protected org.apache.bcel.generic.Type returnType()
isReturn
protected boolean isReturn(org.apache.bcel.generic.Instruction in)
translate
public void translate(org.apache.bcel.generic.ClassGen classGen)
- Description copied from class:
ClassBodyDeclarationNode
- Describe
translate
method here.
- Specified by:
translate
in class ClassBodyDeclarationNode
- Parameters:
classGen
- a ClassGen
value