Class ParamInjectionResolver<A extends java.lang.annotation.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 java.lang.annotation.Annotation> extends java.lang.Object implements InjectionResolver<A>
Abstract base class for resolving JAX-RS@XxxParaminjection.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<A>annotationprivate javax.inject.Provider<ContainerRequest>requestprivate ValueParamProvidervalueParamProvider
-
Constructor Summary
Constructors Constructor Description ParamInjectionResolver(ValueParamProvider valueParamProvider, java.lang.Class<A> annotation, javax.inject.Provider<ContainerRequest> request)Initialize the base parameter injection resolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<A>getAnnotation()This method returns the annotation for what the injection resolver is implemented.private booleanhasEncodedAnnotation(Injectee injectee)booleanisConstructorParameterIndicator()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.booleanisMethodParameterIndicator()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.java.lang.Objectresolve(Injectee injectee)This method will return the object that should be injected into the given injection point.
-
-
-
Field Detail
-
valueParamProvider
private final ValueParamProvider valueParamProvider
-
annotation
private final java.lang.Class<A extends java.lang.annotation.Annotation> annotation
-
request
private final javax.inject.Provider<ContainerRequest> request
-
-
Constructor Detail
-
ParamInjectionResolver
public ParamInjectionResolver(ValueParamProvider valueParamProvider, java.lang.Class<A> annotation, javax.inject.Provider<ContainerRequest> request)
Initialize the base parameter injection resolver.- Parameters:
valueParamProvider- parameter value supplier provider.
-
-
Method Detail
-
resolve
public java.lang.Object resolve(Injectee injectee)
Description copied from interface:InjectionResolverThis 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:
resolvein interfaceInjectionResolver<A extends java.lang.annotation.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
-
hasEncodedAnnotation
private boolean hasEncodedAnnotation(Injectee injectee)
-
isConstructorParameterIndicator
public boolean isConstructorParameterIndicator()
Description copied from interface:InjectionResolverThis 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:
isConstructorParameterIndicatorin interfaceInjectionResolver<A extends java.lang.annotation.Annotation>- Returns:
- true if the injection annotation can appear in the parameter list of a constructor.
-
isMethodParameterIndicator
public boolean isMethodParameterIndicator()
Description copied from interface:InjectionResolverThis 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:
isMethodParameterIndicatorin interfaceInjectionResolver<A extends java.lang.annotation.Annotation>- Returns:
- true if the injection annotation can appear in the parameter list of a method.
-
getAnnotation
public java.lang.Class<A> getAnnotation()
Description copied from interface:InjectionResolverThis method returns the annotation for what the injection resolver is implemented.- Specified by:
getAnnotationin interfaceInjectionResolver<A extends java.lang.annotation.Annotation>- Returns:
- handled annotation by injection resolver.
-
-