public class TLcdXMLObjectFactoryProvider extends Object
ILcdXMLObjectFactory
's that can create a Java object for a specified
XML element.
This provider maintains a lookup table from each [XML element, Java class] pair to its
corresponding object factory. If an object factory is registered for a specified class, it will
automatically also be registered for all the ancestor classes and implemented interfaces of that
class.
Please refer to the package documentation
for a general
overview of the XML Binding Framework.ILcdXMLObjectFactory
Constructor and Description |
---|
TLcdXMLObjectFactoryProvider() |
Modifier and Type | Method and Description |
---|---|
<T> ILcdXMLObjectFactory<T> |
getObjectFactory(QName aXMLElementName,
Class<T> aJavaClass)
Returns an object factory which is capable of creating
instances of the specified Java class for the specified XML element name.
|
<T> void |
registerObjectFactory(QName aXMLElementName,
Class<T> aJavaClass,
ILcdXMLObjectFactory<? extends T> aFactory)
Registers an
ILcdXMLObjectFactory which is capable of creating instances of
the specified Java class for the specified XML element. |
public <T> void registerObjectFactory(QName aXMLElementName, Class<T> aJavaClass, ILcdXMLObjectFactory<? extends T> aFactory)
ILcdXMLObjectFactory
which is capable of creating instances of
the specified Java class for the specified XML element.
aXMLElementName
- the XML element that corresponds to the instances that are to be createdaJavaClass
- the Java class of which instances should be createdaFactory
- the factory to be registered.NullPointerException
- if one of the arguments is null
.public <T> ILcdXMLObjectFactory<T> getObjectFactory(QName aXMLElementName, Class<T> aJavaClass)
aXMLElementName
- the XML element that corresponds to the instances that are to be createdaJavaClass
- the Java class to which the object created by the resulting factory should be assignablenull
if no such factory was found.