Package org.picocontainer.injectors
Class AnnotatedMethodInjection
- java.lang.Object
-
- org.picocontainer.injectors.AbstractInjectionFactory
-
- org.picocontainer.injectors.AnnotatedMethodInjection
-
- All Implemented Interfaces:
java.io.Serializable
,ComponentFactory
,InjectionFactory
public class AnnotatedMethodInjection extends AbstractInjectionFactory
AInjectionFactory
for Guice-style annotated methods. The factory createsAnnotatedMethodInjector
.- Author:
- Paul Hammant
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnnotatedMethodInjection()
AnnotatedMethodInjection(java.lang.Class<? extends java.lang.annotation.Annotation> injectionAnnotation, boolean useNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> ComponentAdapter<T>
createComponentAdapter(ComponentMonitor monitor, LifecycleStrategy lifecycleStrategy, java.util.Properties componentProperties, java.lang.Object componentKey, java.lang.Class<T> componentImplementation, Parameter... parameters)
Create aSetterInjector
.-
Methods inherited from class org.picocontainer.injectors.AbstractInjectionFactory
accept, verify, wrapLifeCycle
-
-
-
-
Method Detail
-
createComponentAdapter
public <T> ComponentAdapter<T> createComponentAdapter(ComponentMonitor monitor, LifecycleStrategy lifecycleStrategy, java.util.Properties componentProperties, java.lang.Object componentKey, java.lang.Class<T> componentImplementation, Parameter... parameters) throws PicoCompositionException
Create aSetterInjector
.- Parameters:
monitor
-lifecycleStrategy
-componentProperties
-componentKey
- The component's keycomponentImplementation
- 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.- Returns:
- Returns a new
SetterInjector
. - Throws:
PicoCompositionException
- if dependencies cannot be solved or if the implementation is an interface or an abstract class.
-
-