-
Methods in com.google.googlejavaformat.java that throw FormatterException
| Modifier and Type |
Method |
Description |
RangeSet<Integer> |
JavaInput.characterRangesToTokenRanges(Collection<Range<Integer>> characterRanges) |
|
ImmutableList<Replacement> |
SnippetFormatter.format(SnippetFormatter.SnippetKind kind,
String source,
List<Range<Integer>> ranges,
int initialIndent,
boolean includeComments) |
Runs the Google Java formatter on the given source, with only the given ranges specified.
|
void |
Formatter.formatSource(CharSource input,
CharSink output) |
Format the given input (a Java compilation unit) into the output stream.
|
String |
Formatter.formatSource(String input) |
Format an input string (a Java compilation unit) into an output string.
|
String |
Formatter.formatSource(String input,
Collection<Range<Integer>> characterRanges) |
Format an input string (a Java compilation unit), for only the specified character ranges.
|
String |
Formatter.formatSourceAndFixImports(String input) |
Formats an input string (a Java compilation unit) and fixes imports.
|
ImmutableList<Replacement> |
Formatter.getFormatReplacements(String input,
Collection<Range<Integer>> characterRanges) |
Emit a list of Replacements to convert from input to output.
|
static String |
RemoveUnusedImports.removeUnusedImports(String contents) |
|
static String |
ImportOrderer.reorderImports(String text) |
Deprecated.
|
static String |
ImportOrderer.reorderImports(String text,
JavaFormatterOptions.Style style) |
Reorder the inputs in text, a complete Java program.
|
static String |
StringWrapper.wrap(String input,
Formatter formatter) |
Reflows long string literals in the given Java source code.
|