类 ImportOrderer
java.lang.Object
com.palantir.javaformat.java.ImportOrderer
Orders imports in Java source code.
-
方法概要
修饰符和类型方法说明static StringreorderImports(String text) 已过时。static StringreorderImports(String text, com.palantir.javaformat.java.JavaFormatterOptions.Style style) Reorder the inputs intext, a complete Java program.
-
方法详细资料
-
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.- 抛出:
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 已过时。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.- 抛出:
com.palantir.javaformat.java.FormatterException- if the input could not be parsed.
-
reorderImports(String, Style)instead