public class ImportNode extends AnnotatedNode
Represents an import statement.
| Constructor and description | 
|---|
                                ImportNode
                                (ClassNode type, String alias)An import of a single type, i.e. import pack.Type or import pack.Type as Alias | 
                        
                                ImportNode
                                (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, String fieldName, String alias)An import of a static field or method of a type, i.e. import static pack.Type.name or import static pack.Type.name as alias | 
                        
| Type Params | Return Type | Name and description | 
|---|---|---|
 | 
                            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 | 
                            setType(ClassNode type) | 
                        
 | 
                            public void | 
                            visit(GroovyCodeVisitor visitor) | 
                        
| Methods inherited from class | Name | 
|---|---|
class AnnotatedNode | 
                            addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic | 
                        
class ASTNode | 
                            copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit | 
                        
 An import of a single type, i.e. import pack.Type or import pack.Type as Alias
      
type -   the type referencealias -  optional alias An import of all types in a package, i.e. import pack.*
      
packageName -  the name of the package An import of all static members of a type, i.e. import static pack.Type.*
      
type -  the type referenceCopyright © 2003-2020 The Apache Software Foundation. All rights reserved.