public interface ImportOrganizer
Modifier and Type | Interface and Description |
---|---|
static class |
ImportOrganizer.Import
Represents an import.
|
static class |
ImportOrganizer.OrganizedImports
Provides support for building a list of imports from groups and formatting it as a block of
imports.
|
Modifier and Type | Field and Description |
---|---|
static ImportOrganizer |
ANDROID_STATIC_FIRST_ORGANIZER
An
ImportOrganizer that sorts import statements according to Android Code Style, with
static imports first. |
static ImportOrganizer |
ANDROID_STATIC_LAST_ORGANIZER
An
ImportOrganizer that sorts import statements according to Android Code Style, with
static imports last. |
static ImportOrganizer |
STATIC_FIRST_ORGANIZER
An
ImportOrganizer that sorts import statements according to the Google Java Style
Guide, i.e. |
static ImportOrganizer |
STATIC_LAST_ORGANIZER
An
ImportOrganizer that sorts import statements so that non-static imports come first,
and static and non-static separated by blank line. |
Modifier and Type | Method and Description |
---|---|
ImportOrganizer.OrganizedImports |
organizeImports(List<ImportOrganizer.Import> imports)
Organize the imports supplied, e.g.
|
static final ImportOrganizer STATIC_FIRST_ORGANIZER
ImportOrganizer
that sorts import statements according to the Google Java Style
Guide, i.e. static first, static and non-static separated by blank line.static final ImportOrganizer STATIC_LAST_ORGANIZER
ImportOrganizer
that sorts import statements so that non-static imports come first,
and static and non-static separated by blank line.static final ImportOrganizer ANDROID_STATIC_FIRST_ORGANIZER
ImportOrganizer
that sorts import statements according to Android Code Style, with
static imports first.
The imports are partitioned into groups in two steps, each step sub-partitions all groups from the previous step. The steps are:
android.
com.android.
java.
javax.
static final ImportOrganizer ANDROID_STATIC_LAST_ORGANIZER
ImportOrganizer
that sorts import statements according to Android Code Style, with
static imports last.
The imports are partitioned into groups in two steps, each step sub-partitions all groups from the previous step. The steps are:
android.
com.android.
java.
javax.
ImportOrganizer.OrganizedImports organizeImports(List<ImportOrganizer.Import> imports)
imports
- the imports to organize, the order is undefined.Copyright © 2019. All rights reserved.