This decorator helps to make groups of providers for different purposes (i.e: eager loading of a group of providers) You should extend this class, usually in this way:
public class SessionComponent extends ProviderCollection { public SessionComponent(final Container container) { super(container, Singleton.instance); } public void createAll() { for (final Provider<?> p : getProviders()) { p.get(); } } }
This class is a replacement of GroupedSingleton: it's not limited to singletons and behave correctly when providers are removed from the container.