|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.framework.AbstractFactory
org.extex.engine.ErrorHandlerFactory
public class ErrorHandlerFactory
This is the factory for instances of
ErrorHandler. This factory
inherits its properties from the
AbstractFactory. Among them the
support for configuration and logging.
Mainly the configuration needs to specify which class to use for the ErrorHandler. The configuration provides a mapping from a type name to the sub-configuration to be used. The name of the class is given as the argument class of the sub-configuration as shown below.
<ErrorHandler default="ExTeX">
<ExTeX class="org.extex.main.errorHandler.ErrorHandlerImpl">
<EditHandler class="org.extex.main.errorHandler.editHandler.EditHandlerTeXImpl"/>
</ExTeX>
<TeX class="org.extex.main.errorHandler.ErrorHandlerTeXImpl">
<EditHandler class="org.extex.main.errorHandler.editHandler.EditHandlerTeXImpl"/>
</TeX>
<extex class="org.extex.main.errorHandler.ErrorHandlerImpl"/>
<tex class="org.extex.main.errorHandler.ErrorHandlerTeXImpl"/>
</ErrorHandler>
The named class need to implement the interface
ErrorHandler. If this interface
is not implemented an error is raised.
The configuration is passed down to the new instance if it implements the
interface Configurable.
If the class implements the interface
LogEnabled then a logger is
passed to the new instance. For this purpose the factory itself is log
enabled to receive the logger.
| Field Summary |
|---|
| Fields inherited from class org.extex.framework.AbstractFactory |
|---|
CLASS_ATTRIBUTE, DEFAULT_ATTRIBUTE, SELECT_ATTRIBUTE |
| Constructor Summary | |
|---|---|
ErrorHandlerFactory()
Creates a new object. |
|
ErrorHandlerFactory(Configuration configuration)
Creates a new object and configures it according to the parameter. |
|
| Method Summary | |
|---|---|
ErrorHandler |
newInstance(java.lang.String type)
Get an instance of an error handler. |
| Methods inherited from class org.extex.framework.AbstractFactory |
|---|
configure, configure, createInstance, createInstance, createInstance, createInstance, createInstanceForConfiguration, createInstanceForConfiguration, createInstanceForConfiguration, enableLogging, enableLogging, getConfiguration, getLogger, getResourceFinder, reconnect, selectConfiguration, setResourceFinder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorHandlerFactory()
public ErrorHandlerFactory(Configuration configuration)
throws ConfigurationException
configuration - the configuration to use
ConfigurationException - in case of an error during configuration| Method Detail |
|---|
public ErrorHandler newInstance(java.lang.String type)
throws ConfigurationException
null or the empty string then
the default from the configuration is used.
type - the type to use
ConfigurationException - in case of an configuration error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||