org.picocontainer.injectors
Class MultiInjector
java.lang.Object
org.picocontainer.adapters.AbstractAdapter
org.picocontainer.injectors.AbstractInjector
org.picocontainer.injectors.MultiInjector
- All Implemented Interfaces:
- Serializable, ComponentAdapter, ComponentMonitorStrategy, LifecycleStrategy
public class MultiInjector
- extends AbstractInjector
- Author:
- Paul Hammant
- See Also:
- Serialized Form
| Methods inherited from class org.picocontainer.injectors.AbstractInjector |
accept, caughtIllegalAccessException, caughtIllegalAccessException, caughtInstantiationException, caughtInvocationTargetException, createDefaultParameters, dispose, hasLifecycle, newInstance, start, stop |
MultiInjector
public MultiInjector(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
ComponentMonitor componentMonitor,
LifecycleStrategy lifecycleStrategy,
String setterPrefix)
getComponentInstance
public Object getComponentInstance(PicoContainer container)
throws PicoCompositionException
- Description copied from interface:
ComponentAdapter
- Retrieve the component instance. This method will usually create a new instance each time it is called, but that
is not required. For example,
Cached will always return the
same instance.
- Parameters:
container - the PicoContainer, that is used to resolve any possible dependencies of the instance.
- Returns:
- the component instance.
- Throws:
PicoCompositionException - if the component could not be instantiated.
verify
public void verify(PicoContainer container)
throws PicoCompositionException
- Description copied from interface:
ComponentAdapter
- Verify that all dependencies for this adapter can be satisifed. Normally, the adapter should verify this by
checking that the associated PicoContainer contains all the needed dependnecies.
- Specified by:
verify in interface ComponentAdapter- Specified by:
verify in class AbstractInjector
- Parameters:
container - the PicoContainer, that is used to resolve any possible dependencies of the instance.
- Throws:
PicoCompositionException - if one or more dependencies cannot be resolved.
Copyright © 2003-2007 Codehaus. All Rights Reserved.