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 Details

    • computeImports

      void computeImports(CtElement element)
      Computes import of a CtElement
    • getAllImports

      Set<CtImport> 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

      boolean isImported(CtReference ref)
      Checks if the type is already imported.
    • initWithImports

      void initWithImports(Iterable<CtImport> importCollection)
      Specify the original imports to use before computing new imports.