|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--de.hunsicker.jalopy.printer.AbstractPrinter
|
+--de.hunsicker.jalopy.printer.BasicDeclarationPrinter
|
+--de.hunsicker.jalopy.printer.EnumPrinter
The enum printer
| Field Summary | |
protected static Convention |
settings
The code convention settings. |
| Constructor Summary | |
protected |
EnumPrinter()
Creates a new EnumPrinter object. |
| Method Summary | |
protected void |
addClassComment(JavaNode node,
NodeWriter out)
Adds a Javadoc comment to the given CLASS_DEF node. |
protected void |
addComment(JavaNode node,
NodeWriter out)
Adds a Javadoc comment to the given node. |
protected void |
addInterfaceComment(JavaNode node,
NodeWriter out)
Adds a Javadoc comment to the given INTERFACE_DEF node. |
protected void |
addMethodComment(JavaNode node,
NodeWriter out)
Adds a Javadoc comment to the given METHOD_DEF node. |
protected int |
countChildrenLines(JavaNode n,
int current)
Counts the number of blank lines following a node |
static Printer |
getInstance()
Returns the sole instance of this class. |
protected void |
prepareComment(JavaNode lcurly,
JavaNode rcurly,
NodeWriter out)
|
void |
print(antlr.collections.AST node,
NodeWriter out)
Prints the enumeration |
void |
printChildren(antlr.collections.AST node,
NodeWriter out)
Prints all the children of the passed node |
protected void |
printIndentation(int diff,
NodeWriter out)
Outputs indentation whitespace according to the current marker offset. |
protected void |
printIndentation(de.hunsicker.jalopy.printer.Marker marker,
NodeWriter out)
Outputs indentation whitespace. |
protected void |
printIndentation(NodeWriter out)
Outputs indentation whitespace according to the current marker offset or indentation level (depends on the used indentation policy). |
void |
trackPosition(JavaNode node,
int line,
int column,
NodeWriter out)
Tracks the position of the given node by updating the position information. |
void |
trackPosition(JavaNode node,
NodeWriter out)
Tracks the position of the given node by updating the position information |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final Convention settings
| Constructor Detail |
protected EnumPrinter()
| Method Detail |
public static final Printer getInstance()
public void print(antlr.collections.AST node,
NodeWriter out)
throws java.io.IOException
print in interface Printerprint in class de.hunsicker.jalopy.printer.BasicDeclarationPrinternode - out -
java.io.IOException
protected void addClassComment(JavaNode node,
NodeWriter out)
node - a CLASS_DEF node.out - stream to write to.
protected void addComment(JavaNode node,
NodeWriter out)
node - node to add a Javadoc comment.out - stream to write to.
protected void addInterfaceComment(JavaNode node,
NodeWriter out)
node - a INTERFACE_DEF node.
protected void addMethodComment(JavaNode node,
NodeWriter out)
node - a METHOD_DEF node.out - stream to write to.
public final void printChildren(antlr.collections.AST node,
NodeWriter out)
throws java.io.IOException
java.io.IOException
public void trackPosition(JavaNode node,
NodeWriter out)
node - the node that needs its position tracked.out - stream to write to.
public void trackPosition(JavaNode node,
int line,
int column,
NodeWriter out)
node - the node that needs its position tracked.line - the new line position.column - the new column position.out - stream to write to.
protected void printIndentation(NodeWriter out)
throws java.io.IOException
out - stream to write to.
java.io.IOException - if an I/O error occured.
protected void printIndentation(de.hunsicker.jalopy.printer.Marker marker,
NodeWriter out)
throws java.io.IOException
marker - if not null this marker will be used to calculate the
right amount of indentation whitespace. Otherwise indentation depends on
the general indentation policy.out - stream to write to.
java.io.IOException - if an I/O error occured.
protected void printIndentation(int diff,
NodeWriter out)
throws java.io.IOException
diff - The amountout - stream to write to.
java.io.IOException - if an I/O error occured.
protected void prepareComment(JavaNode lcurly,
JavaNode rcurly,
NodeWriter out)
protected int countChildrenLines(JavaNode n,
int current)
n - The node
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||