|
||||||||||
| 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.TypeDeclaration
koala.dynamicjava.tree.ClassDeclaration
public class ClassDeclaration
This class represents a class declaration
| Constructor Summary | |
|---|---|
ClassDeclaration(ModifierSet mods,
java.lang.String name,
Option<java.util.List<TypeParameter>> tparams,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body)
Creates a new class declaration |
|
ClassDeclaration(ModifierSet mods,
java.lang.String name,
Option<java.util.List<TypeParameter>> tparams,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body,
SourceInfo si)
Creates a new class declaration |
|
ClassDeclaration(ModifierSet mods,
java.lang.String name,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body)
Creates a new class declaration |
|
ClassDeclaration(ModifierSet mods,
java.lang.String name,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body,
SourceInfo si)
Creates a new class declaration |
|
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
ReferenceTypeName |
getSuperclass()
Returns the name of the superclass of this class |
|
void |
setSuperclass(ReferenceTypeName s)
Sets the superclass name |
|
java.lang.String |
toString()
Implementation of toString for use in unit testing |
|
protected java.lang.String |
toStringHelper()
|
|
| Methods inherited from class koala.dynamicjava.tree.TypeDeclaration |
|---|
getInterfaces, getMembers, getName, getTypeParams, setInterfaces, setMembers, setName, setTypeArgs, setTypeArgs |
| 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 ClassDeclaration(ModifierSet mods,
java.lang.String name,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body)
mods - the modifiersname - the name of the class to declareext - the tokens that compose the name of the parent class.
The list can be null. The superclass property is then
set to "java.lang.Object".impl - the list of implemented interfaces (a list of list of
Token). Can be null.body - the list of members declarations
public ClassDeclaration(ModifierSet mods,
java.lang.String name,
Option<java.util.List<TypeParameter>> tparams,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body)
mods - the modifiersname - the name of the class to declaretparams - the type parametersext - the tokens that compose the name of the parent class.
The list can be null. The superclass property is then
set to "java.lang.Object".impl - the list of implemented interfaces (a list of list of
Token). Can be null.body - the list of members declarations
public ClassDeclaration(ModifierSet mods,
java.lang.String name,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body,
SourceInfo si)
mods - the modifiersname - the name of the class to declareext - the tokens that compose the name of the parent class.
The list can be null. The superclass property is then
set to "java.lang.Object".impl - the list of implemented interfaces (a list of list of
Token). Can be null.body - the list of members declarations
public ClassDeclaration(ModifierSet mods,
java.lang.String name,
Option<java.util.List<TypeParameter>> tparams,
ReferenceTypeName ext,
java.util.List<? extends ReferenceTypeName> impl,
java.util.List<Node> body,
SourceInfo si)
mods - the modifiersname - the name of the class to declaretparams - the type parametersext - the tokens that compose the name of the parent class.
The list can be null. The superclass property is then
set to "java.lang.Object".impl - the list of implemented interfaces (a list of list of
Token). Can be null.body - the list of members declarations| Method Detail |
|---|
public ReferenceTypeName getSuperclass()
public void setSuperclass(ReferenceTypeName 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.Objectprotected java.lang.String toStringHelper()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||