Index
A B C D E F G H I J L M N O P R S T U V W Y Z
All Classes|All Packages
All Classes|All Packages
All Classes|All Packages
A
- actualSize(int, int) - Method in class com.google.googlejavaformat.OpsBuilder
- actualStartColumn(int) - Method in class com.google.googlejavaformat.OpsBuilder
- add(DocBuilder) - Method in enum com.google.googlejavaformat.CloseOp
- add(DocBuilder) - Method in class com.google.googlejavaformat.Doc.Break
- add(DocBuilder) - Method in class com.google.googlejavaformat.Doc.Token
- add(DocBuilder) - Method in interface com.google.googlejavaformat.Op
-
Add an
Op
to aDocBuilder
. - add(DocBuilder) - Method in class com.google.googlejavaformat.OpenOp
- addAll(List<Op>) - Method in class com.google.googlejavaformat.OpsBuilder
-
Add a list of
Op
s. - addBodyDeclarations(List<? extends Tree>, JavaInputAstVisitor.BracesOrNot, JavaInputAstVisitor.FirstDeclarationsOrNot) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
-
Add a list of declarations.
- AOSP - com.google.googlejavaformat.java.JavaFormatterOptions.Style
-
The AOSP-compliant configuration.
- append(String, Range<Integer>) - Method in class com.google.googlejavaformat.java.JavaOutput
- append(String, Range<Integer>) - Method in class com.google.googlejavaformat.Output
-
Output a string.
- applyReplacements(String, List<Replacement>) - Static method in class com.google.googlejavaformat.java.JavaOutput
B
- blankLine(int, OpsBuilder.BlankLineWanted) - Method in class com.google.googlejavaformat.java.JavaOutput
- blankLine(int, OpsBuilder.BlankLineWanted) - Method in class com.google.googlejavaformat.Output
-
A blank line is or is not wanted here.
- blankLineWanted(OpsBuilder.BlankLineWanted) - Method in class com.google.googlejavaformat.OpsBuilder
-
Force or suppress a blank line here in the output.
- BlankLineWanted() - Constructor for class com.google.googlejavaformat.OpsBuilder.BlankLineWanted
- breakOp() - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a
Doc.Break
. - breakOp(Doc.FillMode, String, Indent) - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a generic
Doc.Break
. - breakOp(Doc.FillMode, String, Indent, Optional<Output.BreakTag>) - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a generic
Doc.Break
. - breakOp(Indent) - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a
Doc.Break
. - breakOp(String) - Method in class com.google.googlejavaformat.OpsBuilder
- BreakTag() - Constructor for class com.google.googlejavaformat.Output.BreakTag
- breakToFill() - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a filled
Doc.Break
. - breakToFill(String) - Method in class com.google.googlejavaformat.OpsBuilder
- build() - Method in class com.google.googlejavaformat.DocBuilder
-
Return the
Doc
. - build() - Method in class com.google.googlejavaformat.java.JavaFormatterOptions.Builder
- build() - Method in class com.google.googlejavaformat.OpsBuilder
-
Build a list of
Op
s from theOpsBuilder
. - builder - Variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
- builder() - Static method in class com.google.googlejavaformat.java.JavaFormatterOptions
-
Returns a builder for
JavaFormatterOptions
.
C
- characterRangesToTokenRanges(Collection<Range<Integer>>) - Method in class com.google.googlejavaformat.java.JavaInput
- checkClosed(int) - Method in class com.google.googlejavaformat.OpsBuilder
-
Checks that all open ops in the op stream have matching close ops.
- CLASS_BODY_DECLARATIONS - com.google.googlejavaformat.java.SnippetFormatter.SnippetKind
- close() - Method in class com.google.googlejavaformat.OpsBuilder
-
Close the current level, by emitting a
CloseOp
. - CLOSE - com.google.googlejavaformat.CloseOp
- CloseOp - Enum in com.google.googlejavaformat
-
A
CloseOp
closes a level. - column() - Method in class com.google.googlejavaformat.FormatterDiagnostic
-
Returns the 0-indexed column number on which the error occurred, or
-1
if the error does not have a column. - com.google.googlejavaformat - module com.google.googlejavaformat
- com.google.googlejavaformat - package com.google.googlejavaformat
- com.google.googlejavaformat.java - package com.google.googlejavaformat.java
- com.google.googlejavaformat.java.filer - package com.google.googlejavaformat.java.filer
- com.google.googlejavaformat.java.java14 - package com.google.googlejavaformat.java.java14
- com.google.googlejavaformat.java.javadoc - package com.google.googlejavaformat.java.javadoc
- CommentsHelper - Interface in com.google.googlejavaformat
-
Rewrite comments.
- COMPACT_RECORD_CONSTRUCTOR - Static variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
- COMPILATION_UNIT - com.google.googlejavaformat.java.SnippetFormatter.SnippetKind
- computeBreaks(CommentsHelper, int, Doc.State) - Method in class com.google.googlejavaformat.Doc.Break
- computeBreaks(CommentsHelper, int, Doc.State) - Method in class com.google.googlejavaformat.Doc
-
Make breaking decisions for a
Doc
. - computeBreaks(CommentsHelper, int, Doc.State) - Method in class com.google.googlejavaformat.Doc.Token
- computeBreaks(Doc.State, int, boolean) - Method in class com.google.googlejavaformat.Doc.Break
- computeRanges(List<? extends Input.Tok>) - Method in class com.google.googlejavaformat.InputOutput
- conditional(Output.BreakTag) - Static method in class com.google.googlejavaformat.OpsBuilder.BlankLineWanted
-
Emit a blank line if the given break is taken.
- containsBreaks(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns true if the input contains any line breaks.
- count(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns the number of line breaks in the input.
- create(int, int, String) - Static method in class com.google.googlejavaformat.FormatterDiagnostic
- create(int, int, String) - Static method in class com.google.googlejavaformat.java.Replacement
- create(String) - Static method in class com.google.googlejavaformat.FormatterDiagnostic
- createClassFile(CharSequence, Element...) - Method in class com.google.googlejavaformat.java.filer.FormattingFiler
- createDiagnostic(int, String) - Method in class com.google.googlejavaformat.Input
-
Construct a diagnostic.
- createIndentationString(int) - Method in class com.google.googlejavaformat.java.SnippetFormatter
- createResource(JavaFileManager.Location, CharSequence, CharSequence, Element...) - Method in class com.google.googlejavaformat.java.filer.FormattingFiler
- createSourceFile(CharSequence, Element...) - Method in class com.google.googlejavaformat.java.filer.FormattingFiler
D
- defaultOptions() - Static method in class com.google.googlejavaformat.java.JavaFormatterOptions
-
Returns the default formatting options.
- depth() - Method in class com.google.googlejavaformat.OpsBuilder
-
Returns the number of unclosed open ops in the input stream.
- diagnostic(String) - Method in class com.google.googlejavaformat.OpsBuilder
-
Create a
FormatterDiagnostic
at the current position. - diagnostics() - Method in error com.google.googlejavaformat.FormattingError
- diagnostics() - Method in exception com.google.googlejavaformat.java.FormatterException
- Doc - Class in com.google.googlejavaformat
- Doc() - Constructor for class com.google.googlejavaformat.Doc
- Doc.Break - Class in com.google.googlejavaformat
-
A leaf node in a
Doc
for an optional break. - Doc.FillMode - Enum in com.google.googlejavaformat
- Doc.State - Class in com.google.googlejavaformat
-
State for writing.
- Doc.Token - Class in com.google.googlejavaformat
-
A leaf
Doc
for a token. - Doc.Token.RealOrImaginary - Enum in com.google.googlejavaformat
-
Is a Token a real token, or imaginary (e.g., a token generated incorrectly, or an EOF)?
- DocBuilder - Class in com.google.googlejavaformat
- DocBuilder() - Constructor for class com.google.googlejavaformat.DocBuilder
-
Start to build a
DocBuilder
. - drain() - Method in class com.google.googlejavaformat.OpsBuilder
-
Output any remaining tokens from the input stream (e.g.
- dropEmptyDeclarations() - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
-
Skips over extra semi-colons at the top-level, or in a class member declaration lists.
E
- EMPTY_RANGE - Static variable in class com.google.googlejavaformat.InputOutput
- endTok(Input.Token) - Static method in class com.google.googlejavaformat.java.JavaOutput
-
The last non-whitespace Tok in the Token.
- equals(Object) - Method in class com.google.googlejavaformat.java.Replacement
- EXPRESSION - com.google.googlejavaformat.java.SnippetFormatter.SnippetKind
F
- firstBreak(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns the index of the first break in the input, or
-1
. - flush() - Method in class com.google.googlejavaformat.java.JavaOutput
-
Flush any incomplete last line, then add the EOF token into our data structures.
- FORCED - com.google.googlejavaformat.Doc.FillMode
- forcedBreak() - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a forced
Doc.Break
. - forcedBreak(Indent) - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a forced
Doc.Break
. - format(SnippetFormatter.SnippetKind, String, List<Range<Integer>>, int, boolean) - Method in class com.google.googlejavaformat.java.SnippetFormatter
-
Runs the Google Java formatter on the given source, with only the given ranges specified.
- format(String...) - Method in class com.google.googlejavaformat.java.Main
-
The main entry point for the formatter, with some number of file names to format.
- formatJavadoc(String, int) - Static method in class com.google.googlejavaformat.java.javadoc.JavadocFormatter
-
Formats the given Javadoc comment, which must start with ∕✱✱ and end with ✱∕.
- formatSource(CharSource, CharSink) - Method in class com.google.googlejavaformat.java.Formatter
-
Format the given input (a Java compilation unit) into the output stream.
- formatSource(String) - Method in class com.google.googlejavaformat.java.Formatter
-
Format an input string (a Java compilation unit) into an output string.
- formatSource(String, Collection<Range<Integer>>) - Method in class com.google.googlejavaformat.java.Formatter
-
Format an input string (a Java compilation unit), for only the specified character ranges.
- formatSourceAndFixImports(String) - Method in class com.google.googlejavaformat.java.Formatter
-
Formats an input string (a Java compilation unit) and fixes imports.
- Formatter - Class in com.google.googlejavaformat.java
-
This is google-java-format, a new Java formatter that follows the Google Java Style Guide quite precisely---to the letter and to the spirit.
- Formatter() - Constructor for class com.google.googlejavaformat.java.Formatter
-
A new Formatter instance with default options.
- Formatter(JavaFormatterOptions) - Constructor for class com.google.googlejavaformat.java.Formatter
- FormatterDiagnostic - Class in com.google.googlejavaformat
-
An error that prevented formatting from succeeding.
- FormatterException - Exception in com.google.googlejavaformat.java
-
Checked exception class for formatter errors.
- FormatterException(FormatterDiagnostic) - Constructor for exception com.google.googlejavaformat.java.FormatterException
- FormatterException(Iterable<FormatterDiagnostic>) - Constructor for exception com.google.googlejavaformat.java.FormatterException
- FormatterException(String) - Constructor for exception com.google.googlejavaformat.java.FormatterException
- FormattingError - Error in com.google.googlejavaformat
-
An unchecked formatting error.
- FormattingError(FormatterDiagnostic) - Constructor for error com.google.googlejavaformat.FormattingError
- FormattingError(Iterable<FormatterDiagnostic>) - Constructor for error com.google.googlejavaformat.FormattingError
- FormattingFiler - Class in com.google.googlejavaformat.java.filer
- FormattingFiler(Filer) - Constructor for class com.google.googlejavaformat.java.filer.FormattingFiler
- FormattingFiler(Filer, Messager) - Constructor for class com.google.googlejavaformat.java.filer.FormattingFiler
-
Create a new
FormattingFiler
. - fromJavacDiagnostics(Iterable<Diagnostic<? extends JavaFileObject>>) - Static method in exception com.google.googlejavaformat.java.FormatterException
G
- getColumn() - Method in interface com.google.googlejavaformat.Input.Tok
-
Return the
Tok
's0
-based column number. - getColumnNumber(int) - Method in class com.google.googlejavaformat.Input
-
Converts a character offset in the input to a 0-based column number.
- getColumnNumber(int) - Method in class com.google.googlejavaformat.java.JavaInput
- getCommentsHelper() - Method in class com.google.googlejavaformat.java.JavaOutput
- getCommentsHelper() - Method in class com.google.googlejavaformat.Output
-
Get the
CommentsHelper
. - getFormatReplacements(RangeSet<Integer>) - Method in class com.google.googlejavaformat.java.JavaOutput
-
Emit a list of
Replacement
s to convert from input to output. - getFormatReplacements(String, Collection<Range<Integer>>) - Method in class com.google.googlejavaformat.java.Formatter
-
Emit a list of
Replacement
s to convert from input to output. - getIndex() - Method in interface com.google.googlejavaformat.Input.Tok
-
Return the
Tok
's index. - getInput() - Method in class com.google.googlejavaformat.OpsBuilder
-
Get the
OpsBuilder
'sInput
. - getkN() - Method in class com.google.googlejavaformat.Input
-
Get the number of toks.
- getkN() - Method in class com.google.googlejavaformat.java.JavaInput
-
Get the number of toks.
- getLine(int) - Method in class com.google.googlejavaformat.InputOutput
-
Get a line.
- getLineCount() - Method in class com.google.googlejavaformat.InputOutput
-
Get the line count.
- getLineEnding(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns the terminating line break in the input, or
null
if the input does not end in a break. - getLineNumber(int) - Method in class com.google.googlejavaformat.Input
-
Converts a character offset in the input to a line number.
- getLineNumber(int) - Method in class com.google.googlejavaformat.java.JavaInput
- getOriginalText() - Method in interface com.google.googlejavaformat.Input.Tok
-
The
Tok
's original text (before processing escapes). - getPosition() - Method in interface com.google.googlejavaformat.Input.Tok
-
Return the
Tok
's0
-based position. - getPositionToColumnMap() - Method in class com.google.googlejavaformat.Input
- getPositionToColumnMap() - Method in class com.google.googlejavaformat.java.JavaInput
- getPositionTokenMap() - Method in class com.google.googlejavaformat.Input
-
A map from [start, end] position ranges to
Input.Token
s. - getPositionTokenMap() - Method in class com.google.googlejavaformat.java.JavaInput
-
Get the navigable map from position to
JavaInput.Token
. - getRanges(int) - Method in class com.google.googlejavaformat.InputOutput
- getReplacementString() - Method in class com.google.googlejavaformat.java.Replacement
-
The string to replace the range of characters with.
- getReplaceRange() - Method in class com.google.googlejavaformat.java.Replacement
-
The range of characters in the original source to replace.
- getResource(JavaFileManager.Location, CharSequence, CharSequence) - Method in class com.google.googlejavaformat.java.filer.FormattingFiler
- getText() - Method in class com.google.googlejavaformat.Input
- getText() - Method in interface com.google.googlejavaformat.Input.Tok
-
The
Tok
's text. - getText() - Method in class com.google.googlejavaformat.java.JavaInput
-
Get the input text.
- getTok() - Method in interface com.google.googlejavaformat.Input.Token
-
Get the token's
Input.Tok
. - getToken(int) - Method in class com.google.googlejavaformat.Input
-
Get the Token by index.
- getToken(int) - Method in class com.google.googlejavaformat.java.JavaInput
-
Get the Token by index.
- getTokens() - Method in class com.google.googlejavaformat.Input
-
Get the input tokens.
- getTokens() - Method in class com.google.googlejavaformat.java.JavaInput
-
Get the input tokens.
- getToksAfter() - Method in interface com.google.googlejavaformat.Input.Token
-
Get the later
Input.Tok
s assigned to thisToken
. - getToksBefore() - Method in interface com.google.googlejavaformat.Input.Token
-
Get the earlier
Input.Tok
s assigned to thisToken
. - GOOGLE - com.google.googlejavaformat.java.JavaFormatterOptions.Style
-
The default Google Java Style configuration.
- guessLineSeparator(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns the first line separator in the text, or
"\n"
if the text does not contain a single line separator. - guessToken(String) - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit an optional token iff it exists on the input.
H
- hashCode() - Method in class com.google.googlejavaformat.java.Replacement
- hasNewlineAt(String, int) - Static method in class com.google.googlejavaformat.Newlines
-
Returns the length of the newline sequence at the current offset, or
-1
. - HORIZONTAL - com.google.googlejavaformat.java.JavaInputAstVisitor.Direction
I
- IMAGINARY - com.google.googlejavaformat.Doc.Token.RealOrImaginary
- ImportOrderer - Class in com.google.googlejavaformat.java
-
Orders imports in Java source code.
- indent(int) - Method in class com.google.googlejavaformat.java.JavaOutput
- indent(int) - Method in class com.google.googlejavaformat.Output
-
Indent by outputting
indent
spaces. - Indent - Class in com.google.googlejavaformat
-
An indent for a
Doc.Level
orDoc.Break
. - Indent() - Constructor for class com.google.googlejavaformat.Indent
- Indent.Const - Class in com.google.googlejavaformat
-
A constant function, returning a constant indent.
- Indent.If - Class in com.google.googlejavaformat
-
A conditional function, whose value depends on whether a break was taken.
- indentationMultiplier() - Method in class com.google.googlejavaformat.java.JavaFormatterOptions
-
Returns the multiplier for the unit of indent.
- indentMultiplier - Variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
- INDEPENDENT - com.google.googlejavaformat.Doc.FillMode
-
If a
Doc.Level
will not fit on one line, itsINDEPENDENT
Doc.Break
s will be broken independently of each other, to fill in theDoc.Level
. - Input - Class in com.google.googlejavaformat
-
An input to the formatter.
- Input() - Constructor for class com.google.googlejavaformat.Input
- Input.Tok - Interface in com.google.googlejavaformat
-
A
Tok
("tock") is a token, or a comment, or a newline, or a maximal string of blanks. - Input.Token - Interface in com.google.googlejavaformat
-
A
Token
is a language-level token. - InputOutput - Class in com.google.googlejavaformat
- InputOutput() - Constructor for class com.google.googlejavaformat.InputOutput
- isComment() - Method in interface com.google.googlejavaformat.Input.Tok
-
Is the
Tok
a comment? - isJavadocComment() - Method in interface com.google.googlejavaformat.Input.Tok
-
Is the
Tok
a javadoc comment? - isNewline() - Method in interface com.google.googlejavaformat.Input.Tok
-
Is the
Tok
a newline? - isNewline(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns true if the entire input string is a recognized line break.
- isSlashSlashComment() - Method in interface com.google.googlejavaformat.Input.Tok
-
Is the
Tok
a "//" comment? - isSlashStarComment() - Method in interface com.google.googlejavaformat.Input.Tok
-
Is the
Tok
a "//" comment?
J
- Java14InputAstVisitor - Class in com.google.googlejavaformat.java.java14
-
Extends
JavaInputAstVisitor
with support for AST nodes that were added or modified for Java 14. - Java14InputAstVisitor(OpsBuilder, int) - Constructor for class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
- JavaCommentsHelper - Class in com.google.googlejavaformat.java
-
JavaCommentsHelper
extendsCommentsHelper
to rewrite Java comments. - JavaCommentsHelper(String, JavaFormatterOptions) - Constructor for class com.google.googlejavaformat.java.JavaCommentsHelper
- JavadocFormatter - Class in com.google.googlejavaformat.java.javadoc
-
Entry point for formatting Javadoc.
- JavaFormatterOptions - Class in com.google.googlejavaformat.java
-
Options for a google-java-format invocation.
- JavaFormatterOptions.Builder - Class in com.google.googlejavaformat.java
-
A builder for
JavaFormatterOptions
. - JavaFormatterOptions.Style - Enum in com.google.googlejavaformat.java
- JavaInput - Class in com.google.googlejavaformat.java
-
JavaInput
extendsInput
to represent a Java input document. - JavaInput(String) - Constructor for class com.google.googlejavaformat.java.JavaInput
-
Input constructor.
- JavaInputAstVisitor - Class in com.google.googlejavaformat.java
-
An AST visitor that builds a stream of
Op
s to format from the givenCompilationUnitTree
. - JavaInputAstVisitor(OpsBuilder, int) - Constructor for class com.google.googlejavaformat.java.JavaInputAstVisitor
-
The
Visitor
constructor. - JavaInputAstVisitor.BracesOrNot - Enum in com.google.googlejavaformat.java
-
Whether to include braces.
- JavaInputAstVisitor.Direction - Enum in com.google.googlejavaformat.java
-
Direction for Annotations (usually VERTICAL).
- JavaInputAstVisitor.FirstDeclarationsOrNot - Enum in com.google.googlejavaformat.java
-
Whether these declarations are the first in the block.
- JavaOutput - Class in com.google.googlejavaformat.java
-
JavaOutput
extendsOutput
to represent a Java output document. - JavaOutput(String, Input, CommentsHelper) - Constructor for class com.google.googlejavaformat.java.JavaOutput
-
JavaOutput
constructor.
L
- length() - Method in interface com.google.googlejavaformat.Input.Tok
-
The length of the
Tok
's original text. - line() - Method in class com.google.googlejavaformat.FormatterDiagnostic
-
Returns the line number on which the error occurred, or
-1
if the error does not have a line number. - lineIterator(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns an iterator over lines in the input, including trailing whitespace.
- lineOffsetIterator(String) - Static method in class com.google.googlejavaformat.Newlines
-
Returns an iterator over the start offsets of lines in the input.
- lineRangesToCharRanges(String, RangeSet<Integer>) - Static method in class com.google.googlejavaformat.java.Formatter
-
Converts zero-indexed, [closed, open) line ranges in the given source file to character ranges.
- LOWER_CAMEL - com.google.googlejavaformat.java.TypeNameClassifier.JavaCaseFormat
- LOWERCASE - com.google.googlejavaformat.java.TypeNameClassifier.JavaCaseFormat
M
- main(String[]) - Static method in class com.google.googlejavaformat.java.Main
-
The main method for the formatter, with some number of file names to format.
- Main - Class in com.google.googlejavaformat.java
-
The main class for the Java formatter CLI.
- Main(PrintWriter, PrintWriter, InputStream) - Constructor for class com.google.googlejavaformat.java.Main
- make() - Static method in enum com.google.googlejavaformat.CloseOp
-
Make a
CloseOp
, returning a singleton since they are all the same. - make(int, int) - Static method in class com.google.googlejavaformat.Indent.Const
- make(Doc.FillMode, String, Indent) - Static method in class com.google.googlejavaformat.Doc.Break
-
Make a
Break
. - make(Doc.FillMode, String, Indent, Optional<Output.BreakTag>) - Static method in class com.google.googlejavaformat.Doc.Break
-
Make a
Break
. - make(Indent) - Static method in class com.google.googlejavaformat.OpenOp
-
Make an ordinary
OpenOp
. - make(Output.BreakTag, Indent, Indent) - Static method in class com.google.googlejavaformat.Indent.If
- makeForced() - Static method in class com.google.googlejavaformat.Doc.Break
-
Make a forced
Break
. - makeKToIJ(InputOutput) - Static method in class com.google.googlejavaformat.InputOutput
-
Given an
InputOutput
, compute the map from tok indices to line ranges. - markForPartialFormat() - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- markForPartialFormat() - Method in class com.google.googlejavaformat.OpsBuilder
-
Make the boundary of a region that can be partially formatted.
- markForPartialFormat(Input.Token, Input.Token) - Method in class com.google.googlejavaformat.java.JavaOutput
- markForPartialFormat(Input.Token, Input.Token) - Method in class com.google.googlejavaformat.Output
-
Marks a region that can be partially formatted.
- MAX_LINE_LENGTH - Static variable in class com.google.googlejavaformat.java.Formatter
- merge(OpsBuilder.BlankLineWanted) - Method in class com.google.googlejavaformat.OpsBuilder.BlankLineWanted
-
Merge this blank line request with another.
- message() - Method in class com.google.googlejavaformat.FormatterDiagnostic
-
Returns a description of the problem that prevented formatting from succeeding.
- minusFour - Variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
- minusTwo - Variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
N
- Newlines - Class in com.google.googlejavaformat
-
Platform-independent newline handling.
- Newlines() - Constructor for class com.google.googlejavaformat.Newlines
- NO - com.google.googlejavaformat.java.JavaInputAstVisitor.BracesOrNot
- NO - com.google.googlejavaformat.java.JavaInputAstVisitor.FirstDeclarationsOrNot
- NO - Static variable in class com.google.googlejavaformat.OpsBuilder.BlankLineWanted
-
Never emit a blank line.
O
- op(String) - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a single- or multi-character op by breaking it into single-character
Doc.Token
s. - Op - Interface in com.google.googlejavaformat
-
An
Op
is a member of the sequence of formatting operations emitted byOpsBuilder
and transformed byDocBuilder
into aDoc
. - open(Indent) - Method in class com.google.googlejavaformat.OpsBuilder
-
Open a new level by emitting an
OpenOp
. - OpenOp - Class in com.google.googlejavaformat
-
An
OpenOp
opens a level. - OpsBuilder - Class in com.google.googlejavaformat
- OpsBuilder(Input, Output) - Constructor for class com.google.googlejavaformat.OpsBuilder
-
The
OpsBuilder
constructor. - OpsBuilder.BlankLineWanted - Class in com.google.googlejavaformat
-
A request to add or remove a blank line in the output.
- Output - Class in com.google.googlejavaformat
-
An output from the formatter.
- Output() - Constructor for class com.google.googlejavaformat.Output
- Output.BreakTag - Class in com.google.googlejavaformat
-
Unique identifier for a break.
P
- peekToken() - Method in class com.google.googlejavaformat.OpsBuilder
-
Return the text of the next
Input.Token
, or absent if there is none. - peekToken(int) - Method in class com.google.googlejavaformat.OpsBuilder
-
Return the text of an upcoming
Input.Token
, or absent if there is none. - plusFour - Variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
- plusTwo - Variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
- PRESERVE - Static variable in class com.google.googlejavaformat.OpsBuilder.BlankLineWanted
-
Explicitly preserve blank lines from the input (e.g.
- processArgs(String...) - Static method in class com.google.googlejavaformat.java.Main
-
Parses and validates command-line flags.
R
- ranges - Variable in class com.google.googlejavaformat.InputOutput
-
The
Range
s of the tokens or comments lying on each line, in any part. - REAL - com.google.googlejavaformat.Doc.Token.RealOrImaginary
- RECORD - Static variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
- recordBroken(boolean) - Method in class com.google.googlejavaformat.Output.BreakTag
- removeUnusedImports(String) - Static method in class com.google.googlejavaformat.java.RemoveUnusedImports
- RemoveUnusedImports - Class in com.google.googlejavaformat.java
-
Removes unused imports from a source file.
- RemoveUnusedImports() - Constructor for class com.google.googlejavaformat.java.RemoveUnusedImports
- reorderImports(String) - Static method in class com.google.googlejavaformat.java.ImportOrderer
-
Deprecated.Use
ImportOrderer.reorderImports(String, Style)
instead - reorderImports(String, JavaFormatterOptions.Style) - Static method in class com.google.googlejavaformat.java.ImportOrderer
-
Reorder the inputs in
text
, a complete Java program. - Replacement - Class in com.google.googlejavaformat.java
-
Represents a range in the original source and replacement text for that range.
- rewrite(Input.Tok, int, int) - Method in interface com.google.googlejavaformat.CommentsHelper
-
Try to rewrite comments, returning rewritten text.
- rewrite(Input.Tok, int, int) - Method in class com.google.googlejavaformat.java.JavaCommentsHelper
S
- scan(Tree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- setCompilationUnit(JCTree.JCCompilationUnit) - Method in class com.google.googlejavaformat.java.JavaInput
- setLines(ImmutableList<String>) - Method in class com.google.googlejavaformat.InputOutput
-
Set the lines.
- SnippetFormatter - Class in com.google.googlejavaformat.java
-
Formats a subset of a compilation unit.
- SnippetFormatter() - Constructor for class com.google.googlejavaformat.java.SnippetFormatter
- SnippetFormatter.SnippetKind - Enum in com.google.googlejavaformat.java
-
The kind of snippet to format.
- space() - Method in class com.google.googlejavaformat.OpsBuilder
-
Emit a
Doc.Space
. - startPosition(Input.Token) - Static method in class com.google.googlejavaformat.java.JavaOutput
-
The earliest position of any Tok in the Token, including leading whitespace.
- startTok(Input.Token) - Static method in class com.google.googlejavaformat.java.JavaOutput
-
The earliest non-whitespace Tok in the Token.
- State(int, int) - Constructor for class com.google.googlejavaformat.Doc.State
- STATEMENTS - com.google.googlejavaformat.java.SnippetFormatter.SnippetKind
- STRING_CONCAT_DELIMITER - Static variable in class com.google.googlejavaformat.java.StringWrapper
- StringWrapper - Class in com.google.googlejavaformat.java
-
Wraps string literals that exceed the column limit.
- style() - Method in class com.google.googlejavaformat.java.JavaFormatterOptions
-
Returns the code style.
- style(JavaFormatterOptions.Style) - Method in class com.google.googlejavaformat.java.JavaFormatterOptions.Builder
- sync(int) - Method in class com.google.googlejavaformat.OpsBuilder
-
Sync to position in the input.
- sync(Tree) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
-
Sync to position in the input.
T
- token(String) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
-
Emit a
Doc.Token
. - token(String, Doc.Token.RealOrImaginary, Indent, Optional<Indent>) - Method in class com.google.googlejavaformat.OpsBuilder
- token(String, Indent) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
-
Emit a
Doc.Token
. - toString() - Method in enum com.google.googlejavaformat.CloseOp
- toString() - Method in class com.google.googlejavaformat.Doc.Break
- toString() - Method in class com.google.googlejavaformat.Doc.State
- toString() - Method in class com.google.googlejavaformat.Doc.Token
- toString() - Method in class com.google.googlejavaformat.DocBuilder
- toString() - Method in class com.google.googlejavaformat.FormatterDiagnostic
- toString() - Method in class com.google.googlejavaformat.Indent.Const
- toString() - Method in class com.google.googlejavaformat.Indent.If
- toString() - Method in class com.google.googlejavaformat.Input
- toString() - Method in class com.google.googlejavaformat.InputOutput
- toString() - Method in class com.google.googlejavaformat.java.JavaInput
- toString() - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- toString() - Method in class com.google.googlejavaformat.java.JavaOutput
- toString() - Method in class com.google.googlejavaformat.OpenOp
- toString() - Method in class com.google.googlejavaformat.OpsBuilder
- toString() - Method in class com.google.googlejavaformat.Output
- TypeNameClassifier - Class in com.google.googlejavaformat.java
-
Heuristics for classifying qualified names as types.
- TypeNameClassifier.JavaCaseFormat - Enum in com.google.googlejavaformat.java
-
Case formats used in Java identifiers.
- typeParametersRest(List<? extends TypeParameterTree>, Indent) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
-
Does not omit the leading
"<"
, which should be associated with the type name.
U
- UNIFIED - com.google.googlejavaformat.Doc.FillMode
- UPPER_CAMEL - com.google.googlejavaformat.java.TypeNameClassifier.JavaCaseFormat
- UPPERCASE - com.google.googlejavaformat.java.TypeNameClassifier.JavaCaseFormat
V
- valueOf(String) - Static method in enum com.google.googlejavaformat.CloseOp
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.Doc.FillMode
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.Doc.Token.RealOrImaginary
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.java.JavaFormatterOptions.Style
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.java.JavaInputAstVisitor.BracesOrNot
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.java.JavaInputAstVisitor.Direction
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.java.JavaInputAstVisitor.FirstDeclarationsOrNot
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.java.SnippetFormatter.SnippetKind
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum com.google.googlejavaformat.java.TypeNameClassifier.JavaCaseFormat
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.google.googlejavaformat.CloseOp
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.Doc.FillMode
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.Doc.Token.RealOrImaginary
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.java.JavaFormatterOptions.Style
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.java.JavaInputAstVisitor.BracesOrNot
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.java.JavaInputAstVisitor.Direction
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.java.JavaInputAstVisitor.FirstDeclarationsOrNot
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.java.SnippetFormatter.SnippetKind
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.google.googlejavaformat.java.TypeNameClassifier.JavaCaseFormat
-
Returns an array containing the constants of this enum type, in the order they are declared.
- VERTICAL - com.google.googlejavaformat.java.JavaInputAstVisitor.Direction
- visit(Name) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitAnnotatedType(AnnotatedTypeTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitAnnotation(AnnotationTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitAnnotationArgument(AssignmentTree) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitAnnotationType(ClassTree) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitArrayAccess(ArrayAccessTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitArrayInitializer(List<? extends ExpressionTree>) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitArrayType(ArrayTypeTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitAssert(AssertTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitAssignment(AssignmentTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitBinary(BinaryTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitBindingPattern(BindingPatternTree, Void) - Method in class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
- visitBlock(BlockTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitBreak(BreakTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitCase(CaseTree, Void) - Method in class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
- visitCase(CaseTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitCatch(CatchTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitClass(ClassTree, Void) - Method in class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
- visitClass(ClassTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitClassDeclaration(ClassTree) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitCompilationUnit(CompilationUnitTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitCompoundAssignment(CompoundAssignmentTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitConditionalExpression(ConditionalExpressionTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitContinue(ContinueTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitDoWhileLoop(DoWhileLoopTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitEmptyStatement(EmptyStatementTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitEnhancedForLoop(EnhancedForLoopTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitEnumDeclaration(ClassTree) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitExports(ExportsTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitExpressionStatement(ExpressionStatementTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitForLoop(ForLoopTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitFormals(Optional<VariableTree>, List<? extends VariableTree>) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitIdentifier(IdentifierTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitIf(IfTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitImport(ImportTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitInstanceOf(InstanceOfTree, Void) - Method in class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
- visitInstanceOf(InstanceOfTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitIntersectionType(IntersectionTypeTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitLabeledStatement(LabeledStatementTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitLambdaExpression(LambdaExpressionTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitLiteral(LiteralTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitMemberReference(MemberReferenceTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitMemberSelect(MemberSelectTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitMethod(MethodTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitMethodInvocation(MethodInvocationTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitModifiers(ModifiersTree, JavaInputAstVisitor.Direction, Optional<Output.BreakTag>) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
-
Output combined modifiers and annotations and returns the trailing break.
- visitModifiers(ModifiersTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitModifiers(List<? extends AnnotationTree>, JavaInputAstVisitor.Direction, Optional<Output.BreakTag>) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitModule(ModuleTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitNewArray(NewArrayTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitNewClass(NewClassTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitOpens(OpensTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitParameterizedType(ParameterizedTypeTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitParenthesized(ParenthesizedTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitPrimitiveType(PrimitiveTypeTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitProvides(ProvidesTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitRecordDeclaration(ClassTree) - Method in class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
- visitRequires(RequiresTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitReturn(ReturnTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitStatements(List<? extends StatementTree>) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitSwitch(ExpressionTree, List<? extends CaseTree>) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitSwitch(SwitchTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitSwitchExpression(SwitchExpressionTree, Void) - Method in class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
- visitSynchronized(SynchronizedTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitThrow(ThrowTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitTry(TryTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitTypeCast(TypeCastTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitTypeParameter(TypeParameterTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitUnary(UnaryTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitUnionType(UnionTypeTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitUses(UsesTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitVariable(VariableTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitWhileLoop(WhileLoopTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitWildcard(WildcardTree, Void) - Method in class com.google.googlejavaformat.java.JavaInputAstVisitor
- visitYield(YieldTree, Void) - Method in class com.google.googlejavaformat.java.java14.Java14InputAstVisitor
W
- wanted() - Method in class com.google.googlejavaformat.OpsBuilder.BlankLineWanted
-
Is the blank line wanted?
- wasBreakTaken() - Method in class com.google.googlejavaformat.Output.BreakTag
- withOps(List<Op>) - Method in class com.google.googlejavaformat.DocBuilder
-
Add a list of
Op
s to theOpsBuilder
. - wrap(String, Formatter) - Static method in class com.google.googlejavaformat.java.StringWrapper
-
Reflows long string literals in the given Java source code.
- write(Output) - Method in class com.google.googlejavaformat.Doc.Break
- write(Output) - Method in class com.google.googlejavaformat.Doc.Token
- write(Output) - Method in class com.google.googlejavaformat.Doc
-
Write a
Doc
to anOutput
, after breaking decisions have been made.
Y
- YES - com.google.googlejavaformat.java.JavaInputAstVisitor.BracesOrNot
- YES - com.google.googlejavaformat.java.JavaInputAstVisitor.FirstDeclarationsOrNot
- YES - Static variable in class com.google.googlejavaformat.OpsBuilder.BlankLineWanted
-
Always emit a blank line.
Z
- ZERO - Static variable in class com.google.googlejavaformat.Indent.Const
- ZERO - Static variable in class com.google.googlejavaformat.java.JavaInputAstVisitor
All Classes|All Packages