Package com.palantir.javaformat.java
Class ImportOrderer
java.lang.Object
com.palantir.javaformat.java.ImportOrderer
Orders imports in Java source code.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringreorderImports(String text) Deprecated.static StringreorderImports(String text, com.palantir.javaformat.java.JavaFormatterOptions.Style style) Reorder the inputs intext, a complete Java program.
-
Method Details
-
reorderImports
public static String reorderImports(String text, com.palantir.javaformat.java.JavaFormatterOptions.Style style) throws com.palantir.javaformat.java.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:
com.palantir.javaformat.java.FormatterException- if the input could not be parsed.
-
reorderImports
@Deprecated public static String reorderImports(String text) throws com.palantir.javaformat.java.FormatterException 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:
com.palantir.javaformat.java.FormatterException- if the input could not be parsed.
-
reorderImports(String, Style)instead