org.picocontainer.injectors
Class AnnotatedMethodInjection

java.lang.Object
  extended by org.picocontainer.injectors.AnnotatedMethodInjection
All Implemented Interfaces:
Serializable, ComponentFactory, InjectionFactory

public class AnnotatedMethodInjection
extends Object
implements InjectionFactory, Serializable

A ComponentFactory for Guice style annotated methods. The factory creates AnnotatedMethodInjector.

Author:
Paul Hammant
See Also:
Serialized Form

Constructor Summary
AnnotatedMethodInjection()
           
AnnotatedMethodInjection(Class injectionAnnotation)
           
 
Method Summary
 ComponentAdapter createComponentAdapter(ComponentMonitor componentMonitor, LifecycleStrategy lifecycleStrategy, Properties componentProperties, Object componentKey, Class componentImplementation, Parameter... parameters)
          Create a SetterInjector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedMethodInjection

public AnnotatedMethodInjection(Class injectionAnnotation)

AnnotatedMethodInjection

public AnnotatedMethodInjection()
Method Detail

createComponentAdapter

public ComponentAdapter createComponentAdapter(ComponentMonitor componentMonitor,
                                               LifecycleStrategy lifecycleStrategy,
                                               Properties componentProperties,
                                               Object componentKey,
                                               Class componentImplementation,
                                               Parameter... parameters)
                                        throws PicoCompositionException
Create a SetterInjector.

Specified by:
createComponentAdapter in interface ComponentFactory
Parameters:
componentMonitor -
lifecycleStrategy -
componentProperties -
componentKey - The component's key
componentImplementation - The class of the bean.
parameters - Any parameters for the setters. If null the adapter solves the dependencies for all setters internally. Otherwise the number parameters must match the number of the setter. @return Returns a new SetterInjector. @throws org.picocontainer.PicoCompositionException if dependencies cannot be solved or if the implementation is an interface or an abstract class.
Returns:
a new component adapter based on the specified arguments. Should not return null.
Throws:
PicoCompositionException - if the creation of the component adapter results in a PicoCompositionException.


Copyright © 2003-2007 Codehaus. All Rights Reserved.