com.jeffpalm.javaparser
Class ParserFactory

java.lang.Object
  extended by com.jeffpalm.javaparser.ParserFactory
Direct Known Subclasses:
BufferParserFactory, FileParserFactory, InputStreamParserFactory, StdInParserFactory

public abstract class ParserFactory
extends java.lang.Object

Generates new parsers for a java file

Version:
$Id: ParserFactory.java,v 1.3 2005/12/04 15:38:50 jeffpalm Exp $
Author:
Chris Seguin, Mike Atkinson

Constructor Summary
ParserFactory()
           
 
Method Summary
 SimpleNode getAbstractSyntaxTree(boolean interactive, ExceptionPrinter printer)
          Return the AST
protected abstract  java.lang.String getKey()
          A method to return some key identifying the file that is being parsed
protected  JavaParser getParser()
          Create the parser
protected abstract  java.io.Reader getReader()
          Return the input stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserFactory

public ParserFactory()
Method Detail

getAbstractSyntaxTree

public SimpleNode getAbstractSyntaxTree(boolean interactive,
                                        ExceptionPrinter printer)
Return the AST

Parameters:
interactive - do we want to receive a response in the form of a dialog box when a parse exception is encountered
Returns:
the simple node which represents the root

getReader

protected abstract java.io.Reader getReader()
Return the input stream

Returns:
the input stream

getParser

protected JavaParser getParser()
Create the parser

Returns:
the java parser

getKey

protected abstract java.lang.String getKey()
A method to return some key identifying the file that is being parsed

Returns:
the identifier