Class XmlFactoryFromElement<T>

java.lang.Object
xml.factories.element.XmlFactoryFromElement<T>
Direct Known Subclasses:
XmlAmbientLightFactory, XmlCameraFactory, XmlGeometriesFactory, XmlGeometryFactory, XmlLightFactory, XmlLightSourcesFactory, XmlMaterialFactory, XmlSceneFactory

public abstract class XmlFactoryFromElement<T>
extends java.lang.Object
This interface represents a class which is able to create instances of type T from an XML Element.
  • Constructor Summary

    Constructors
    Constructor Description
    XmlFactoryFromElement()  
  • Method Summary

    Modifier and Type Method Description
    T create​(org.w3c.dom.Element element)
    Construct a new instance of type T from an XML Element.
    protected abstract T createHelper​(org.w3c.dom.Element element)
    Construct a new instance of type T from an XML Element.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XmlFactoryFromElement

      public XmlFactoryFromElement()
  • Method Details

    • createHelper

      protected abstract T createHelper​(org.w3c.dom.Element element)
      Construct a new instance of type T from an XML Element. This method is intended to be called by create(Element).
      Parameters:
      element - The XML Element representing the object to be created.
      Returns:
      A new instance of type T created from the XML Element.
    • create

      public T create​(org.w3c.dom.Element element)
      Construct a new instance of type T from an XML Element.
      Parameters:
      element - The XML Element representing the object to be created.
      Returns:
      A new instance of type T created from the XML Element.
      Throws:
      XmlParserException - if the XML Element is unable to be parsed into an instance of type T.