Output.BreakTagEMPTY_RANGE, range0s, range1s, ranges| Constructor and Description |
|---|
JavaOutput(JavaInput javaInput,
CommentsHelper commentsHelper)
JavaOutput constructor. |
| Modifier and Type | Method and Description |
|---|---|
void |
append(String text,
Range<Integer> range)
Output a string.
|
void |
blankLine(int k,
OpsBuilder.BlankLineWanted wanted)
A blank line is or is not wanted here.
|
static Input.Tok |
endTok(Input.Token token)
The last non-whitespace Tok in the Token.
|
CommentsHelper |
getCommentsHelper()
Get the
CommentsHelper. |
ImmutableList<Replacement> |
getFormatReplacements(RangeSet<Integer> iRangeSet0)
Emit a list of
Replacements to convert from input to output. |
void |
indent(int indent)
Indent by outputting
indent spaces. |
void |
markForPartialFormat(int k)
Marks the boundary of a region that can be partially formatted.
|
static int |
startPosition(Input.Token token)
The earliest position of any Tok in the Token, including leading whitespace.
|
static Input.Tok |
startTok(Input.Token token)
The earliest non-whitespace Tok in the Token.
|
String |
toString() |
void |
writeMerged(Appendable writer,
RangeSet<Integer> iRangeSet0)
Merge the (un-reformatted) input lines and the (reformatted) output lines.
|
computeRanges, getLine, getLineCount, getRange0s, getRange1s, getRanges, makeKToIJ, setLinespublic JavaOutput(JavaInput javaInput, CommentsHelper commentsHelper)
JavaOutput constructor.javaInput - the JavaInput, used to match up blank lines in the outputcommentsHelper - the CommentsHelper, used to rewrite commentspublic void blankLine(int k,
OpsBuilder.BlankLineWanted wanted)
Outputpublic void markForPartialFormat(int k)
OutputmarkForPartialFormat in class Outputk - the token indexpublic void append(String text, Range<Integer> range)
Outputpublic void indent(int indent)
Outputindent spaces.public CommentsHelper getCommentsHelper()
OutputCommentsHelper.getCommentsHelper in class OutputCommentsHelperpublic ImmutableList<Replacement> getFormatReplacements(RangeSet<Integer> iRangeSet0)
Replacements to convert from input to output.Replacements, sorted by start index, without overlapspublic void writeMerged(Appendable writer, RangeSet<Integer> iRangeSet0) throws IOException
writer - the destination WriteriRangeSet0 - the canonical Range of tokens to reformatIOExceptionpublic static int startPosition(Input.Token token)
public static Input.Tok startTok(Input.Token token)
public static Input.Tok endTok(Input.Token token)
Copyright © 2015–2016 Google Inc.. All rights reserved.