| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.codemodel.CodeWriter
com.sun.codemodel.writer.SingleStreamCodeWriter
public class SingleStreamCodeWriter
Output all source files into a single stream with a little formatting header in front of each file. This is primarily for human consumption of the generated source code, such as to debug/test CodeModel or to quickly inspect the result.
Field Summary |
---|
Fields inherited from class com.sun.codemodel.CodeWriter |
---|
encoding |
Constructor Summary | |
---|---|
SingleStreamCodeWriter(OutputStream os) |
Method Summary | |
---|---|
void | close() Called by CodeModel at the end of the process. |
OutputStream | openBinary(JPackage pkg, String fileName) Called by CodeModel to store the specified file. |
Methods inherited from class com.sun.codemodel.CodeWriter |
---|
openSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleStreamCodeWriter(OutputStream os)
os
- This stream will be closed at the end of the code generation.Method Detail |
---|
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException
CodeWriter
The returned stream will be closed before the next file is stored. So the callee can assume that only one OutputStream is active at any given time.
openBinary
in class CodeWriter
pkg
- The package of the file to be written.fileName
- File name without the path. Something like "Foo.java" or "Bar.properties"IOException
public void close() throws IOException
CodeWriter
close
in class CodeWriter
IOException
| ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |