Doc.Break, Doc.FillMode, Doc.State, Doc.Token| Modifier and Type | Method and Description |
|---|---|
void |
add(DocBuilder builder)
Add an
Op to a DocBuilder. |
Doc.State |
computeBreaks(CommentsHelper commentsHelper,
int maxWidth,
Doc.State state)
Make breaking decisions for a
Doc. |
Doc.State |
computeBreaks(Doc.State state,
int lastIndent,
boolean broken) |
static Doc.Break |
make(Doc.FillMode fillMode,
String flat,
Indent plusIndent)
Make a
Break. |
static Doc.Break |
make(Doc.FillMode fillMode,
String flat,
Indent plusIndent,
Optional<Output.BreakTag> optTag)
Make a
Break. |
static Doc.Break |
makeForced()
Make a forced
Break. |
String |
toString() |
void |
write(Output output)
Write a
Doc to an Output, after breaking decisions have been made. |
public static Doc.Break make(Doc.FillMode fillMode, String flat, Indent plusIndent)
Break.fillMode - the Doc.FillModeflat - the the text when not brokenplusIndent - extra indent if takenBreakpublic static Doc.Break make(Doc.FillMode fillMode, String flat, Indent plusIndent, Optional<Output.BreakTag> optTag)
Break.fillMode - the Doc.FillModeflat - the the text when not brokenplusIndent - extra indent if takenoptTag - an optional tag for remembering whether the break was takenBreakpublic static Doc.Break makeForced()
Break.Breakpublic void add(DocBuilder builder)
OpOp to a DocBuilder.add in interface Opbuilder - the DocBuilderpublic Doc.State computeBreaks(CommentsHelper commentsHelper, int maxWidth, Doc.State state)
DocDoc.computeBreaks in class DocmaxWidth - the maximum line widthstate - the current output statepublic void write(Output output)
DocDoc to an Output, after breaking decisions have been made.Copyright © 2015–2017 Google Inc.. All rights reserved.