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

Field Summary
 junc.ast.BlockNode block
           
 java.util.Vector exceptions
           
 java.util.Vector formalParameters
           
 junc.symtab.Symbol name
           
static int NUMBER_FORMALS
           
 java.lang.Integer scope
           
 
Fields inherited from class junc.ast.ClassBodyDeclarationNode
accessFlags, type
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
MethodDeclarationNode()
           
 
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 junc.ast.ClassBodyDeclarationNode
isFinal, isInstance, isPrivate, isProtected, isPublic, isStatic, type
 
Methods inherited from class junc.ast.JUnCASTNode
getColumnNumber, getLineNumber, setColumnNumber, setLineNumber
 
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
 

Field Detail

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
Constructor Detail

MethodDeclarationNode

public MethodDeclarationNode()
Method Detail

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