Class SimpleObjectFactory
java.lang.Object
org.jfree.xml.util.SimpleObjectFactory
- All Implemented Interfaces:
ObjectFactory
A simple object factory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGenericHandler(GenericObjectFactory handler) Adds a generic handler.voidaddManualMapping(ManualMappingDefinition mapping) Adds a manual mapping.voidAdds a multiplex mapping.voidclear()Clears the mappings.Returns a factory instance for the given class.Returns the manual mapping definition for the given class, or null, if not manual definition exists.Returns the multiplex definition for the given class, or null, if no such definition exists.booleanChecks, whether a generic handler exists for the given class.
-
Constructor Details
-
SimpleObjectFactory
public SimpleObjectFactory()Creates a new instance.
-
-
Method Details
-
addManualMapping
Adds a manual mapping.- Parameters:
mapping- the mapping.
-
addGenericHandler
Adds a generic handler.- Parameters:
handler- the handler.
-
addMultiplexMapping
Adds a multiplex mapping.- Parameters:
mplex- the multiplex mapping.
-
clear
Clears the mappings. -
getFactoryForClass
Returns a factory instance for the given class. The factory is independent from all previously generated instances.- Specified by:
getFactoryForClassin interfaceObjectFactory- Parameters:
c- the class- Returns:
- the object factory.
-
getManualMappingDefinition
Returns the manual mapping definition for the given class, or null, if not manual definition exists.- Specified by:
getManualMappingDefinitionin interfaceObjectFactory- Parameters:
c- the class for which to check the existence of the definition- Returns:
- the manual mapping definition or null.
-
getMultiplexDefinition
Returns the multiplex definition for the given class, or null, if no such definition exists.- Specified by:
getMultiplexDefinitionin interfaceObjectFactory- 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
Checks, whether a generic handler exists for the given class. This does not check, whether an mapping exists.- Specified by:
isGenericHandlerin interfaceObjectFactory- Parameters:
c- the class for which to check- Returns:
- true, if an generic handler is defined, false otherwise.
-