Package org.jvnet.hk2.config
Class InjectionManager
- java.lang.Object
-
- org.jvnet.hk2.config.InjectionManager
-
public class InjectionManager extends Object
InjectionManager is responsible for injecting resources into a component. Injection targets are identified by the injection resolver type attribute.- Author:
- Jerome Dochez
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
InjectionManager.InjectClass
Prototype for the multi-threaded version of inject().protected static class
InjectionManager.InjectContext
protected class
InjectionManager.InjectField
protected class
InjectionManager.InjectFields
protected class
InjectionManager.InjectMethod
protected class
InjectionManager.InjectMethods
-
Constructor Summary
Constructors Constructor Description InjectionManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
allowInjection(Method method, Class<?>[] paramTypes)
jsr-330 rules are very forgiving.protected void
error_injectionException(InjectionResolver target, Annotation inject, AnnotatedElement injectionPoint, Throwable e)
protected void
error_InjectMethodIsNotVoid(Method method)
void
inject(Object component, Class type, InjectionResolver... targets)
Initializes the component by performing injection.void
inject(Object component, ExecutorService es, InjectionResolver... targets)
Initializes the component by performing injection.void
inject(Object component, InjectionResolver... targets)
Initializes the component by performing injection.protected void
syncDoInject(Object component, Class type, InjectionResolver... targets)
Initializes the component by performing injection.
-
-
-
Method Detail
-
inject
public void inject(Object component, InjectionResolver... targets)
Initializes the component by performing injection.- Parameters:
component
- component instance to injectonBehalfOf
- the inhabitant to do injection on behalf oftargets
- the injection resolvers to resolve all injection points- Throws:
ComponentException
- if injection failed for some reason.
-
inject
public void inject(Object component, ExecutorService es, InjectionResolver... targets)
Initializes the component by performing injection.- Parameters:
component
- component instance to injectonBehalfOf
- the inhabitant to do injection on behalf ofes
- the ExecutorService to use in order to handle the work loadtargets
- the injection resolvers to resolve all injection points- Throws:
ComponentException
- if injection failed for some reason.
-
inject
public void inject(Object component, Class type, InjectionResolver... targets)
Initializes the component by performing injection.- Parameters:
component
- component instance to injecttype
- component classtargets
- the injection resolvers to resolve all injection points- Throws:
ComponentException
- if injection failed for some reason.
-
syncDoInject
protected void syncDoInject(Object component, Class type, InjectionResolver... targets)
Initializes the component by performing injection.- Parameters:
component
- component instance to injectonBehalfOf
- the inhabitant to do injection on behalf oftype
- component classtargets
- the injection resolvers to resolve all injection points- Throws:
ComponentException
- if injection failed for some reason.
-
error_injectionException
protected void error_injectionException(InjectionResolver target, Annotation inject, AnnotatedElement injectionPoint, Throwable e)
-
allowInjection
protected boolean allowInjection(Method method, Class<?>[] paramTypes)
jsr-330 rules are very forgiving.
-
error_InjectMethodIsNotVoid
protected void error_InjectMethodIsNotVoid(Method method)
-
-