de.dante.extex.interpreter.max
Class TokenFactoryFactory

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

public class TokenFactoryFactory
extends AbstractFactory

This class provides a factory for a TokenFactory. 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 TokenFactory. The name of the class is given as the argument class as shown below.

   <TokenFactory class="de.dante.extex.scanner.type.token.TokenFactoryImpl"/>
  

The named class needs to implement the interface TokenFactory. 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.10 $
Author:
Gerd Neugebauer

Constructor Summary
TokenFactoryFactory(Configuration config, java.util.logging.Logger logger)
          Creates a new object.
 
Method Summary
 TokenFactory createInstance()
          Instance delivering method.
 
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

TokenFactoryFactory

public TokenFactoryFactory(Configuration config,
                           java.util.logging.Logger logger)
Creates a new object.

Mainly the configuration needs to specify which class to use for the TokenFactory. The name of the class is given as the argument class as shown below.

   <TokenFactory class="de.dante.extex.scanner.type.token.TokenFactoryImpl"/>
  

Parameters:
config - the configuration to use
logger - the logger
Method Detail

createInstance

public TokenFactory createInstance()
                            throws ConfigurationException
Instance delivering method.

Returns:
an appropriate instance
Throws:
ConfigurationException - in case of an error in the configuration