Class ListBeanProvider
- java.lang.Object
-
- net.sf.jguiraffe.di.impl.providers.SimpleBeanProvider
-
- net.sf.jguiraffe.di.impl.providers.CollectionBeanProvider
-
- net.sf.jguiraffe.di.impl.providers.ListBeanProvider
-
- All Implemented Interfaces:
BeanProvider
public class ListBeanProvider extends CollectionBeanProvider
A specific
CollectionBeanProvider
implementation that creates a list bean.This concrete implementation creates a
java.util.ArrayList
in itscreateCollection()
method.- Version:
- $Id: ListBeanProvider.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description ListBeanProvider(Collection<Dependency> deps)
Creates a new instance ofListBeanProvider
and initializes it with the given dependencies for the list elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<Object>
createCollection(int size)
Creates the collection managed by this bean provider.-
Methods inherited from class net.sf.jguiraffe.di.impl.providers.CollectionBeanProvider
getBean, getBeanClass, getDependencies, getElementDependencies
-
Methods inherited from class net.sf.jguiraffe.di.impl.providers.SimpleBeanProvider
getLockID, isBeanAvailable, setLockID, shutdown
-
-
-
-
Constructor Detail
-
ListBeanProvider
public ListBeanProvider(Collection<Dependency> deps)
Creates a new instance ofListBeanProvider
and initializes it with the given dependencies for the list elements.- Parameters:
deps
- a collection with the dependencies of the list elements
-
-
Method Detail
-
createCollection
protected Collection<Object> createCollection(int size)
Creates the collection managed by this bean provider. This implementation creates an array list with the specified initial capacity.- Specified by:
createCollection
in classCollectionBeanProvider
- Parameters:
size
- the size of the collection- Returns:
- the collection object
-
-