All Classes and Interfaces
Class
Description
A leaf node in a
Doc for an optional break.Unique identifier for a break.
A
CloseOp closes a level.A leaf node in a
Doc for a non-token.Rewrite comments.
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.
An unchecked formatting error.
Orders imports in Java source code.
A constant function, returning a constant indent.
A conditional function, whose value depends on whether a break was taken.
An input to the formatter.
A
Tok ("tock") is a token, or a comment, or a newline, or a maximal string of blanks.A
Token is a language-level token.Records metadata about the input, namely existing blank lines that we might want to preserve, as well as what ranges
can be partially formatted.
Extends
JavaInputAstVisitor with support for AST nodes that were added or modified for Java 14.JavaCommentsHelper extends CommentsHelper to rewrite Java comments.Entry point for formatting Javadoc.
JavaInput extends Input to represent a Java input document.An AST visitor that builds a stream of
Ops to format from the given CompilationUnitTree.Whether to allow leading blank lines in blocks.
Whether to allow trailing blank lines in blocks.
Whether to include braces.
Whether to collapse empty blocks.
Direction for Annotations (usually VERTICAL).
Whether these declarations are the first in the block.
JavaOutput extends Output to represent a Java output document.How to decide whether to break the last inner level ("this level") of a parent level with
BreakBehaviour.Cases.preferBreakingLastInnerLevel(boolean).A
Level inside a Doc.The main class for the Java formatter CLI.
Platform-independent newline handling.
A Leaf node in a
Doc for a non-breaking space.These classes exist purely for observing the operation of
Doc.computeBreaks(com.palantir.javaformat.CommentsHelper, int, com.palantir.javaformat.doc.State, com.palantir.javaformat.doc.Obs.ExplorationNode), including all the alternative
hypotheses it has considered and rejected before deciding on the final formatting.Within an 'exploration', allows you to descend into child levels.
An
Op is a member of the sequence of formatting operations emitted by OpsBuilder and transformed by
DocBuilder into a Doc.An
OpenOp opens a level.A request to add or remove a blank line in the output.
An output from the formatter.
What are the conditions for a level to be partially inlineable.
Removes unused imports from a source file.
State for writing.
Wraps string literals that exceed the column limit.
A leaf
Doc for a token.Is a Token a real token, or imaginary (e.g., a token generated incorrectly, or an EOF)?
Heuristics for classifying qualified names as types.
Case formats used in Java identifiers.