java.lang.Object
com.google.googlejavaformat.InputOutput
com.google.googlejavaformat.Output
- Direct Known Subclasses:
JavaOutput
public abstract class Output extends InputOutput
An output from the formatter.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOutput.BreakTagUnique identifier for a break. -
Field Summary
-
Constructor Summary
Constructors Constructor Description Output() -
Method Summary
Modifier and Type Method Description abstract voidappend(String text, Range<Integer> range)Output a string.abstract voidblankLine(int k, OpsBuilder.BlankLineWanted wanted)A blank line is or is not wanted here.abstract CommentsHelpergetCommentsHelper()Get theCommentsHelper.abstract voidindent(int indent)Indent by outputtingindentspaces.abstract voidmarkForPartialFormat(Input.Token start, Input.Token end)Marks a region that can be partially formatted.StringtoString()Methods inherited from class com.google.googlejavaformat.InputOutput
computeRanges, getLine, getLineCount, getRanges, makeKToIJ, setLines
-
Constructor Details
-
Output
public Output()
-
-
Method Details
-
indent
public abstract void indent(int indent)Indent by outputtingindentspaces.- Parameters:
indent- the current indent
-
append
Output a string.- Parameters:
text- the stringrange- theRangecorresponding to the string
-
blankLine
A blank line is or is not wanted here.- Parameters:
k- theInput.Tokindexwanted- whether a blank line is wanted here
-
markForPartialFormat
Marks a region that can be partially formatted. -
getCommentsHelper
Get theCommentsHelper.- Returns:
- the
CommentsHelper
-
toString
- Overrides:
toStringin classInputOutput
-