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

public Class ProgressCodeWriter

extends FilterCodeWriter
Class Inheritance
Imports
java.io.File, .IOException, .OutputStream, .PrintStream, .Writer, com.sun.codemodel.CodeWriter, .JPackage

Filter CodeWriter that writes a progress message to the specified PrintStream.
Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private final PrintStream
Inherited from com.sun.codemodel.writer.FilterCodeWriter:
core

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public OutputStream
openBinary(JPackage pkg, String fileName)

Overrides com.sun.codemodel.writer.FilterCodeWriter.openBinary.

Called by CodeModel to store the specified file.

public Writer
openSource(JPackage pkg, String fileName)

Overrides com.sun.codemodel.writer.FilterCodeWriter.openSource.

Called by CodeModel to store the specified file.

private void
report(JPackage pkg, String fileName)

Inherited from com.sun.codemodel.writer.FilterCodeWriter:
close

Field Detail

progressback to summary
private final PrintStream progress

Constructor Detail

ProgressCodeWriterback to summary
public ProgressCodeWriter(CodeWriter output, PrintStream progress)

Method Detail

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

Overrides com.sun.codemodel.writer.FilterCodeWriter.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.writer.FilterCodeWriter.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
reportback to summary
private void report(JPackage pkg, String fileName)