|
Groovy 2.2.0 | |||||||
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, String alias)
Represent an import of an entire package, i.e. import package.Classname |
|
ImportNode(String packageName)
Represent an import of an entire package, i.e. import package |
|
ImportNode(ClassNode type)
Represent a static import of a Class, i.e. import static package.Classname |
|
ImportNode(ClassNode type, String fieldName, String alias)
Represent a static import of a field or method, i.e. import static package.Classname.name |
Method Summary | |
---|---|
String
|
getAlias()
|
String
|
getClassName()
|
String
|
getFieldName()
|
String
|
getPackageName()
|
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 Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail |
---|
public ImportNode(ClassNode type, String alias)
type
- the referenced classalias
- optional alias
public ImportNode(String packageName)
packageName
- the name of the package
public ImportNode(ClassNode type)
type
- the referenced class
public ImportNode(ClassNode type, String fieldName, String alias)
type
- the referenced classfieldName
- the field namealias
- optional alias
Method Detail |
---|
public String getAlias()
public String getClassName()
public String getFieldName()
public String getPackageName()
public String getText()
public ClassNode getType()
public boolean isStar()
public boolean isStatic()
public void visit(GroovyCodeVisitor visitor)
Copyright © 2003-2013 The Codehaus. All rights reserved.