Class ImportOrganizer.OrganizedImports

Enclosing interface:

public static class ImportOrganizer.OrganizedImports extends Object
Provides support for building a list of imports from groups and formatting it as a block of imports.
  • Constructor Details

    • OrganizedImports

      public OrganizedImports()
  • Method Details

    • asImportBlock

      public String asImportBlock()
      Get the organized imports as a block of imports, with blank links between the separate groups.
    • addGroups

      Add groups of already sorted imports.

      If there are any other imports in the list then this will add a newline separator before any groups are added. It will also add a newline separate between each group.

      groups - the imports in the group.
      keys - the keys to add, in order, if a key is not in the groups then it is ignored.
      this for chaining.