public interface FormatterService
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
formatSourceReflowStringsAndFixImports(java.lang.String input)
Formats an input string (a Java compilation unit), reflows strings and fixes imports.
|
com.google.common.collect.ImmutableList<Replacement> |
getFormatReplacements(java.lang.String input,
java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> ranges)
Emit a list of
Replacements to convert from input to formatted output. |
com.google.common.collect.ImmutableList<Replacement> getFormatReplacements(java.lang.String input, java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> ranges) throws FormatterException
Replacements to convert from input to formatted output.input - the input compilation unitranges - the character ranges to reformatReplacements, sorted from low index to high index, without overlapsFormatterException - if the input string cannot be parsedjava.lang.String formatSourceReflowStringsAndFixImports(java.lang.String input)
throws FormatterException
Fixing imports includes ordering, spacing, and removal of unused import statements.
input - the input stringFormatterException - if the input string cannot be parsed