public interface InjectionServices extends Service
InjectionContext.getAnnotatedType()
gives access to the modified state of the type.
InjectionServices
is a per-BeanDeploymentArchive service.Modifier and Type | Method and Description |
---|---|
<T> void |
aroundInject(InjectionContext<T> injectionContext)
Callback for injection.
|
<T> void |
registerInjectionTarget(javax.enterprise.inject.spi.InjectionTarget<T> injectionTarget,
javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
This method is invoked during Weld bootstrap and allows an integrator to process an
InjectionTarget that may be
injected at runtime. |
<T> void aroundInject(InjectionContext<T> injectionContext)
InjectionContext.proceed()
to cause CDI-style injection to occur.T
- the type of the injected instanceinjectionContext
- the context in which injection occurs<T> void registerInjectionTarget(javax.enterprise.inject.spi.InjectionTarget<T> injectionTarget, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
This method is invoked during Weld bootstrap and allows an integrator to process an InjectionTarget
that may be
injected at runtime. The implementation may want to read the metadata on resource injection point and cache it so that it
does not need to repeat metadata parsing on each aroundInject(InjectionContext)
invocation.
Furthermore, the integrator is responsible for validating resource injection points (as defined in CDI 1.1 3.7.1).
For each resource injection of a type:
the implementation must validate the type of the injection point. If the injection point type differs from the type of
the matching object in the Java EE component environment, the implementation throws DefinitionException
.
Note that this method may be called at runtime if the application uses an InjectionTargetFactory
to create
injection target instances at runtime.
T
- the type of the injected instanceinjectionTarget
- the injection target to be processedannotatedType
- the AnnotatedType
metadata for the given injection targetCopyright © 2008–2017. All rights reserved.