Package org.anchoranalysis.bean.xml
Class RegisterBeanFactories
Object
RegisterBeanFactories
Utility class for registering the Bean-factories that are found in anchor-bean (or any other).
Any new BeanFactory must first be registered before it can be read from BeanXML when the config-factory attribute is parsed.
- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic BeanInstanceMap
Default instances of different family-types of beans.static boolean
Has the methodregisterAllPackageBeanFactories()
already been called?static <T> void
Registers a bean that creates a {link java.util.List}.static void
register
(String name, AnchorBeanFactory factory) Registers a specific factory.static AnchorDefaultBeanFactory
Registers the factories for the beans that exist in this package
-
Method Details
-
registerAllPackageBeanFactories
Registers the factories for the beans that exist in this packageIt additionally registers the AnchorDefaultBeanFactory as the default
If it's already been called, we simply do nothing
- Returns:
- the default factory for creating objects
-
getDefaultInstances
Default instances of different family-types of beans.- Returns:
- a mapping between family-types and instances.
-
register
Registers a specific factory.- Parameters:
name
- name associated with factory i.e. for config-factory attribute in Xmlfactory
- the factory to register
-
register
Registers a bean that creates a {link java.util.List}.- Type Parameters:
T
- list item type- Parameters:
factoryName
- a specific factorycreator
- creator used to make list-bean
-
isCalledRegisterAllPackage
public static boolean isCalledRegisterAllPackage()Has the methodregisterAllPackageBeanFactories()
already been called?- Returns:
- true if the method has been called (at least once), false otherwise.
-