public interface CtImport extends CtElement
CtTypeReference
,
CtPackageReference
, CtExecutableReference
,
CtFieldReference
or CtTypeMemberWildcardImportReferenceImpl
import static import static org.junit.Assert.*;It will be ignored in all other cases. Example:
import java.io.File;
Modifier and Type | Method and Description |
---|---|
void |
accept(CtImportVisitor visitor)
Accepts a
CtImportVisitor |
CtImport |
clone()
Clone the element which calls this method in a new object.
|
CtImportKind |
getImportKind()
Returns the kind of import (see
CtImportKind ) |
CtReference |
getReference()
Returns the reference of the import.
|
<T extends CtImport> |
setReference(CtReference reference)
Sets the reference of the import.
|
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelow
getFactory, setFactory
accept
filterChildren, map, map
CtImportKind getImportKind()
CtImportKind
)CtReference getReference()
<T extends CtImport> T setReference(CtReference reference)
void accept(CtImportVisitor visitor)
CtImportVisitor
CtImport clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.Copyright © 2007–2021 Inria. All rights reserved.