public final class ClassDeclaration extends CompilationUnitBase
Modifier and Type | Field and Description |
---|---|
TopDeclaration[] |
decls |
imports, pname
annotation, name
Modifier and Type | Method and Description |
---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
void |
accept(ASTVisitorOld visitor)
Accept visitor for a visit.
|
void |
acceptChildren(ASTVisitor visitor)
Accept visitor for a visit to the children of this node.
|
static ClassDeclaration |
construct(Name pname,
Import[] imports,
Identifier name,
TopDeclaration[] decls)
Construct a class declaration
|
static ClassDeclaration |
construct(Name pname,
java.util.Vector<Import> imports,
Identifier name,
java.util.Vector<TopDeclaration> decls)
Construct a class declaration
|
ClassSpec |
getClassSpec()
Get class specification
|
void |
setClassSpec(ClassSpec spec)
Set class specification.
|
getImports, getPackage
getAnnotation, getName, setAnnotation
getPosition, setPosition
accept, accept, print, printCore, toString, toStringCore
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getPosition, setPosition
getAnnotation, setAnnotation
print, printCore, toString, toStringCore
public final TopDeclaration[] decls
public static ClassDeclaration construct(Name pname, java.util.Vector<Import> imports, Identifier name, java.util.Vector<TopDeclaration> decls)
pname
- package nameimports
- import statementsname
- class identifierdecls
- sequence of declarationspublic static ClassDeclaration construct(Name pname, Import[] imports, Identifier name, TopDeclaration[] decls)
pname
- package nameimports
- import statementsname
- class identifierdecls
- sequence of declarationspublic void setClassSpec(ClassSpec spec)
spec
- the specification.public ClassSpec getClassSpec()
public void accept(ASTVisitorOld visitor)
accept
in interface AST
accept
in class CompilationUnitBase
visitor
- the visitor who is accepted by this node.public void accept(ASTVisitor visitor)
accept
in interface AST
accept
in class CompilationUnitBase
visitor
- the visitor who is accepted by this node.public void acceptChildren(ASTVisitor visitor)
acceptChildren
in interface AST
acceptChildren
in class CompilationUnitBase
visitor
- the visitor who is accepted by the children of this node.