public abstract class AbstractParser
extends java.lang.Object
AbstractParser class is the base
class for classes capable of parsing files to
create a JavaClass instance.| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
| Constructor and Description |
|---|
AbstractParser()
Constructs an
AbstractParser instance
with the default package filter. |
AbstractParser(PackageFilter filter)
Constructs an
AbstractParser instance
with the specified package filter. |
| Modifier and Type | Method and Description |
|---|---|
void |
addParseListener(ParserListener listener)
Registers the specified parser listener.
|
protected void |
debug(java.lang.String message) |
protected PackageFilter |
getFilter() |
protected void |
onParsedJavaClass(JavaClass jClass)
Informs registered parser listeners that the
specified
JavaClass was parsed. |
abstract JavaClass |
parse(java.lang.String filename)
Parses the specified Java file and returns
a representative
JavaClass instance. |
public AbstractParser()
AbstractParser instance
with the default package filter.public AbstractParser(PackageFilter filter)
AbstractParser instance
with the specified package filter.filter - Package filter.public void addParseListener(ParserListener listener)
listener - Parser listener.public abstract JavaClass parse(java.lang.String filename) throws java.io.IOException
JavaClass instance.
Registered parser listeners are informed that the
resulting JavaClass was parsed.
filename - Java file name.java.io.IOException - If the file could not be parsed.protected void onParsedJavaClass(JavaClass jClass)
JavaClass was parsed.jClass - Parsed Java class.protected PackageFilter getFilter()
protected void debug(java.lang.String message)
Copyright ? 1999-2002 Clarkware Consulting, Inc. All Rights Reserved.