01: package de.java2html.converter;
02:
03: import java.io.IOException;
04: import java.io.Writer;
05:
06: import de.java2html.javasource.JavaSource;
07: import de.java2html.options.JavaSourceConversionOptions;
08:
09: /**
10: * @author Markus Gebhard
11: */
12: public interface IJavaSourceConverter {
13:
14: public ConverterMetaData getMetaData();
15:
16: /** Returns the default filename extension for the output format of this converter,
17: * e.g. "html" or "tex".
18: * @deprecated As of 25.01.2006 (Markus Gebhard), replaced by {@link #getMetaData()}, {@link ConverterMetaData#getDefaultFileExtension()}
19: */
20: public String getDefaultFileExtension();
21:
22: /**
23: * Converts the given source code to the giveen writer, using the specified conversion options.
24: * @param source The source code to be converted to the output format specified
25: * by this converter.
26: * @param writer The writer to write the output to.
27: * @param options the options to be used for conversion.
28: * @throws IOException if an output error occures while writing to the given writer.
29: */
30: public void convert(JavaSource source,
31: JavaSourceConversionOptions options, Writer writer)
32: throws IOException;
33:
34: /**
35: * @param title An optional title (e.g. for the html title tag) or an empty string or <code>null</code> if none.
36: */
37: public void writeDocumentHeader(Writer writer,
38: JavaSourceConversionOptions options, String title)
39: throws IOException;
40:
41: public void writeDocumentFooter(Writer writer,
42: JavaSourceConversionOptions options) throws IOException;
43:
44: public void writeBlockSeparator(Writer writer,
45: JavaSourceConversionOptions options) throws IOException;
46:
47: }
|