public class ObjectFactory extends Variables
| Modifier and Type | Field and Description |
|---|---|
(package private) RuntimeClassLoader |
classLoader |
(package private) static Map<String,String> |
classNames |
(package private) static String[] |
DEFAULT_PACKAGES |
(package private) static Map<String,Integer> |
globalObjectNumbers |
(package private) static org.slf4j.Logger |
log |
(package private) static List<ObjectCreator> |
objectCreators |
(package private) List<String> |
searchPath |
private static long |
serialVersionUID |
(package private) Set<URL> |
urls |
VAR_PREFIX, VAR_SUFFIX, variables| Modifier | Constructor and Description |
|---|---|
protected |
ObjectFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassPathUrls(Collection<URL> newUrls) |
void |
addPackage(String pkg) |
Object |
create(Element node) |
Object |
create(Element node,
Map<String,String> params,
Variables local) |
Object |
create(String className,
Map<String,String> parameter,
Element config) |
Object |
create(String className,
Map<String,String> parameter,
Element config,
Variables local) |
static Element |
createConfigDocument(Element node)
|
String |
findClassForElement(Element node) |
private URL |
findDocumentation(String className) |
Map<String,String> |
getAttributes(Node node) |
static String |
getNextIdentifier(String obj) |
List<String> |
getSearchPaths() |
static ObjectFactory |
newInstance() |
static void |
register(String name,
Class<?> clazz) |
static void |
registerObjectCreator(ObjectCreator creator) |
addVariables, clear, containsKey, containsKey, containsValue, entrySet, expand, expand, expand, expandAll, expandAndAdd, get, get, isEmpty, keySet, load, put, putAll, remove, set, size, substitute, toString, valuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllprivate static final long serialVersionUID
static org.slf4j.Logger log
static final String[] DEFAULT_PACKAGES
final RuntimeClassLoader classLoader
static final List<ObjectCreator> objectCreators
public static final Element createConfigDocument(Element node) throws ParserConfigurationException
node - ParserConfigurationExceptionpublic void addClassPathUrls(Collection<URL> newUrls)
public void addPackage(String pkg)
public static void registerObjectCreator(ObjectCreator creator)
public static ObjectFactory newInstance()
public Object create(Element node, Map<String,String> params, Variables local) throws Exception
node - variables - Exceptionpublic Object create(String className, Map<String,String> parameter, Element config) throws Exception
Exceptionpublic Object create(String className, Map<String,String> parameter, Element config, Variables local) throws Exception
Exceptionpublic String findClassForElement(Element node) throws Exception
ExceptionCopyright © 2018. All rights reserved.