java.lang.Object
com.google.googlejavaformat.Doc
com.google.googlejavaformat.Doc.Token
- All Implemented Interfaces:
Op
- Enclosing class:
- Doc
A leaf
Doc
for a token.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Is a Token a real token, or imaginary (e.g., a token generated incorrectly, or an EOF)?Nested classes/interfaces inherited from class com.google.googlejavaformat.Doc
Doc.Break, Doc.FillMode, Doc.State, Doc.Token
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(DocBuilder builder) Add anOp
to aDocBuilder
.computeBreaks
(CommentsHelper commentsHelper, int maxWidth, Doc.State state) Make breaking decisions for aDoc
.toString()
void
Write aDoc
to anOutput
, after breaking decisions have been made.
-
Method Details
-
add
Description copied from interface:Op
Add anOp
to aDocBuilder
.- Specified by:
add
in interfaceOp
- Parameters:
builder
- theDocBuilder
-
computeBreaks
Description copied from class:Doc
Make breaking decisions for aDoc
.- Specified by:
computeBreaks
in classDoc
maxWidth
- the maximum line widthstate
- the current output state- Returns:
- the new output state
-
write
Description copied from class:Doc
Write aDoc
to anOutput
, after breaking decisions have been made. -
toString
-