org.picocontainer.defaults
Class InstanceComponentAdapter
java.lang.Object
org.picocontainer.defaults.AbstractComponentAdapter
org.picocontainer.defaults.InstanceComponentAdapter
- All Implemented Interfaces:
- ComponentAdapter, Serializable
- public class InstanceComponentAdapter
- extends AbstractComponentAdapter
- Version:
- $Revision: 1.12 $
- Author:
- Aslak Hellesøy, Paul Hammant
- See Also:
- Serialized Form
InstanceComponentAdapter
public InstanceComponentAdapter(Object componentKey,
Object componentInstance)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
getComponentInstance
public Object getComponentInstance(PicoContainer container)
- 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,
CachingComponentAdapter
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.
verify
public void verify(PicoContainer container)
- 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.
- Parameters:
container
- the PicoContainer
, that is used to resolve any possible dependencies of the instance.
Copyright © 2003-2004 Codehaus. All Rights Reserved.