|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkoala.dynamicjava.tree.Node
koala.dynamicjava.tree.MethodDeclaration
This class represents method declarations in an AST
Field Summary | |
static java.lang.String |
ACCESS_FLAGS
The accessFlags property name |
static java.lang.String |
BODY
The body property name |
static java.lang.String |
EXCEPTIONS
The exceptions property name |
static java.lang.String |
NAME
The name property name |
static java.lang.String |
PARAMETERS
The parameters property name |
static java.lang.String |
RETURN_TYPE
The type property name |
Fields inherited from class koala.dynamicjava.tree.Node |
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE, FILENAME |
Constructor Summary | |
MethodDeclaration(int flags,
Type type,
java.lang.String name,
java.util.List params,
java.util.List excepts,
BlockStatement body)
Creates a new method declaration |
|
MethodDeclaration(int flags,
Type type,
java.lang.String name,
java.util.List params,
java.util.List excepts,
BlockStatement body,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
Creates a new method declaration |
Method Summary | |
java.lang.Object |
acceptVisitor(Visitor visitor)
Allows a visitor to traverse the tree |
int |
getAccessFlags()
Returns the access flags for this method |
BlockStatement |
getBody()
Returns the body of the method, null if the method is abstract |
java.util.List |
getExceptions()
Returns the list of the exception thrown by this method |
java.lang.String |
getName()
Returns the name of this method |
java.util.List |
getParameters()
Returns the parameters list |
Type |
getReturnType()
Gets the return type of this method |
void |
setAccessFlags(int f)
Sets the access flags for this constructor |
void |
setBody(BlockStatement bs)
Sets the body |
void |
setExceptions(java.util.List l)
Sets the exceptions list |
void |
setName(java.lang.String s)
Sets the method's name |
void |
setParameters(java.util.List l)
Sets the parameters list |
void |
setReturnType(Type t)
Sets the return type of this method |
Methods inherited from class koala.dynamicjava.tree.Node |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getFilename, getProperties, getProperty, hasProperty, removePropertyChangeListener, removePropertyChangeListener, setBeginColumn, setBeginLine, setEndColumn, setEndLine, setFilename, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ACCESS_FLAGS
public static final java.lang.String RETURN_TYPE
public static final java.lang.String NAME
public static final java.lang.String PARAMETERS
public static final java.lang.String EXCEPTIONS
public static final java.lang.String BODY
Constructor Detail |
public MethodDeclaration(int flags, Type type, java.lang.String name, java.util.List params, java.util.List excepts, BlockStatement body)
flags
- the access flagstype
- the return type of this methodname
- the name of the method to declareparams
- the parameters listexcepts
- the exception listbody
- the body statement
java.lang.IllegalArgumentException
- if name is null or type is null or
params is null or excepts is nullpublic MethodDeclaration(int flags, Type type, java.lang.String name, java.util.List params, java.util.List excepts, BlockStatement body, java.lang.String fn, int bl, int bc, int el, int ec)
flags
- the access flagstype
- the return type of this methodname
- the name of the method to declareparams
- the parameters listexcepts
- the exception listbody
- the body statementfn
- the filenamebl
- the begin linebc
- the begin columnel
- the end lineec
- the end column
java.lang.IllegalArgumentException
- if name is null or type is null or
params is null or excepts is nullMethod Detail |
public int getAccessFlags()
public void setAccessFlags(int f)
public Type getReturnType()
public void setReturnType(Type t)
java.lang.IllegalArgumentException
- if t is nullpublic java.lang.String getName()
public void setName(java.lang.String s)
java.lang.IllegalArgumentException
- if s is nullpublic java.util.List getParameters()
public void setParameters(java.util.List l)
java.lang.IllegalArgumentException
- if l is nullpublic java.util.List getExceptions()
public void setExceptions(java.util.List l)
java.lang.IllegalArgumentException
- if l is nullpublic BlockStatement getBody()
public void setBody(BlockStatement bs)
public java.lang.Object acceptVisitor(Visitor visitor)
acceptVisitor
in class Node
visitor
- the visitor to accept
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |