de.java2html.javasource
Class JavaSourceParser

java.lang.Object
  extended by de.java2html.javasource.JavaSourceParser

public class JavaSourceParser
extends java.lang.Object

Parses raw text to a TypedSource object. The parser can not only handle grammatically correct Java source files but also code snippets.

(Parsing is done in multiple steps starting with raw text where every character is classified as UNDEFINED and trying to find out more about it step by step. There are some state machines used for parsing. They are hand coded and quite complicated. The parser seems to be very stable, as I have not been reported a single bug now for about two years.)

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

Author:
Markus Gebhard Copyright (C) Markus Gebhard 2000-2003 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.

Constructor Summary
JavaSourceParser()
           
JavaSourceParser(JavaSourceConversionOptions options)
           
 
Method Summary
 TypedSource parse(java.io.File file)
           
 TypedSource parse(java.io.InputStream stream)
           
 TypedSource parse(java.io.Reader reader)
           
 TypedSource parse(java.lang.String rawText)
           
 TypedSource parse(java.net.URL url)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSourceParser

public JavaSourceParser()

JavaSourceParser

public JavaSourceParser(JavaSourceConversionOptions options)
Method Detail

parse

public TypedSource parse(java.io.File file)
                  throws java.io.IOException
Throws:
java.io.IOException

parse

public TypedSource parse(java.lang.String rawText)

parse

public TypedSource parse(java.net.URL url)
                  throws java.io.IOException
Throws:
java.io.IOException

parse

public TypedSource parse(java.io.InputStream stream)
                  throws java.io.IOException
Throws:
java.io.IOException

parse

public TypedSource parse(java.io.Reader reader)
                  throws java.io.IOException
Throws:
java.io.IOException


Copyright 2003 - 2006