|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.ashridgetech.jamda.code.CodeWriter
|
+--com.ashridgetech.jamda.code.JavaWriter
A CodeWriter specialised to write Java code.
Provides common Java statement coding functions.
ClassWriter| Field Summary |
| Fields inherited from class com.ashridgetech.jamda.code.CodeWriter |
underlyingWriter |
| Constructor Summary | |
protected |
JavaWriter(java.io.Writer writer)
Construct a JavaWriter attached to a Writer. |
| Method Summary | |
JavaWriter |
beginComment()
Start a plain comment. |
JavaWriter |
commentLine(java.lang.String line)
Write a plain comment line. |
JavaWriter |
endComment()
End a plain comment. |
JavaWriter |
endStmt()
End a statement and the current line. |
JavaWriter |
stmt(java.lang.String text)
Write a code statement on a line, indented to the current indent level, adding a statement terminator if it does not have one. |
JavaWriter |
writeModifiers(int modifiers)
Write the keywords for a set of modifiers. |
| Methods inherited from class com.ashridgetech.jamda.code.CodeWriter |
begin, commaDoubleList, commaList, copyNoIndent, copyWithIndent, end, end, endLine, flush, getWriter, in, line, newline, newline, out, quote, space, spaceWrite, spaceWrite, spaceWrite, startLine, startLine, write, write, write, writeSpace, writeSpace, writeSpace, writeSpaced, writeSpaced, writeSpaced |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected JavaWriter(java.io.Writer writer)
JavaWriter attached to a Writer.
writer - the Writer to which the code is written.| Method Detail |
public JavaWriter endStmt()
public JavaWriter stmt(java.lang.String text)
text - the text of the statement - may be null to produce an empty statement
public JavaWriter beginComment()
public JavaWriter endComment()
public JavaWriter commentLine(java.lang.String line)
line - the text of the comment linepublic JavaWriter writeModifiers(int modifiers)
modifiers - the OR'ed values of the Java reflection modifier
constants, as in Modifier.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||