An OpenOp opens a level. It is an Op in the sequence of Ops generated by OpsBuilder. When the sequence is turned into a Doc by DocBuilder, Input.Toks delimited by OpenOp-CloseOp pairs turn into nested Doc.Levels.
| 23 | * Doc.Level}s. |
| 24 | */ |
| 25 | public final class OpenOp implements Op { |
| 26 | private final Indent plusIndent; |
| 27 | |
| 28 | private OpenOp(Indent plusIndent) { |
| 29 | this.plusIndent = plusIndent; |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Make an ordinary {@code OpenOp}. |
| 34 | * |
| 35 | * @param plusIndent the indent for breaks at this level |
| 36 | * @return the {@code OpenOp} |
| 37 | */ |
| 38 | public static Op make(Indent plusIndent) { |
| 39 | return new OpenOp(plusIndent); |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public void add(DocBuilder builder) { |
| 44 | builder.open(plusIndent); |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public String toString() { |
| 49 | return MoreObjects.toStringHelper(this).add("plusIndent", plusIndent).toString(); |
| 50 | } |
| 51 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…