|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.visit.PrettyPrinter
polyglot.visit.StringPrettyPrinter
public class StringPrettyPrinter
A PrettyPrinter generates output code from the processed AST. To use: new PrettyPrinter().printAst(node, new CodeWriter(out));
Nested Class Summary | |
---|---|
static class |
StringPrettyPrinter.StringCodeWriter
|
Field Summary |
---|
Fields inherited from class polyglot.visit.PrettyPrinter |
---|
appendSemicolon, printType |
Constructor Summary | |
---|---|
StringPrettyPrinter(int maxdepth)
|
Method Summary | |
---|---|
void |
print(Node parent,
Node child,
CodeWriter w)
Print an AST node using the given code writer. |
java.lang.String |
toString(Node ast)
|
Methods inherited from class polyglot.visit.PrettyPrinter |
---|
appendSemicolon, appendSemicolon, printAst, printType, printType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringPrettyPrinter(int maxdepth)
Method Detail |
---|
public void print(Node parent, Node child, CodeWriter w)
PrettyPrinter
CodeWriter.flush()
method must be called after this method
to ensure code is output. Use printAst
rather than this
method to print the entire AST; this method should only be called by
nodes to print their children.
print
in class PrettyPrinter
public java.lang.String toString(Node ast)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |