## org.jfree.xml.util
Class SimpleObjectFactory

    java.lang.Object
      org.jfree.xml.util.SimpleObjectFactory

All Implemented Interfaces:
  ObjectFactory

public class SimpleObjectFactory
extends java.lang.Object
implements ObjectFactory

A simple object factory.

Constructor Summary
`SimpleObjectFactory()` Creates a new instance.

Method Summary
`void` `addGenericHandler(GenericObjectFactory handler)` Adds a generic handler.
`void` `addManualMapping(ManualMappingDefinition mapping)` Adds a manual mapping.
`void` `addMultiplexMapping(MultiplexMappingDefinition mplex)` Adds a multiplex mapping.
`void` `clear()` Clears the mappings.
`GenericObjectFactory` `getFactoryForClass(java.lang.Class c)` Returns a factory instance for the given class.
`ManualMappingDefinition` `getManualMappingDefinition(java.lang.Class c)` Returns the manual mapping definition for the given class, or null, if not manual definition exists.
`MultiplexMappingDefinition` `getMultiplexDefinition(java.lang.Class c)` Returns the multiplex definition for the given class, or null, if no such definition exists.
`boolean` `isGenericHandler(java.lang.Class c)` Checks, whether a generic handler exists for the given class.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleObjectFactory

    public SimpleObjectFactory()

  Creates a new instance.

Method Detail

### addManualMapping

    public void addManualMapping(ManualMappingDefinition mapping)

  Adds a manual mapping.

  Parameters:
    `mapping` - the mapping.

### addGenericHandler

    public void addGenericHandler(GenericObjectFactory handler)

  Adds a generic handler.

  Parameters:
    `handler` - the handler.

### addMultiplexMapping

    public void addMultiplexMapping(MultiplexMappingDefinition mplex)

  Adds a multiplex mapping.

  Parameters:
    `mplex` - the multiplex mapping.

### clear

    public void clear()

  Clears the mappings.

### getFactoryForClass

    public GenericObjectFactory getFactoryForClass(java.lang.Class c)

  Returns a factory instance for the given class. The factory is independent from all previously generated instances.

  Specified by:
    `getFactoryForClass` in interface `ObjectFactory`
  Parameters:
    `c` - the class
  Returns:
    the object factory.

### getManualMappingDefinition

    public ManualMappingDefinition getManualMappingDefinition(java.lang.Class c)

  Returns the manual mapping definition for the given class, or null, if not manual definition exists.

  Specified by:
    `getManualMappingDefinition` in interface `ObjectFactory`
  Parameters:
    `c` - the class for which to check the existence of the definition
  Returns:
    the manual mapping definition or null.

### getMultiplexDefinition

    public MultiplexMappingDefinition getMultiplexDefinition(java.lang.Class c)

  Returns the multiplex definition for the given class, or null, if no such definition exists.

  Specified by:
    `getMultiplexDefinition` in interface `ObjectFactory`
  Parameters:
    `c` - the class for which to check the existence of the multiplexer
  Returns:
    the multiplexer for the class, or null if no multiplexer exists.

### isGenericHandler

    public boolean isGenericHandler(java.lang.Class c)

  Checks, whether a generic handler exists for the given class. This does not check, whether an mapping exists.

  Specified by:
    `isGenericHandler` in interface `ObjectFactory`
  Parameters:
    `c` - the class for which to check
  Returns:
    true, if an generic handler is defined, false otherwise.