public abstract class FactoryManager extends Object
Modifier and Type | Field and Description |
---|---|
static Object |
DEFAULT_KEY |
Constructor and Description |
---|
FactoryManager() |
Modifier and Type | Method and Description |
---|---|
abstract <T> T |
instantiate(Object key,
Type targetType) |
<T> T |
instantiate(Type targetType) |
void |
register(Class<?> clazz) |
void |
register(Factory<?> factory) |
void |
register(List<Class<?>> classes,
Factory<?> factory) |
abstract void |
register(Object key,
Class<?> clazz) |
abstract void |
register(Object key,
Factory<?> factory) |
abstract void |
register(Object key,
List<Class<?>> classes,
Factory<?> factory) |
static FactoryManager |
registerDefaults(FactoryManager factoryManager)
Registers default factories in the given factory manager.
|
public static final Object DEFAULT_KEY
public static FactoryManager registerDefaults(FactoryManager factoryManager)
factoryManager
- an instantiation manager.public void register(Class<?> clazz)
public void register(Factory<?> factory)
public <T> T instantiate(Type targetType)
Copyright © 2014. All rights reserved.