de.java2html.converter
Class JavaSource2TeXConverter

java.lang.Object
  extended by de.java2html.converter.AbstractJavaSourceConverter
      extended by de.java2html.converter.JavaSource2TeXConverter
All Implemented Interfaces:
IJavaSourceConverter

public class JavaSource2TeXConverter
extends AbstractJavaSourceConverter

Algorithm and stuff for converting a TypedSource object to to a TeX string representation (experimental!). For questions, suggestions, bug-reports, enhancement-requests etc. I may be contacted at: markus@jave.de The Java2html home page is located at: http://www.java2html.de

Version:
2.0, 05/07/02 Copyright (C) Markus Gebhard 2000-2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Author:
Markus Gebhard

Constructor Summary
JavaSource2TeXConverter()
           
 
Method Summary
 void convert(TypedSource source, JavaSourceConversionOptions options, java.io.BufferedWriter writer)
          Converts the parsed source code to HTML by adding color information, adding line breaks and replacing characters as needed for HTML.
 java.lang.String getBlockSeparator(JavaSourceConversionOptions options)
          Returns the code that has to be placed between two blocks of converted code.
 java.lang.String getDocumentFooter(JavaSourceConversionOptions options)
          Returns a footer for the result document.
 java.lang.String getDocumentHeader(JavaSourceConversionOptions options, java.lang.String title)
          Returns a header for the result document.
static void main(java.lang.String[] args)
           
 void writeLineNumber(java.io.BufferedWriter writer, int lineNumber, int lineCount)
           
 
Methods inherited from class de.java2html.converter.AbstractJavaSourceConverter
convert, getDefaultFileExtension, getMetaData, writeBlockSeparator, writeDocumentFooter, writeDocumentHeader
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSource2TeXConverter

public JavaSource2TeXConverter()
Method Detail

getDocumentHeader

public java.lang.String getDocumentHeader(JavaSourceConversionOptions options,
                                          java.lang.String title)
Description copied from class: AbstractJavaSourceConverter
Returns a header for the result document. This one will be placed before the first block of converted code. Subclasses can return an empty String ("") if there is none neccessary.

Specified by:
getDocumentHeader in class AbstractJavaSourceConverter

getDocumentFooter

public java.lang.String getDocumentFooter(JavaSourceConversionOptions options)
Description copied from class: AbstractJavaSourceConverter
Returns a footer for the result document. This one will be placed behind the last block of converted code. Subclasses can return an empty String ("") if there is none neccessary.

Specified by:
getDocumentFooter in class AbstractJavaSourceConverter

getBlockSeparator

public java.lang.String getBlockSeparator(JavaSourceConversionOptions options)
Description copied from class: AbstractJavaSourceConverter
Returns the code that has to be placed between two blocks of converted code. Subclasses can return an empty String ("") if there is none neccessary.

Specified by:
getBlockSeparator in class AbstractJavaSourceConverter

convert

public void convert(TypedSource source,
                    JavaSourceConversionOptions options,
                    java.io.BufferedWriter writer)
             throws java.io.IOException
Converts the parsed source code to HTML by adding color information, adding line breaks and replacing characters as needed for HTML. Also adds a table with line numbers etc.

Specified by:
convert in class AbstractJavaSourceConverter
Throws:
java.io.IOException

writeLineNumber

public void writeLineNumber(java.io.BufferedWriter writer,
                            int lineNumber,
                            int lineCount)
                     throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2003 - 2006