Package | Description |
---|---|
com.google.googlejavaformat.java |
Modifier and Type | Method and Description |
---|---|
static FormatterException |
FormatterException.fromJavacDiagnostics(java.lang.Iterable<org.openjdk.javax.tools.Diagnostic<? extends org.openjdk.javax.tools.JavaFileObject>> diagnostics) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.RangeSet<java.lang.Integer> |
JavaInput.characterRangesToTokenRanges(java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> characterRanges) |
java.util.List<Replacement> |
SnippetFormatter.format(SnippetFormatter.SnippetKind kind,
java.lang.String source,
java.util.List<com.google.common.collect.Range<java.lang.Integer>> ranges,
int initialIndent,
boolean includeComments)
Runs the Google Java formatter on the given source, with only the given ranges specified.
|
void |
Formatter.formatSource(com.google.common.io.CharSource input,
com.google.common.io.CharSink output)
Format the given input (a Java compilation unit) into the output stream.
|
java.lang.String |
Formatter.formatSource(java.lang.String input)
Format an input string (a Java compilation unit) into an output string.
|
java.lang.String |
Formatter.formatSource(java.lang.String input,
java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> characterRanges)
Format an input string (a Java compilation unit), for only the specified character ranges.
|
java.lang.String |
Formatter.formatSourceAndFixImports(java.lang.String input)
Formats an input string (a Java compilation unit) and fixes imports.
|
com.google.common.collect.ImmutableList<Replacement> |
Formatter.getFormatReplacements(java.lang.String input,
java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> characterRanges)
Emit a list of
Replacement s to convert from input to output. |
static java.lang.String |
RemoveUnusedImports.removeUnusedImports(java.lang.String contents) |
static java.lang.String |
RemoveUnusedImports.removeUnusedImports(java.lang.String contents,
RemoveUnusedImports.JavadocOnlyImports javadocOnlyImports)
Deprecated.
use
RemoveUnusedImports.removeUnusedImports(String) instead. |
static java.lang.String |
ImportOrderer.reorderImports(java.lang.String text)
Reorder the inputs in
text , a complete Java program. |
Constructor and Description |
---|
JavaInput(java.lang.String text)
Input constructor.
|
Copyright © 2015-2018 Google Inc.. All Rights Reserved.