org.base.apps.xml
Class AbstractParser<R>
java.lang.Object
org.base.apps.xml.AbstractParser<R>
- All Implemented Interfaces:
- Parser<R>
- Direct Known Subclasses:
- AbstractStAXParser
public abstract class AbstractParser<R>
- extends Object
- implements Parser<R>
Base implementation of Parser, intended to be extensible.
- Author:
- Kevan Simpson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractParser
protected AbstractParser()
parse
public abstract R parse(Source src)
throws Exception
- Specified by:
parse in interface Parser<R>
- Throws:
Exception- See Also:
Parser.parse(javax.xml.transform.Source)
getResult
public Result getResult()
- Specified by:
getResult in interface Parser<R>
- See Also:
Parser.getResult()
getOutput
protected R getOutput()
- Returns:
- the mOutput
setOutput
protected void setOutput(R output)
- Parameters:
output - the output to set
getOutputStack
protected OutputStack getOutputStack()
- Returns:
- the mOutputStack
setOutputStack
protected void setOutputStack(OutputStack outputStack)
- Parameters:
outputStack - the outputStack to set
setResult
protected void setResult(Result result)
- Parameters:
result - the result to set
error
protected RuntimeException error(Exception ex,
String msg,
Object... tkns)
- Logs and wraps the given
RuntimeException.
- Parameters:
ex - The cause, which may be nullmsg - A formattable messagetkns - Optional message tokens
- Returns:
- A new
RuntimeException with the formatted message
log
protected org.apache.commons.logging.Log log()
- Fetches the
Log for this parser.
trace
protected void trace(Object... snips)
Copyright 2011, Blue Agate Software Entity (BASE)