de.dante.extex.interpreter.unit
Class UnitInfoFactory

java.lang.Object
  extended byde.dante.util.framework.AbstractFactory
      extended byde.dante.extex.interpreter.unit.UnitInfoFactory
All Implemented Interfaces:
Configurable, LogEnabled, RegistrarObserver

public class UnitInfoFactory
extends AbstractFactory

This is the factory for instances of UnitInfo. This factory inherits its properties from the AbstractFactory. Among them the support for configuration and logging.

Configuration

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.

   <unit class="de.dante.extex.interpreter.unit.tex.Setup">
   ...
  

The named class needs to implement the interface Loader. 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.

Version:
$Revision: 1.1 $
Author:
Gerd Neugebauer

Constructor Summary
UnitInfoFactory()
           
 
Method Summary
 UnitInfo createUnitInfo()
          Create a new instance of the class given by the attribute class of the configuration.
 
Methods inherited from class de.dante.util.framework.AbstractFactory
configure, configure, createInstance, createInstance, createInstance, createInstanceForConfiguration, createInstanceForConfiguration, createInstanceForConfiguration, enableLogging, enableLogging, getConfiguration, getLogger, reconnect, selectConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitInfoFactory

public UnitInfoFactory()
Method Detail

createUnitInfo

public UnitInfo createUnitInfo()
                        throws ConfigurationException
Create a new instance of the class given by the attribute class of the configuration.

Returns:
the Code loaded
Throws:
ConfigurationException - in case of an error