Package com.google.googlejavaformat
Class Output
java.lang.Object
com.google.googlejavaformat.InputOutput
com.google.googlejavaformat.Output
- Direct Known Subclasses:
JavaOutput
An output from the formatter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUnique identifier for a break. -
Field Summary
Fields inherited from class com.google.googlejavaformat.InputOutput
EMPTY_RANGE, ranges -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidOutput a string.abstract voidblankLine(int k, OpsBuilder.BlankLineWanted wanted) A blank line is or is not wanted here.abstract CommentsHelperGet theCommentsHelper.abstract voidindent(int indent) Indent by outputtingindentspaces.abstract voidmarkForPartialFormat(Input.Token start, Input.Token end) Marks a region that can be partially formatted.toString()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
-