T
- This must be the annotation class of the injection annotation that this resolver will handle.public interface InjectionResolver<T extends Annotation>
@Inject
). The user would
usually only provide a resolver for @Inject
if it were specializing the system provided resolver for
@Inject
. Otherwise, this resolver can be used to provide injection points for any annotation.
Jersey provides all InjectionResolvers
for JAX-RS annotation and org.glassfish.jersey.server.Uri
apart from
Context
which must be implemented and registered directly as a part of DI integration because of
many optimization which cannot be implemented on Jersey side.
The InjectionResolvers
are delivered to DI integration using InjectionManager.register(Binder)
and DI provider
just filter InjectionResolverBinding
and internally register the annotation handling using its own mechanism.
Modifier and Type | Method and Description |
---|---|
Class<T> |
getAnnotation()
This method returns the annotation for what the injection resolver is implemented.
|
boolean |
isConstructorParameterIndicator()
This method should return true if the annotation that indicates that this is an injection point can appear in the parameter
list of a constructor.
|
boolean |
isMethodParameterIndicator()
This method should return true if the annotation that indicates that this is an injection point can appear in the parameter
list of a method.
|
Object |
resolve(Injectee injectee)
This method will return the object that should be injected into the given injection point.
|
Object resolve(Injectee injectee)
This method should not do the injection themselves.
injectee
- The injection point this value is being injected intoboolean isConstructorParameterIndicator()
boolean isMethodParameterIndicator()
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.