|
||||||||||
| 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.Declaration
koala.dynamicjava.tree.FormalParameter
public class FormalParameter
This class represents the method parameters in the syntax tree
| Constructor Summary | |
|---|---|
FormalParameter(ModifierSet mods,
TypeName t,
java.lang.String n)
Initializes the node |
|
FormalParameter(ModifierSet mods,
TypeName t,
java.lang.String n,
SourceInfo si)
Initializes the node |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
java.lang.String |
getName()
The name of this parameter |
|
TypeName |
getType()
Returns the declaring type of this parameter |
|
void |
setName(java.lang.String s)
Sets this parameter's name |
|
void |
setType(TypeName t)
Sets the type of this parameter |
|
java.lang.String |
toString()
Implementation of toString for use in unit testing |
|
| Methods inherited from class koala.dynamicjava.tree.Declaration |
|---|
getModifiers, setModifiers |
| Methods inherited from class koala.dynamicjava.tree.Node |
|---|
archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FormalParameter(ModifierSet mods,
TypeName t,
java.lang.String n)
mods - the modifierst - the type of the parametern - the name of the parameter
java.lang.IllegalArgumentException - if t is null or n is null
public FormalParameter(ModifierSet mods,
TypeName t,
java.lang.String n,
SourceInfo si)
mods - the modifierst - the type of the parametern - the name of the parameter
java.lang.IllegalArgumentException - if t is null or n is null| Method Detail |
|---|
public TypeName getType()
public void setType(TypeName 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 <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class Nodevisitor - the visitor to acceptpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||