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.FillMode
flat
- the text when not brokenplusIndent
- extra indent if takenBreak
public static Doc.Break make(Doc.FillMode fillMode, String flat, Indent plusIndent, Optional<Output.BreakTag> optTag)
Break
.fillMode
- the Doc.FillMode
flat
- the text when not brokenplusIndent
- extra indent if takenoptTag
- an optional tag for remembering whether the break was takenBreak
public static Doc.Break makeForced()
Break
.Break
public void add(DocBuilder builder)
Op
Op
to a DocBuilder
.add
in interface Op
builder
- the DocBuilder
public Doc.State computeBreaks(CommentsHelper commentsHelper, int maxWidth, Doc.State state)
Doc
Doc
.computeBreaks
in class Doc
maxWidth
- the maximum line widthstate
- the current output statepublic void write(Output output)
Doc
Doc
to an Output
, after breaking decisions have been made.Copyright © 2015–2017 Google Inc.. All rights reserved.