Top Description Fields Constructors Methods
com.sun.codemodel.writer

public Class FilterCodeWriter

extends CodeWriter
Class Inheritance
Known Direct Subclasses
com.sun.codemodel.writer.LicenseCodeWriter, com.sun.codemodel.writer.ProgressCodeWriter, com.sun.codemodel.writer.PrologCodeWriter, com.sun.tools.xjc.ProgressCodeWriter, com.sun.tools.xjc.XJCBase.AntProgressCodeWriter
Imports
java.io.OutputStream, .IOException, .Writer, com.sun.codemodel.CodeWriter, .JPackage

CodeWriter that delegates to another CodeWriter.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
protected CodeWriter
Inherited from com.sun.codemodel.CodeWriter:
encoding

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements abstract com.sun.codemodel.CodeWriter.close.

Called by CodeModel at the end of the process.

public OutputStream
openBinary(JPackage pkg, String fileName)

Implements abstract com.sun.codemodel.CodeWriter.openBinary.

Called by CodeModel to store the specified file.

public Writer
openSource(JPackage pkg, String fileName)

Overrides com.sun.codemodel.CodeWriter.openSource.

Called by CodeModel to store the specified file.

Field Detail

coreback to summary
protected CodeWriter core

Constructor Detail

FilterCodeWriterback to summary
public FilterCodeWriter(CodeWriter core)

Method Detail

closeback to summary
public void close() throws IOException

Implements abstract com.sun.codemodel.CodeWriter.close.

Doc from com.sun.codemodel.CodeWriter.close.

Called by CodeModel at the end of the process.

Annotations
@Override
openBinaryback to summary
public OutputStream openBinary(JPackage pkg, String fileName) throws IOException

Implements abstract com.sun.codemodel.CodeWriter.openBinary.

Doc from com.sun.codemodel.CodeWriter.openBinary.

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.

Annotations
@Override
openSourceback to summary
public Writer openSource(JPackage pkg, String fileName) throws IOException

Overrides com.sun.codemodel.CodeWriter.openSource.

Doc from com.sun.codemodel.CodeWriter.openSource.

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.

Annotations
@Override