Class ParamInjectionResolver<A extends Annotation>
java.lang.Object
org.glassfish.jersey.server.internal.inject.ParamInjectionResolver<A>
- Type Parameters:
A
- supported parameter injection annotation.
- All Implemented Interfaces:
InjectionResolver<A>
public class ParamInjectionResolver<A extends Annotation>
extends Object
implements InjectionResolver<A>
Abstract base class for resolving JAX-RS
@XxxParam
injection.- Author:
- Marek Potociar
-
Constructor Summary
ConstructorDescriptionParamInjectionResolver
(ValueParamProvider valueParamProvider, Class<A> annotation, jakarta.inject.Provider<ContainerRequest> request) Initialize the base parameter injection resolver. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the annotation for what the injection resolver is implemented.boolean
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
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.This method will return the object that should be injected into the given injection point.
-
Constructor Details
-
ParamInjectionResolver
public ParamInjectionResolver(ValueParamProvider valueParamProvider, Class<A> annotation, jakarta.inject.Provider<ContainerRequest> request) Initialize the base parameter injection resolver.- Parameters:
valueParamProvider
- parameter value supplier provider.
-
-
Method Details
-
resolve
Description copied from interface:InjectionResolver
This method will return the object that should be injected into the given injection point. It is the responsibility of the implementation to ensure that the object returned can be safely injected into the injection point.This method should not do the injection themselves.
- Specified by:
resolve
in interfaceInjectionResolver<A extends Annotation>
- Parameters:
injectee
- The injection point this value is being injected into- Returns:
- A possibly null value to be injected into the given injection point
-
isConstructorParameterIndicator
public boolean isConstructorParameterIndicator()Description copied from interface:InjectionResolver
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.- Specified by:
isConstructorParameterIndicator
in interfaceInjectionResolver<A extends Annotation>
- Returns:
- true if the injection annotation can appear in the parameter list of a constructor.
-
isMethodParameterIndicator
public boolean isMethodParameterIndicator()Description copied from interface:InjectionResolver
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.- Specified by:
isMethodParameterIndicator
in interfaceInjectionResolver<A extends Annotation>
- Returns:
- true if the injection annotation can appear in the parameter list of a method.
-
getAnnotation
Description copied from interface:InjectionResolver
This method returns the annotation for what the injection resolver is implemented.- Specified by:
getAnnotation
in interfaceInjectionResolver<A extends Annotation>
- Returns:
- handled annotation by injection resolver.
-