A container holds
Adapter adapters , and provides a
Resolver resolver to retrieve components from those adapters,
and return them to those adapters.
See Also:KeyRelayingContainer See Also: for a variant on this interface that See Also: supports the addition of KeyAwareAdapter See Also: s See Also:org.jicarilla.container.builder.DefaultBuilder See Also: for a helper class See Also: that makes it easier to create and populate container instances author: Leo Simons version: $Id: Container.java,v 1.7 2004/03/23 13:37:51 lsimons Exp $
registerAdapter(Selector selector, Adapter adapter) Add a new
Adapter to this container.
Parameters: selector - the Selector that will be used to testwhether the provided adapter can be used to provide an instancefor a key requested from the Resolver returned fromthis container its ResolverProvider.getResolvermethod. Parameters: adapter - an Adapter that will be used to help thiscontainer fulfill its ResolverProvider contract.
registerAdapter(Object key, Adapter adapter) Add a new
Adapter to this container.
Parameters: key - the criterion that will be used to test whether theprovided adapter can be used to provide an instancefor a requested key. Parameters: adapter - an Adapter that will be used to help thiscontainer fulfill its ResolverProvider contract.
Add a new
Adapter to this container.
Parameters: selector - the Selector that will be used to testwhether the provided adapter can be used to provide an instancefor a key requested from the Resolver returned fromthis container its ResolverProvider.getResolvermethod. Parameters: adapter - an Adapter that will be used to help thiscontainer fulfill its ResolverProvider contract. this container. throws: IllegalSelectorException - if the provided selector is notsupported by this container (if it is null, for example, orif it is not aorg.jicarilla.lang.CriterionExposingSelector andthe container requires it to be). throws: IllegalAdapterException - if the provided adapter is notsupported by this container (if it is null, for example, orif it is not of some subtype that this container requires). throws: KeyAlreadyRegisteredException - if the criterion exposed by aprovided selector or a provided key itself is already registered andthe container does not support duplicate keys. throws: JicarillaException - if a miscellaneous exception occurs (aninternal container error or an assertion failure, for example).
Add a new
Adapter to this container.
Parameters: key - the criterion that will be used to test whether theprovided adapter can be used to provide an instancefor a requested key. Parameters: adapter - an Adapter that will be used to help thiscontainer fulfill its ResolverProvider contract. this container. throws: IllegalAdapterException - if the provided adapter is notsupported by this container (if it is null, for example, orif it is not of some subtype that this container requires). throws: KeyAlreadyRegisteredException - if the criterion exposed by aprovided selector or a provided key itself is already registered andthe container does not support duplicate keys. throws: JicarillaException - if a miscellaneous exception occurs (aninternal container error or an assertion failure, for example).