Class BeanListCreator
Object
BeanListCreator
Like
BeanCreator but creates a list of beans.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidcreateAndConsumeListBeans(String key, org.apache.commons.configuration.HierarchicalConfiguration config, Object param, Collection<T> addTo) Extracts a list of instantiated bean objects from an XML configuration, and adds them toaddTo.static <T> List<T> createListBeans(String key, org.apache.commons.configuration.HierarchicalConfiguration config, Object param) A list of instantiated bean objects from an XML configuration.
-
Method Details
-
createListBeans
public static <T> List<T> createListBeans(String key, org.apache.commons.configuration.HierarchicalConfiguration config, Object param) A list of instantiated bean objects from an XML configuration.- Parameters:
key- key to match inside bean XML definition (name of the bean).config- the config associated with the XML definition.param- the parameter that is used in creation of beans.- Returns:
- a newly created list of the instantiated bean objects.
-
createAndConsumeListBeans
public static <T> void createAndConsumeListBeans(String key, org.apache.commons.configuration.HierarchicalConfiguration config, Object param, Collection<T> addTo) Extracts a list of instantiated bean objects from an XML configuration, and adds them toaddTo.- Parameters:
key- key to match inside bean XML definition (name of the bean).config- the config associated with the XML definition.param- the parameter that is used in creation of beansaddTo- the collection the created beans are added to.
-