|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface PrintVisitor.PrintRulesI
This interface specifies the method needed to implement a special print rule. A special rule must implement the append method, which should call pv.append to add a string to the output, call pv.printNoBrackets(node) to print a node with no bracket call pv.printBrackets(node) to print a node surrounded by round brackets.
For example
pv.addSpecialRule(Operator op,new PrintVisitor.PrintRulesI() { public void append(Node node, PrintVisitor pv) throws ParseException { pv.append("["); for(int i=0;i0) pv.append(","); node.jjtGetChild(i).jjtAccept(pv, null); } pv.append("]"); }});
Method Summary | |
---|---|
void |
append(Node node,
PrintVisitor pv)
The method called to append data for the rule. |
Method Detail |
---|
void append(Node node, PrintVisitor pv) throws JepException
JepException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |