| java.lang.Object com.sun.codemodel.CodeWriter
All known Subclasses: com.sun.codemodel.writer.SingleStreamCodeWriter, com.sun.codemodel.writer.FilterCodeWriter, com.sun.tools.xjc.api.util.FilerCodeWriter, com.sun.codemodel.writer.ZipCodeWriter, com.sun.codemodel.writer.FileCodeWriter,
CodeWriter | abstract public class CodeWriter (Code) | | Receives generated code and writes to the appropriate storage.
author: Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) |
Method Summary | |
abstract public void | close() Called by CodeModel at the end of the process. | abstract public OutputStream | openBinary(JPackage pkg, String fileName) Called by CodeModel to store the specified file.
The callee must allocate a storage to store the specified file.
The returned stream will be closed before the next file is
stored. | public Writer | openSource(JPackage pkg, String fileName) Called by CodeModel to store the specified file.
The callee must allocate a storage to store the specified file.
The returned stream will be closed before the next file is
stored. |
close | abstract public void close() throws IOException(Code) | | Called by CodeModel at the end of the process.
|
openBinary | abstract public OutputStream openBinary(JPackage pkg, String fileName) throws IOException(Code) | | Called by CodeModel to store the specified file.
The callee must allocate a storage to store the specified file.
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.
Parameters: pkg - The package of the file to be written. Parameters: fileName - File name without the path. Something like"Foo.java" or "Bar.properties" |
openSource | public Writer openSource(JPackage pkg, String fileName) throws IOException(Code) | | Called by CodeModel to store the specified file.
The callee must allocate a storage to store the specified file.
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.
Parameters: pkg - The package of the file to be written. Parameters: fileName - File name without the path. Something like"Foo.java" or "Bar.properties" |
|
|