|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.codemodel.JFormatter
public class JFormatter
This is a utility class for managing indentation and other basic formatting for PrintWriter.
Constructor Summary | |
---|---|
JFormatter(java.io.PrintWriter s)
Creates a formatter with default incremental indentations of four spaces. |
|
JFormatter(java.io.PrintWriter s,
java.lang.String space)
Creates a JFormatter. |
Method Summary | |
---|---|
JFormatter |
b(JVar v)
Cause the JVar to generate source for itself |
void |
close()
Closes this formatter. |
JFormatter |
d(JDeclaration d)
Cause the JDeclaration to generate source for itself |
JFormatter |
g(com.sun.codemodel.JGenerable g)
Cause the JGenerable object to generate source for iteself |
JFormatter |
i()
Increment the indentation level. |
JFormatter |
nl()
Print a new line into the stream |
JFormatter |
o()
Decrement the indentation level. |
JFormatter |
p(char c)
Print a char into the stream |
JFormatter |
p(java.lang.String s)
Print a String into the stream |
JFormatter |
s(JStatement s)
Cause the JStatement to generate source for itself |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JFormatter(java.io.PrintWriter s, java.lang.String space)
s
- PrintWriter to JFormatter to use.space
- Incremental indentation string, similar to tab value.public JFormatter(java.io.PrintWriter s)
Method Detail |
---|
public void close()
public JFormatter o()
public JFormatter i()
public JFormatter p(char c)
c
- the charpublic JFormatter p(java.lang.String s)
s
- the Stringpublic JFormatter nl()
public JFormatter g(com.sun.codemodel.JGenerable g)
g
- the JGenerable objectpublic JFormatter d(JDeclaration d)
d
- the JDeclaration objectpublic JFormatter s(JStatement s)
s
- the JStatement objectpublic JFormatter b(JVar v)
v
- the JVar object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |