java.lang.Object
com.google.googlejavaformat.Doc
com.google.googlejavaformat.Doc.Token
- All Implemented Interfaces:
Op
- Enclosing class:
- Doc
public static final class Doc.Token extends Doc implements Op
A leaf
Doc for a token.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDoc.Token.RealOrImaginaryIs 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 Type Method Description voidadd(DocBuilder builder)Add anOpto aDocBuilder.Doc.StatecomputeBreaks(CommentsHelper commentsHelper, int maxWidth, Doc.State state)Make breaking decisions for aDoc.StringtoString()voidwrite(Output output)Write aDocto anOutput, after breaking decisions have been made.
-
Method Details
-
add
Description copied from interface:OpAdd anOpto aDocBuilder.- Specified by:
addin interfaceOp- Parameters:
builder- theDocBuilder
-
computeBreaks
Description copied from class:DocMake breaking decisions for aDoc.- Specified by:
computeBreaksin classDocmaxWidth- the maximum line widthstate- the current output state- Returns:
- the new output state
-
write
Description copied from class:DocWrite aDocto anOutput, after breaking decisions have been made. -
toString
-