polyglot.ast
Interface Import
- All Superinterfaces:
- java.lang.Cloneable, Copy, JL, Node, NodeOps
- All Known Implementing Classes:
- Import_c
public interface Import
- extends Node
An 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.
Nested Class Summary |
static class |
Import.Kind
Import kinds: class (e.g., import java.util.Set) or package (e.g.,
import java.util.*). |
Method Summary |
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. |
Methods inherited from interface polyglot.ast.Node |
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList |
Methods inherited from interface polyglot.ast.JL |
init, node |
Methods inherited from interface polyglot.ast.NodeOps |
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren |
Methods inherited from interface polyglot.util.Copy |
copy |
CLASS
static final Import.Kind CLASS
PACKAGE
static final Import.Kind PACKAGE
name
java.lang.String name()
- Get the name of the class or package to import.
name
Import name(java.lang.String name)
- Set the name of the class or package to import.
kind
Import.Kind kind()
- Get the kind of import.
kind
Import kind(Import.Kind kind)
- Set the kind of import.