Package groovy.util
Class NodePrinter
java.lang.Object
groovy.util.NodePrinter
A helper class for creating nested trees of data
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a printer that writes toSystem.out.NodePrinter(IndentPrinter out) Creates a printer backed by the suppliedIndentPrinter.NodePrinter(PrintWriter out) Creates a printer backed by the supplied writer. -
Method Summary
-
Field Details
-
out
Writer used for node output.
-
-
Constructor Details
-
NodePrinter
public NodePrinter()Creates a printer that writes toSystem.out. -
NodePrinter
Creates a printer backed by the supplied writer.- Parameters:
out- the writer to wrap
-
NodePrinter
Creates a printer backed by the suppliedIndentPrinter.- Parameters:
out- the printer to use
-
-
Method Details
-
print
Prints the supplied node tree.- Parameters:
node- the node to print
-
printName
Prints the node name.- Parameters:
node- the node whose name should be printed
-
printList
Prints a node value list.- Parameters:
list- the list to print
-
printAttributes
Prints node attributes.- Parameters:
attributes- the attributes to print
-