org.picocontainer.gems.adapters
Class AssimilatingComponentAdapterFactory

java.lang.Object
  extended by org.picocontainer.defaults.MonitoringComponentAdapterFactory
      extended by org.picocontainer.defaults.DecoratingComponentAdapterFactory
          extended by org.picocontainer.gems.adapters.AssimilatingComponentAdapterFactory
All Implemented Interfaces:
Serializable, ComponentAdapterFactory, ComponentMonitorStrategy

public class AssimilatingComponentAdapterFactory
extends DecoratingComponentAdapterFactory

Factory for the AssimilatingComponentAdapter. This factory will create AssimilatingComponentAdapter instances for all ComponentAdapter instances created by the delegate. This will assimilate every component for a specific type.

Since:
1.2
Author:
Jörg Schaible
See Also:
Serialized Form

Constructor Summary
AssimilatingComponentAdapterFactory(ComponentAdapterFactory delegate, Class type)
          Construct an AssimilatingComponentAdapterFactory.
AssimilatingComponentAdapterFactory(ComponentAdapterFactory delegate, Class type, ProxyFactory proxyFactory)
          Construct an AssimilatingComponentAdapterFactory using a special ProxyFactory.
 
Method Summary
 ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Create a AssimilatingComponentAdapter.
 
Methods inherited from class org.picocontainer.defaults.MonitoringComponentAdapterFactory
changeMonitor, currentMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssimilatingComponentAdapterFactory

public AssimilatingComponentAdapterFactory(ComponentAdapterFactory delegate,
                                           Class type)
Construct an AssimilatingComponentAdapterFactory. The instance will use the StandardProxyFactory using the JDK implementation.

Parameters:
delegate - The delegated ComponentAdapterFactory.
type - The assimilated type.

AssimilatingComponentAdapterFactory

public AssimilatingComponentAdapterFactory(ComponentAdapterFactory delegate,
                                           Class type,
                                           ProxyFactory proxyFactory)
Construct an AssimilatingComponentAdapterFactory using a special ProxyFactory.

Parameters:
delegate - The delegated ComponentAdapterFactory.
type - The assimilated type.
proxyFactory - The proxy factory to use.
Method Detail

createComponentAdapter

public ComponentAdapter createComponentAdapter(Object componentKey,
                                               Class componentImplementation,
                                               Parameter[] parameters)
                                        throws PicoIntrospectionException,
                                               AssignabilityRegistrationException,
                                               NotConcreteRegistrationException
Create a AssimilatingComponentAdapter. This adapter will wrap the returned ComponentAdapter of the deleated ComponentAdapterFactory.

Specified by:
createComponentAdapter in interface ComponentAdapterFactory
Overrides:
createComponentAdapter in class DecoratingComponentAdapterFactory
Throws:
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException
See Also:
DecoratingComponentAdapterFactory.createComponentAdapter(java.lang.Object, java.lang.Class, org.picocontainer.Parameter[])


Copyright © 2003-2010 Codehaus. All Rights Reserved.