|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.ast.ASTNode org.codehaus.groovy.ast.AnnotatedNode org.codehaus.groovy.ast.ImportNode
public class ImportNode extends AnnotatedNode
Represents an import statement of a single class
Constructor Summary | |
ImportNode(ClassNode type, java.lang.String alias)
Represent an import of an entire package, i.e. |
|
ImportNode(java.lang.String packageName)
Represent an import of an entire package, i.e. |
|
ImportNode(ClassNode type)
Represent a static import of a Class, i.e. |
|
ImportNode(ClassNode type, java.lang.String fieldName, java.lang.String alias)
Represent a static import of a field or method, i.e. |
Method Summary | |
---|---|
java.lang.String
|
getAlias()
|
java.lang.String
|
getClassName()
|
java.lang.String
|
getFieldName()
|
java.lang.String
|
getPackageName()
|
java.lang.String
|
getText()
@return the text display of this import |
ClassNode
|
getType()
|
boolean
|
isStar()
|
boolean
|
isStatic()
|
void
|
visit(GroovyCodeVisitor visitor)
|
Methods inherited from class AnnotatedNode | |
---|---|
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public ImportNode(ClassNode type, java.lang.String alias)
type
- the referenced classalias
- optional alias
public ImportNode(java.lang.String packageName)
packageName
- the name of the package
public ImportNode(ClassNode type)
type
- the referenced class
public ImportNode(ClassNode type, java.lang.String fieldName, java.lang.String alias)
type
- the referenced classfieldName
- the field namealias
- optional alias
Method Detail |
---|
public java.lang.String getAlias()
public java.lang.String getClassName()
public java.lang.String getFieldName()
public java.lang.String getPackageName()
public java.lang.String getText()
public ClassNode getType()
public boolean isStar()
public boolean isStatic()
public void visit(GroovyCodeVisitor visitor)
Groovy Documentation