org.picocontainer.alternatives
Class ImplementationHidingComponentAdapter
java.lang.Object
org.picocontainer.defaults.DecoratingComponentAdapter
org.picocontainer.alternatives.ImplementationHidingComponentAdapter
- All Implemented Interfaces:
- ComponentAdapter, Serializable
- public class ImplementationHidingComponentAdapter
- extends DecoratingComponentAdapter
This component adapter makes it possible to hide the implementation
of a real subject (behind a proxy) provided the key is an interface.
This class exists here, because a) it has no deps on external jars, b) dynamic proxy is quite easy.
The user is prompted to look at nanocontainer-proxytoys for alternate and bigger implementations.
- Since:
- 1.1
- Version:
- $Revision: 1.4 $
- Author:
- Aslak Hellesøy, Paul Hammant
- See Also:
for a more feature-rich version of this class.
,
org.nanocontainer.proxytoys.HotSwappingComponentAdapterFactory
,
Serialized Form
ImplementationHidingComponentAdapter
public ImplementationHidingComponentAdapter(ComponentAdapter delegate,
boolean strict)
getComponentInstance
public Object getComponentInstance(PicoContainer container)
throws PicoInitializationException,
PicoIntrospectionException,
AssignabilityRegistrationException,
NotConcreteRegistrationException
- 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.
- Specified by:
getComponentInstance
in interface ComponentAdapter
- Overrides:
getComponentInstance
in class DecoratingComponentAdapter
- Throws:
PicoInitializationException
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException
Copyright © 2003-2004 Codehaus. All Rights Reserved.