Class BeanListCreator

Object
BeanListCreator

public class BeanListCreator extends Object
Like BeanCreator but creates a list of beans.
Author:
Owen Feehan
  • 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 to addTo.
      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
      addTo - the collection the created beans are added to.