Package de.hsh.graja.modules.junit.api
Class ObjectPool
- java.lang.Object
-
- de.hsh.graja.modules.junit.api.ObjectPool
-
public class ObjectPool extends Object
An object pool maps classes and names to instances. An object pool can be prepared without actually instantiating the instances. Instead an object pool defer object instantiation to when the first instance is requested. This class can be used in complex assignments, when there are many classes involved and when there is need to share a test fixture between several test classes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ObjectPool.Initializer
-
Constructor Summary
Constructors Constructor Description ObjectPool()
ObjectPool(ObjectPool.Initializer initializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(Class<? extends T> clazz, String name)
<T> T
put(Class<? extends T> clazz, String name, T val)
-
-
-
Constructor Detail
-
ObjectPool
public ObjectPool(ObjectPool.Initializer initializer)
-
ObjectPool
public ObjectPool()
-
-