|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.github.antlrjavaparser.api.Node
com.github.antlrjavaparser.api.PackageDeclaration
public final class PackageDeclaration
This class represents the package declaration. The package declaration is
optional for the CompilationUnit
.
PackageDeclaration
::=
( AnnotationExpr
)* "package" NameExpr
) ";"
Constructor Summary | |
---|---|
PackageDeclaration()
|
|
PackageDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<AnnotationExpr> annotations,
NameExpr name)
|
|
PackageDeclaration(List<AnnotationExpr> annotations,
NameExpr name)
|
|
PackageDeclaration(NameExpr name)
|
Method Summary | ||
---|---|---|
|
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support. |
|
|
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support. |
|
List<AnnotationExpr> |
getAnnotations()
Retrieves the list of annotations declared before the package declaration. |
|
NameExpr |
getName()
Return the name of the package. |
|
void |
setAnnotations(List<AnnotationExpr> annotations)
|
|
void |
setName(NameExpr name)
Sets the name of this package declaration. |
Methods inherited from class com.github.antlrjavaparser.api.Node |
---|
equals, getBeginColumn, getBeginLine, getData, getEndColumn, getEndLine, hashCode, setBeginColumn, setBeginLine, setData, setEndColumn, setEndLine, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PackageDeclaration()
public PackageDeclaration(NameExpr name)
public PackageDeclaration(List<AnnotationExpr> annotations, NameExpr name)
public PackageDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, List<AnnotationExpr> annotations, NameExpr name)
Method Detail |
---|
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Node
accept
in class Node
R
- the type the return value of the visitorA
- the type the argument passed for the visitorv
- the visitor implementationarg
- any value relevant for the visitor
public <A> void accept(VoidVisitor<A> v, A arg)
Node
accept
in class Node
A
- the type the argument passed for the visitorv
- the visitor implementationarg
- any value relevant for the visitorpublic List<AnnotationExpr> getAnnotations()
null
if there are no annotations.
null
public NameExpr getName()
public void setAnnotations(List<AnnotationExpr> annotations)
annotations
- the annotations to setpublic void setName(NameExpr name)
name
- the name to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |