private static JavaInput |
ModifierOrderer.applyReplacements(JavaInput javaInput,
com.google.common.collect.TreeRangeMap<java.lang.Integer,java.lang.String> replacementMap) |
Applies replacements to the given string.
|
private static java.lang.String |
StringWrapper.applyReplacements(java.lang.String javaInput,
com.google.common.collect.TreeRangeMap<java.lang.Integer,java.lang.String> replacementMap) |
Applies replacements to the given string.
|
private com.google.common.collect.ImmutableList<JavaInput.Tok> |
JavaInput.buildToks(java.lang.String text) |
Lex the input and build the list of toks.
|
(package private) static com.google.common.collect.ImmutableList<JavaInput.Tok> |
JavaInput.buildToks(java.lang.String text,
com.google.common.collect.ImmutableSet<com.sun.tools.javac.parser.Tokens.TokenKind> stopTokens) |
Lex the input and build the list of toks.
|
com.google.common.collect.RangeSet<java.lang.Integer> |
JavaInput.characterRangesToTokenRanges(java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> characterRanges) |
|
(package private) com.google.common.collect.Range<java.lang.Integer> |
JavaInput.characterRangeToTokenRange(com.google.common.collect.Range<java.lang.Integer> characterRange) |
Convert from a character range to a token range.
|
private java.lang.String |
FormatFileCallable.fixImports(java.lang.String input) |
|
(package private) static void |
Formatter.format(JavaInput javaInput,
JavaOutput javaOutput,
JavaFormatterOptions options) |
Construct a Formatter given a Java compilation unit.
|
com.google.common.collect.ImmutableList<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 Replacements to convert from input to output.
|
private static com.google.common.collect.TreeRangeMap<java.lang.Integer,java.lang.String> |
StringWrapper.getReflowReplacements(int columnLimit,
java.lang.String input) |
|
private static com.sun.tools.javac.tree.JCTree.JCCompilationUnit |
RemoveUnusedImports.parse(com.sun.tools.javac.util.Context context,
java.lang.String javaInput) |
|
private static com.sun.tools.javac.tree.JCTree.JCCompilationUnit |
StringWrapper.parse(java.lang.String source,
boolean allowStringFolding) |
Parses the given Java source.
|
static java.lang.String |
RemoveUnusedImports.removeUnusedImports(java.lang.String contents) |
|
private java.lang.String |
ImportOrderer.reorderImports() |
|
static java.lang.String |
ImportOrderer.reorderImports(java.lang.String text) |
Deprecated.
|
static java.lang.String |
ImportOrderer.reorderImports(java.lang.String text,
JavaFormatterOptions.Style style) |
Reorder the inputs in text, a complete Java program.
|
(package private) static JavaInput |
ModifierOrderer.reorderModifiers(JavaInput javaInput,
java.util.Collection<com.google.common.collect.Range<java.lang.Integer>> characterRanges) |
Reorders all modifiers in the given text and within the given character ranges to be in JLS
order.
|
(package private) static JavaInput |
ModifierOrderer.reorderModifiers(java.lang.String text) |
Reorders all modifiers in the given text to be in JLS order.
|
private ImportOrderer.StringAndIndex |
ImportOrderer.scanImported(int start) |
Scans the imported thing, the dot-separated name that comes after import [static] and before
the semicolon.
|
private ImportOrderer.ImportsAndIndex |
ImportOrderer.scanImports(int i) |
Scans a sequence of import lines.
|
(package private) static java.lang.String |
StringWrapper.wrap(int columnLimit,
java.lang.String input,
Formatter formatter) |
Reflows string literals in the given Java source code that extend past the given column limit.
|
static java.lang.String |
StringWrapper.wrap(java.lang.String input,
Formatter formatter) |
Reflows long string literals in the given Java source code.
|