java.lang.Object
com.google.googlejavaformat.java.ImportOrderer
public class ImportOrderer extends Object
Orders imports in Java source code.
-
Method Summary
Modifier and Type Method Description static StringreorderImports(String text)Deprecated.UsereorderImports(String, Style)insteadstatic 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 FormatterExceptionReorder 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.
-