public class Import extends JavaNonTerminalProgramElement implements TypeReferenceContainer, PackageReferenceContainer
JavaProgramElement.NameAbstractionTableDisabled| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
isMultiImport
Multi import flag. 
 | 
protected TypeReferenceInfix | 
reference
Type reference infix. 
 | 
| Constructor and Description | 
|---|
Import()
Import. 
 | 
Import(ExtList children,
      boolean isMultiImport)
children may contain: TypeReference (for import), a Comment 
 | 
Import(PackageReference t)
Import. 
 | 
Import(TypeReference t,
      boolean multi)
Import. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ProgramElement | 
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
      child array 
 | 
int | 
getChildCount()
Returns the number of children of this node. 
 | 
SourceElement | 
getLastElement()
Finds the source element that occurs last in the source. 
 | 
PackageReference | 
getPackageReference()
Returns the package reference of this import, if there is one. 
 | 
TypeReferenceInfix | 
getReference()
Returns the reference of this import, either a
        type or a package reference. 
 | 
TypeReference | 
getTypeReference()
Returns the type reference of this import, if there is one. 
 | 
TypeReference | 
getTypeReferenceAt(int index)  | 
int | 
getTypeReferenceCount()
Get the number of type references in this container. 
 | 
boolean | 
isMultiImport()
Checks if this import is a multi type import, also known as
        type-on-demand import. 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
compatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElement, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPositionprotected final boolean isMultiImport
protected final TypeReferenceInfix reference
public Import(ExtList children, boolean isMultiImport)
isMultiImport - indicates whether the import contains multiple 
 importspublic Import()
public Import(TypeReference t, boolean multi)
t - a type reference.multi - indicates the wildcard.public Import(PackageReference t)
t - a package reference.public SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getEndPosition()public boolean isMultiImport()
public int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundspublic int getTypeReferenceCount()
getTypeReferenceCount in interface TypeReferenceContainerpublic TypeReference getTypeReferenceAt(int index)
getTypeReferenceAt in interface TypeReferenceContainerpublic TypeReference getTypeReference()
public PackageReference getPackageReference()
getPackageReference in interface PackageReferenceContainerpublic TypeReferenceInfix getReference()
public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.