Class TLcdXMLObjectFactoryProvider

java.lang.Object
com.luciad.format.xml.bind.TLcdXMLObjectFactoryProvider

public class TLcdXMLObjectFactoryProvider extends Object
Provider of 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.

Since:
9.0
See Also:
  • Constructor Details

    • TLcdXMLObjectFactoryProvider

      public TLcdXMLObjectFactoryProvider()
  • Method Details

    • registerObjectFactory

      public <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.

      Parameters:
      aXMLElementName - the XML element that corresponds to the instances that are to be created
      aJavaClass - the Java class of which instances should be created
      aFactory - the factory to be registered.
      Throws:
      NullPointerException - if one of the arguments is null.
    • getObjectFactory

      public <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.
      Parameters:
      aXMLElementName - the XML element that corresponds to the instances that are to be created
      aJavaClass - the Java class to which the object created by the resulting factory should be assignable
      Returns:
      an object factory for creating instances of the specified Java class for the specified XML element name, or null if no such factory was found.