EMPTY_RANGE, ranges| Constructor and Description |
|---|
JavaOutput(JavaInput javaInput,
InputMetadata inputMetadata)
JavaOutput constructor. |
| Modifier and Type | Method and Description |
|---|---|
void |
append(State state,
java.lang.String text,
com.google.common.collect.Range<java.lang.Integer> range)
Output a string.
|
static Input.Tok |
endTok(Input.Token token)
The last non-whitespace Tok in the Token.
|
com.google.common.collect.ImmutableList<com.palantir.javaformat.java.Replacement> |
getFormatReplacements(com.google.common.collect.RangeSet<java.lang.Integer> iRangeSet0)
Emit a list of
Replacements to convert from input to output. |
void |
indent(int indent)
Indent by outputting
indent spaces. |
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.
|
java.lang.String |
toString() |
computeRanges, getLine, getLineCount, getRanges, makeKToIJ, setLinespublic JavaOutput(JavaInput javaInput, InputMetadata inputMetadata)
JavaOutput constructor.javaInput - the JavaInput, used to match up blank lines in the outputpublic void append(State state, java.lang.String text, com.google.common.collect.Range<java.lang.Integer> range)
Outputpublic void indent(int indent)
Outputindent spaces.public com.google.common.collect.ImmutableList<com.palantir.javaformat.java.Replacement> getFormatReplacements(com.google.common.collect.RangeSet<java.lang.Integer> iRangeSet0)
Replacements to convert from input to output.Replacements, sorted by start index, without overlapspublic static int startPosition(Input.Token token)
public static Input.Tok startTok(Input.Token token)
public static Input.Tok endTok(Input.Token token)