public class DefaultElementFactory extends Object implements ElementFactory
ElementFactory.ElementCreationException
Modifier and Type | Field and Description |
---|---|
private List<Class> |
classes |
private Map<Class,String> |
packageMap |
Constructor and Description |
---|
DefaultElementFactory()
Create the default element factory.
|
Modifier and Type | Method and Description |
---|---|
private <T> T |
create(Class<T> type,
org.jdom.Element node) |
<T> T |
createElement(Class<T> c,
org.jdom.Element node,
String type) |
<T> Class<T> |
getElementClass(Class<T> type,
String name) |
void |
register(Class elementClass)
Register a class with the factory.
|
void |
register(Class elementClass,
String packageName) |
public DefaultElementFactory()
public <T> T createElement(Class<T> c, org.jdom.Element node, String type) throws org.jdom.JDOMException, ElementFactory.ElementCreationException
createElement
in interface ElementFactory
org.jdom.JDOMException
ElementFactory.ElementCreationException
public void register(Class elementClass)
elementClass
- The class to register.private <T> T create(Class<T> type, org.jdom.Element node) throws ElementFactory.ElementCreationException
public <T> Class<T> getElementClass(Class<T> type, String name) throws ElementFactory.ElementCreationException
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.