Package org.codehaus.groovy.ast
Class ImportNode
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.ImportNode
- All Implemented Interfaces:
- GroovydocHolder<AnnotatedNode>,- NodeMetaDataHandler
public class ImportNode extends AnnotatedNode
Represents an import statement.
- 
Field SummaryFields inherited from interface groovy.lang.groovydoc.GroovydocHolderDOC_COMMENT
- 
Constructor SummaryConstructors Constructor Description ImportNode(java.lang.String packageName)An import of all types in a package, i.e.import pack.*ImportNode(ClassNode type)An import of all static members of a type, i.e.import static pack.Type.*ImportNode(ClassNode type, java.lang.String alias)An import of a single type, i.e.import pack.Typeorimport pack.Type as AliasImportNode(ClassNode type, java.lang.String fieldName, java.lang.String alias)An import of a static field or method of a type, i.e.import static pack.Type.nameorimport static pack.Type.name as alias
- 
Method SummaryModifier and Type Method Description java.lang.StringgetAlias()java.lang.StringgetClassName()java.lang.StringgetFieldName()java.lang.StringgetPackageName()java.lang.StringgetText()ClassNodegetType()booleanisStar()booleanisStatic()voidsetType(ClassNode type)voidvisit(GroovyCodeVisitor visitor)Methods inherited from class org.codehaus.groovy.ast.AnnotatedNodeaddAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSyntheticMethods inherited from class org.codehaus.groovy.ast.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePositionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
- 
Constructor Details- 
ImportNodeAn import of a single type, i.e.import pack.Typeorimport pack.Type as Alias- Parameters:
- type- the type reference
- alias- optional alias
 
- 
ImportNodepublic ImportNode(java.lang.String packageName)An import of all types in a package, i.e.import pack.*- Parameters:
- packageName- the name of the package
 
- 
ImportNodeAn import of all static members of a type, i.e.import static pack.Type.*- Parameters:
- type- the type reference
 
- 
ImportNodeAn import of a static field or method of a type, i.e.import static pack.Type.nameorimport static pack.Type.name as alias- Parameters:
- type- the type reference
- fieldName- the field name
- alias- optional alias
 
 
- 
- 
Method Details- 
getTextpublic java.lang.String getText()
- 
isStarpublic boolean isStar()
- 
isStaticpublic boolean isStatic()
- 
getAliaspublic java.lang.String getAlias()
- 
getClassNamepublic java.lang.String getClassName()
- 
getFieldNamepublic java.lang.String getFieldName()
- 
getPackageNamepublic java.lang.String getPackageName()
- 
getType
- 
setType
- 
visit
 
-