Package com.google.googlejavaformat.java
Class ImportOrderer
java.lang.Object
com.google.googlejavaformat.java.ImportOrderer
Orders imports in Java source code.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringreorderImports(String text) Deprecated.static StringreorderImports(String text, JavaFormatterOptions.Style style) Reorder the inputs intext, a complete Java program.
-
Method Details
-
reorderImports
public static String reorderImports(String text, JavaFormatterOptions.Style style) throws FormatterException Reorder the inputs intext, a complete Java program. On success, another complete Java program is returned, which is the same as the original except the imports are in order.- Throws:
FormatterException- if the input could not be parsed.
-
reorderImports
Deprecated.UsereorderImports(String, Style)insteadReorder the inputs intext, a complete Java program, in Google style. On success, another complete Java program is returned, which is the same as the original except the imports are in order.- Throws:
FormatterException- if the input could not be parsed.
-
reorderImports(String, Style)instead