Package | Description |
---|---|
com.google.googlejavaformat.java |
Modifier and Type | Method and Description |
---|---|
RangeSet<Integer> |
JavaInput.characterRangesToTokenRanges(Collection<Range<Integer>> characterRanges) |
List<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
Replacement s to convert from input to output. |
static String |
ImportOrderer.reorderImports(String text)
Reorder the inputs in
text , a complete Java program. |
Constructor and Description |
---|
JavaInput(String text)
Input constructor.
|
Copyright © 2015–2017 Google Inc.. All rights reserved.