A
- supported parameter injection annotation.public class ParamInjectionResolver<A extends java.lang.annotation.Annotation> extends java.lang.Object implements InjectionResolver<A>
@XxxParam
injection.Modifier and Type | Field and Description |
---|---|
private java.lang.Class<A> |
annotation |
private javax.inject.Provider<ContainerRequest> |
request |
private ValueParamProvider |
valueParamProvider |
Constructor and Description |
---|
ParamInjectionResolver(ValueParamProvider valueParamProvider,
java.lang.Class<A> annotation,
javax.inject.Provider<ContainerRequest> request)
Initialize the base parameter injection resolver.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<A> |
getAnnotation()
This method returns the annotation for what the injection resolver is implemented.
|
private boolean |
hasEncodedAnnotation(Injectee injectee) |
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.
|
java.lang.Object |
resolve(Injectee injectee)
This method will return the object that should be injected into the given injection point.
|
private final ValueParamProvider valueParamProvider
private final java.lang.Class<A extends java.lang.annotation.Annotation> annotation
private final javax.inject.Provider<ContainerRequest> request
public ParamInjectionResolver(ValueParamProvider valueParamProvider, java.lang.Class<A> annotation, javax.inject.Provider<ContainerRequest> request)
valueParamProvider
- parameter value supplier provider.public java.lang.Object resolve(Injectee injectee)
InjectionResolver
This method should not do the injection themselves.
resolve
in interface InjectionResolver<A extends java.lang.annotation.Annotation>
injectee
- The injection point this value is being injected intoprivate boolean hasEncodedAnnotation(Injectee injectee)
public boolean isConstructorParameterIndicator()
InjectionResolver
isConstructorParameterIndicator
in interface InjectionResolver<A extends java.lang.annotation.Annotation>
public boolean isMethodParameterIndicator()
InjectionResolver
isMethodParameterIndicator
in interface InjectionResolver<A extends java.lang.annotation.Annotation>
public java.lang.Class<A> getAnnotation()
InjectionResolver
getAnnotation
in interface InjectionResolver<A extends java.lang.annotation.Annotation>