Package spoon.reflect.visitor
Interface ImportScanner
- All Known Implementing Classes:
ImportScannerImpl
public interface ImportScanner
Used to compute the imports required to write readable code with no fully qualified names.
The import scanner API might still change in future release, that's why it is marked as experimental.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
computeImports(CtElement element)
Computes import of aCtElement
Use computeImports or computeAllImports before getting the different imports.void
initWithImports(Iterable<CtImport> importCollection)
Specify the original imports to use before computing new imports.boolean
isImported(CtReference ref)
Checks if the type is already imported.
-
Method Details
-
computeImports
Computes import of aCtElement
-
getAllImports
Use computeImports or computeAllImports before getting the different imports.- Returns:
- the list of computed imports or an empty collection if not imports has been computed.
-
isImported
Checks if the type is already imported. -
initWithImports
Specify the original imports to use before computing new imports.
-