Package xml.factories.element
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 XMLElement
.protected abstract T
createHelper(org.w3c.dom.Element element)
Construct a new instance of type T from an XMLElement
.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
Construct a new instance of type T from an XMLElement
. This method is intended to be called bycreate(Element)
.- Parameters:
element
- The XMLElement
representing the object to be created.- Returns:
- A new instance of type T created from the XML
Element
.
-
create
Construct a new instance of type T from an XMLElement
.- Parameters:
element
- The XMLElement
representing the object to be created.- Returns:
- A new instance of type T created from the XML
Element
. - Throws:
XmlParserException
- if the XMLElement
is unable to be parsed into an instance of type T.
-