|
|||||||||||
| 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.VariableDeclaration
This class represents variable declarations in an AST
| Field Summary | |
static java.lang.String |
FINAL
The final property name |
static java.lang.String |
INITIALIZER
The initializer property name |
static java.lang.String |
NAME
The name property name |
static java.lang.String |
TYPE
The type property name |
| Fields inherited from class koala.dynamicjava.tree.Node |
BEGIN_COLUMN, BEGIN_LINE, END_COLUMN, END_LINE, FILENAME |
| Constructor Summary | |
VariableDeclaration(boolean fin,
Type type,
java.lang.String name,
Expression init)
Creates a new variable declaration |
|
VariableDeclaration(boolean fin,
Type type,
java.lang.String name,
Expression init,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
Creates a new variable declaration |
|
| Method Summary | |
java.lang.Object |
acceptVisitor(Visitor visitor)
Allows a visitor to traverse the tree |
Expression |
getInitializer()
Returns the initializer for this variable |
java.lang.String |
getName()
Returns the name of this variable |
Type |
getType()
Gets the declared type for this variable |
boolean |
isFinal()
Returns true if this variable is final |
void |
setFinal(boolean b)
Sets the final flag |
void |
setInitializer(Expression e)
Sets the initializer |
void |
setName(java.lang.String s)
Sets the variable's name |
void |
setType(Type t)
Sets the type of this field |
| 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 FINAL
public static final java.lang.String TYPE
public static final java.lang.String NAME
public static final java.lang.String INITIALIZER
| Constructor Detail |
public VariableDeclaration(boolean fin,
Type type,
java.lang.String name,
Expression init)
fin - is this variable final?type - the type of this variablename - the name of this variableinit - the initializer
java.lang.IllegalArgumentException - if name is null or type is null
public VariableDeclaration(boolean fin,
Type type,
java.lang.String name,
Expression init,
java.lang.String fn,
int bl,
int bc,
int el,
int ec)
fin - is this variable final?type - the type of this variablename - the name of this variableinit - the initializerfn - 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| Method Detail |
public boolean isFinal()
public void setFinal(boolean b)
public Type getType()
public void setType(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 Expression getInitializer()
public void setInitializer(Expression e)
public java.lang.Object acceptVisitor(Visitor visitor)
acceptVisitor in class Nodevisitor - the visitor to accept
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||