Base class for Gradle pretty printing. All printing is delegated to a PrintWriter.
| Constructor and description |
|---|
GradlePrettyPrinter
(java.io.PrintWriter pWriter)Create a new GradlePrettyPrinter. |
| Type | Name and description |
|---|---|
void |
printClosureEnd()Decrement the indentation level and print the end of a closure at the new level. |
void |
printClosureStart(java.lang.String pName)Print the start of a closure at the current indentation level and increment the level. |
void |
printIndentation()Print the current indentation. |
void |
printIndentedLine(java.lang.String pString)Print a line at the current indentation level. |
void |
printKeyValue(java.lang.String pKey, java.lang.String pValue)Print a line containing a key and a value at the current indentation level. |
void |
printNameAndArgs(java.lang.String pName, java.lang.String pArgs)Print a line containing a name followed by and argument string inside parentheses at the current indentation level. |
void |
printSingleLineClosure(java.lang.String pName, java.lang.String pKey, java.lang.String pValue)Print a closure on a single line at the current indentation level. |
static java.lang.String |
quote(java.lang.String pValue)Enclose a value in quotes and escape any quotes in the value. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Create a new GradlePrettyPrinter.
pWriter is null.pWriter - The writer to delegate the printing to.Decrement the indentation level and print the end of a closure at the new level.
Print the start of a closure at the current indentation level and increment the level.
pName - The name of the closure, possibly null.Print the current indentation. Each indentation level is represented by two spaces.
Print a line at the current indentation level. The line consists of a single string.
pString - The string to print.Print a line containing a key and a value at the current indentation level.
pKey - The key to print.pValue - The value to print.Print a line containing a name followed by and argument string inside parentheses at the current indentation level.
pName - The name to print.pArgs - The argument string to print inside parentheses.Print a closure on a single line at the current indentation level.
pName - The name of the closure, possibly null.pKey - The closure's key.pValue - The closure's value.Enclose a value in quotes and escape any quotes in the value.
pValue - The value quote.