|
||||||||||
| 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.ConstructorDeclaration
public class ConstructorDeclaration
This class represents constructor declarations in an AST
| Constructor Summary | |
|---|---|
ConstructorDeclaration(ModifierSet mods,
Option<java.util.List<TypeParameter>> tparams,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts)
Creates a new method declaration |
|
ConstructorDeclaration(ModifierSet mods,
Option<java.util.List<TypeParameter>> tparams,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts,
SourceInfo si)
Creates a new method declaration |
|
ConstructorDeclaration(ModifierSet mods,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts)
Creates a new method declaration |
|
ConstructorDeclaration(ModifierSet mods,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts,
SourceInfo si)
Creates a new method declaration |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
ConstructorCall |
getConstructorCall()
The explicit constructor invocation if one or null |
|
java.util.List<? extends ReferenceTypeName> |
getExceptions()
Returns the list of the exception thrown by this method |
|
java.lang.String |
getName()
Returns the name of this constructor |
|
java.util.List<FormalParameter> |
getParameters()
Returns the parameters list |
|
java.util.List<Node> |
getStatements()
Returns the statements |
|
Option<java.util.List<TypeParameter>> |
getTypeParams()
|
|
boolean |
isVarArgs()
|
|
void |
setConstructorCall(ConstructorCall ci)
Sets the constructor invocation |
|
void |
setExceptions(java.util.List<? extends ReferenceTypeName> l)
Sets the exceptions thrown by this method |
|
void |
setName(java.lang.String s)
Sets the constructor's name |
|
void |
setParameters(java.util.List<FormalParameter> l)
Sets the parameters |
|
void |
setStatements(java.util.List<Node> l)
Sets the statements |
|
void |
setTypeArgs(java.util.List<TypeParameter> tparams)
|
|
void |
setTypeArgs(Option<java.util.List<TypeParameter>> tparams)
|
|
java.lang.String |
toString()
Implementation of toString for use in unit testing |
|
java.lang.String |
toStringHelper()
|
|
| 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 ConstructorDeclaration(ModifierSet mods,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts)
mods - the modifiersname - the name of this constructorparams - the parameters listexcepts - the exception list (a list of list of token)eci - the explicit constructor invocationstmts - the statements
java.lang.IllegalArgumentException - if name is null or params is null or
excepts is null or stmts is null
public ConstructorDeclaration(ModifierSet mods,
Option<java.util.List<TypeParameter>> tparams,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts)
mods - the modifierstparams - the type parametersname - the name of this constructorparams - the parameters listexcepts - the exception list (a list of list of token)eci - the explicit constructor invocationstmts - the statements
java.lang.IllegalArgumentException - if name is null or params is null or
excepts is null or stmts is null
public ConstructorDeclaration(ModifierSet mods,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts,
SourceInfo si)
mods - the modifiersname - the name of this constructorparams - the parameters listexcepts - the exception list (a list of list of token)eci - the explicit constructor invocationstmts - the statements
java.lang.IllegalArgumentException - if name is null or params is null or
excepts is null or stmts is null
public ConstructorDeclaration(ModifierSet mods,
Option<java.util.List<TypeParameter>> tparams,
java.lang.String name,
java.util.List<FormalParameter> params,
java.util.List<? extends ReferenceTypeName> excepts,
ConstructorCall eci,
java.util.List<Node> stmts,
SourceInfo si)
mods - the modifierstparams - the type parametersname - the name of this constructorparams - the parameters listexcepts - the exception list (a list of list of token)eci - the explicit constructor invocationstmts - the statements
java.lang.IllegalArgumentException - if name is null or params is null or
excepts is null or stmts is null| Method Detail |
|---|
public Option<java.util.List<TypeParameter>> getTypeParams()
public void setTypeArgs(java.util.List<TypeParameter> tparams)
public void setTypeArgs(Option<java.util.List<TypeParameter>> tparams)
public java.lang.String getName()
public void setName(java.lang.String s)
java.lang.IllegalArgumentException - if s is nullpublic java.util.List<FormalParameter> getParameters()
public void setParameters(java.util.List<FormalParameter> l)
public java.util.List<? extends ReferenceTypeName> getExceptions()
public void setExceptions(java.util.List<? extends ReferenceTypeName> l)
java.lang.IllegalArgumentException - if l is nullpublic ConstructorCall getConstructorCall()
public void setConstructorCall(ConstructorCall ci)
public java.util.List<Node> getStatements()
public void setStatements(java.util.List<Node> l)
java.lang.IllegalArgumentException - if l is nullpublic boolean isVarArgs()
public <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class Nodevisitor - the visitor to acceptpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringHelper()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||