|
||||||||||
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.ImportDeclaration
public final class ImportDeclaration
This class represents a import declaration. Imports are optional for the
CompilationUnit
.
ImportDeclaration
::=
"import" ( "static" )? NameExpr
( "." "*" )? ";"
Constructor Summary | |
---|---|
ImportDeclaration()
|
|
ImportDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
NameExpr name,
boolean isStatic,
boolean isAsterisk)
|
|
ImportDeclaration(NameExpr name,
boolean isStatic,
boolean isAsterisk)
|
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. |
|
NameExpr |
getName()
Retrieves the name of the import. |
|
boolean |
isAsterisk()
Return if the import ends with "*". |
|
boolean |
isStatic()
Return if the import is static. |
|
void |
setAsterisk(boolean asterisk)
Sets if this import is asterisk. |
|
void |
setName(NameExpr name)
Sets the name this import. |
|
void |
setStatic(boolean static_)
Sets if this import is static. |
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 ImportDeclaration()
public ImportDeclaration(NameExpr name, boolean isStatic, boolean isAsterisk)
public ImportDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, NameExpr name, boolean isStatic, boolean isAsterisk)
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 NameExpr getName()
public boolean isAsterisk()
true
if the import ends with "*", false
otherwisepublic boolean isStatic()
true
if the import is static, false
otherwisepublic void setAsterisk(boolean asterisk)
asterisk
- true
if this import is asteriskpublic void setName(NameExpr name)
name
- the name to setpublic void setStatic(boolean static_)
static_
- true
if this import is static
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |