public abstract class DeclarationBase extends ASTSourceBase implements ProgramDeclaration
| Modifier and Type | Field and Description |
|---|---|
ProgramAnnotation |
annotation |
Identifier |
name |
| Constructor and Description |
|---|
DeclarationBase(Identifier name)
Construct declaration with denoted 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.
|
ProgramAnnotation |
getAnnotation()
Get the annotation for this item.
|
Identifier |
getName()
Get the name of the declared entity.
|
void |
setAnnotation(ProgramAnnotation annotation)
Set the annotation for this item.
|
getPosition, setPositionaccept, accept, print, printCore, toString, toStringCoreequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPosition, setPositionprint, printCore, toString, toStringCorepublic Identifier name
public ProgramAnnotation annotation
public DeclarationBase(Identifier name)
name - the name of the declared entity.public Identifier getName()
getName in interface Declarationpublic void setAnnotation(ProgramAnnotation annotation)
setAnnotation in interface ASTProgramAnnotatedannotation - the annotation.public ProgramAnnotation getAnnotation()
getAnnotation in interface ASTProgramAnnotatedpublic void accept(ASTVisitorOld visitor)
accept in interface ASTaccept in class ASTSourceBasevisitor - the visitor who is accepted by this node.public void accept(ASTVisitor visitor)
accept in interface ASTaccept in class ASTSourceBasevisitor - the visitor who is accepted by this node.public void acceptChildren(ASTVisitor visitor)
acceptChildren in interface ASTacceptChildren in class ASTBasevisitor - the visitor who is accepted by the children of this node.