public interface Import extends Node
Import is an immutable representation of a Java
import statement. It consists of the string representing the
item being imported and the kind which is either indicating that a class
is being imported, or that an entire package is being imported.| Modifier and Type | Interface and Description |
|---|---|
static class |
Import.Kind
Import kinds: class (e.g., import java.util.Set) or package (e.g.,
import java.util.*).
|
| Modifier and Type | Field and Description |
|---|---|
static Import.Kind |
SINGLE_TYPE |
static Import.Kind |
TYPE_IMPORT_ON_DEMAND |
| Modifier and Type | Method and Description |
|---|---|
Import.Kind |
kind()
Get the kind of import.
|
Import |
kind(Import.Kind kind)
Set the kind of import.
|
java.lang.String |
name()
Get the name of the class or package to import.
|
Import |
name(java.lang.String name)
Set the name of the class or package to import.
|
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdgeaddDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, extRewrite, extRewriteEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitListstatic final Import.Kind SINGLE_TYPE
static final Import.Kind TYPE_IMPORT_ON_DEMAND
java.lang.String name()
Import name(java.lang.String name)
Import.Kind kind()
Import kind(Import.Kind kind)