public final class RegisterBeanFactories extends Object
Any new BeanFactory must first be registered before it can be read from BeanXML when the config-factory attribute is parsed.
Modifier and Type | Method and Description |
---|---|
static BeanInstanceMap |
getDefaultInstances()
Default instances of different family-types of beans.
|
static boolean |
isCalledRegisterAllPackage()
Has the method
registerAllPackageBeanFactories() already been called? |
static void |
register(String name,
AnchorBeanFactory factory)
Registers a specific factory.
|
static <T> void |
register(String factoryName,
java.util.function.Function<List<T>,Object> creator)
Registers a bean that creates a {link java.util.List}.
|
static AnchorDefaultBeanFactory |
registerAllPackageBeanFactories()
Registers the factories for the beans that exist in this package
|
public static AnchorDefaultBeanFactory registerAllPackageBeanFactories()
It additionally registers the AnchorDefaultBeanFactory as the default
If it's already been called, we simply do nothing
public static BeanInstanceMap getDefaultInstances()
public static void register(String name, AnchorBeanFactory factory)
name
- name associated with factory i.e. for config-factory attribute in Xmlfactory
- the factory to registerpublic static <T> void register(String factoryName, java.util.function.Function<List<T>,Object> creator)
T
- list item typefactoryName
- a specific factorycreator
- creator used to make list-beanpublic static boolean isCalledRegisterAllPackage()
registerAllPackageBeanFactories()
already been called?Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.