org.picocontainer.extras
Class InvokingComponentAdapterFactory

java.lang.Object
  extended byorg.picocontainer.extras.DecoratingComponentAdapterFactory
      extended byorg.picocontainer.extras.InvokingComponentAdapterFactory
All Implemented Interfaces:
ComponentAdapterFactory

public class InvokingComponentAdapterFactory
extends DecoratingComponentAdapterFactory

A generic ComponentAdapter that will invoke a particular method on the component after it has been instantiated. This can be useful for implementing simple lifecycle support without the components having to implement any interfaces.

Version:
$Revision: 1.4 $
Author:
Aslak Hellesøy

Nested Class Summary
 class InvokingComponentAdapterFactory.Adapter
           
 
Constructor Summary
InvokingComponentAdapterFactory(ComponentAdapterFactory delegate, String methodName, Class[] parameterTypes, Object[] arguments)
           
 
Method Summary
 ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvokingComponentAdapterFactory

public InvokingComponentAdapterFactory(ComponentAdapterFactory delegate,
                                       String methodName,
                                       Class[] parameterTypes,
                                       Object[] arguments)
Method Detail

createComponentAdapter

public ComponentAdapter createComponentAdapter(Object componentKey,
                                               Class componentImplementation,
                                               Parameter[] parameters)
                                        throws PicoIntrospectionException,
                                               AssignabilityRegistrationException,
                                               NotConcreteRegistrationException
Specified by:
createComponentAdapter in interface ComponentAdapterFactory
Overrides:
createComponentAdapter in class DecoratingComponentAdapterFactory
Throws:
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException


Copyright © 2003 Codehaus. All Rights Reserved.