org.apache.ws.jaxme.js.util
Class JavaParser

java.lang.Object
  extended by org.apache.ws.jaxme.js.util.JavaParser

public class JavaParser
extends java.lang.Object

The JavaParser is a utility class, that reads Java sources and converts them into instances of JavaSource.


Constructor Summary
JavaParser(JavaSourceFactory pFactory)
          Creates a new instance of JavaParser, that will use the given JavaSourceFactory for creating instances of JavaSource.
 
Method Summary
 JavaSourceFactory getFactory()
          Returns the factory.
 java.lang.String getPackageName()
          Returns the package name.
static void main(java.lang.String[] args)
          For tests
 java.util.List parse(java.io.File pFile)
          Parses the given file.
 java.util.List parse(java.io.Reader pReader)
          Parses the input read from the given Reader pReader.
 java.util.List parse(antlr.TokenStream pStream)
          Parses the given TokenStream pStream.
 void setPackageName(java.lang.String pPackageName)
          Sets the package name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaParser

public JavaParser(JavaSourceFactory pFactory)

Creates a new instance of JavaParser, that will use the given JavaSourceFactory for creating instances of JavaSource.

Method Detail

getFactory

public JavaSourceFactory getFactory()
Returns the factory.


getPackageName

public java.lang.String getPackageName()
Returns the package name.


setPackageName

public void setPackageName(java.lang.String pPackageName)
Sets the package name.


parse

public java.util.List parse(java.io.File pFile)
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException,
                            java.io.FileNotFoundException

Parses the given file.

Returns:
List of classes, that have been read.
Throws:
antlr.RecognitionException
antlr.TokenStreamException
java.io.FileNotFoundException

parse

public java.util.List parse(java.io.Reader pReader)
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException

Parses the input read from the given Reader pReader.

Returns:
List of classes, that have been read.
Throws:
antlr.RecognitionException
antlr.TokenStreamException

parse

public java.util.List parse(antlr.TokenStream pStream)
                     throws antlr.RecognitionException,
                            antlr.TokenStreamException
Parses the given TokenStream pStream.

Returns:
List of classes, that have been read.
Throws:
antlr.RecognitionException
antlr.TokenStreamException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
For tests

Throws:
java.lang.Exception