Package com.google.googlejavaformat
Class Output
- 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
-
Fields inherited from class com.google.googlejavaformat.InputOutput
EMPTY_RANGE, ranges
-
-
Constructor Summary
Constructors Constructor Description Output()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidappend(java.lang.String text, com.google.common.collect.Range<java.lang.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.java.lang.StringtoString()-
Methods inherited from class com.google.googlejavaformat.InputOutput
computeRanges, getLine, getLineCount, getRanges, makeKToIJ, setLines
-
-
-
-
Method Detail
-
indent
public abstract void indent(int indent)
Indent by outputtingindentspaces.- Parameters:
indent- the current indent
-
append
public abstract void append(java.lang.String text, com.google.common.collect.Range<java.lang.Integer> range)Output a string.- Parameters:
text- the stringrange- theRangecorresponding to the string
-
blankLine
public abstract void blankLine(int k, OpsBuilder.BlankLineWanted wanted)A blank line is or is not wanted here.- Parameters:
k- theInput.Tokindexwanted- whether a blank line is wanted here
-
markForPartialFormat
public abstract void markForPartialFormat(Input.Token start, Input.Token end)
Marks a region that can be partially formatted.
-
getCommentsHelper
public abstract CommentsHelper getCommentsHelper()
Get theCommentsHelper.- Returns:
- the
CommentsHelper
-
toString
public java.lang.String toString()
- Overrides:
toStringin classInputOutput
-
-