public class OpenSimObjectFactoryStore
extends java.lang.Object
Constructor and Description |
---|
OpenSimObjectFactoryStore() |
Modifier and Type | Method and Description |
---|---|
<F extends OpenSimObject> |
findFactory(java.lang.Class<F> baseClass,
org.w3c.dom.Element elem)
Finds a factory that can parse a given element
|
OpenSimObjectFactory<? extends OpenSimObject> |
findFactory(org.w3c.dom.Element elem)
Finds a factory that can parse a given element
|
<C extends OpenSimObject> |
getFactory(java.lang.Class<C> component)
Gets a factory for parsing the given component type
|
static void |
registerFactoryClass(java.lang.Class<? extends OpenSimObjectFactory<? extends OpenSimObject>> factoryClass)
Register a factory class for parsing OpenSimComponent's
|
<C extends OpenSimObject> |
setFactory(java.lang.Class<C> componentClass,
OpenSimObjectFactory<? extends C> factory)
Sets the factory to use for parsing specific components
|
public static void registerFactoryClass(java.lang.Class<? extends OpenSimObjectFactory<? extends OpenSimObject>> factoryClass)
factoryClass
- factory classpublic <C extends OpenSimObject> void setFactory(java.lang.Class<C> componentClass, OpenSimObjectFactory<? extends C> factory)
componentClass
- component type to createfactory
- factory objectpublic <C extends OpenSimObject> OpenSimObjectFactory<? extends C> getFactory(java.lang.Class<C> component)
component
- component classpublic <F extends OpenSimObject> OpenSimObjectFactory<? extends F> findFactory(java.lang.Class<F> baseClass, org.w3c.dom.Element elem)
baseClass
- base class of component to generateelem
- element to parsepublic OpenSimObjectFactory<? extends OpenSimObject> findFactory(org.w3c.dom.Element elem)
elem
- element to parse