Skip Headers

# Object Factory Class

Previous

Next

The `ObjectFactory` class provides an instance factory method for each content and element interface. For example, given an element interface `ItemsImpl`, there would be an instance factory method in the `ObjectFactory` class with the following signature:

    public ItemsImpl createItemsImpl() throws javax.xml.bind.JAXBException

The `ObjectFactory` class also provides a dynamic instance factory allocator with the following signature:

    public static Object newInstance(Class javaContentInterface)
        throws javax.xml.bind.JAXBException