@Singleton public class ContextInjectionResolverImpl extends java.lang.Object implements org.glassfish.hk2.api.InjectionResolver<javax.ws.rs.core.Context>, ContextInjectionResolver
@Context
injection annotation.Modifier and Type | Class and Description |
---|---|
static class |
ContextInjectionResolverImpl.Binder
Context injection resolver binder.
|
private static class |
ContextInjectionResolverImpl.CacheKey
Key dedicated for internal cache mechanism because two different
Injectee Hk2 implementations comes from
Jersey side and HK2 side injection resolver. |
private static class |
ContextInjectionResolverImpl.DescriptorOverridingInjectee |
private static class |
ContextInjectionResolverImpl.RequiredTypeOverridingInjectee |
Modifier and Type | Field and Description |
---|---|
private Cache<ContextInjectionResolverImpl.CacheKey,org.glassfish.hk2.api.ActiveDescriptor<?>> |
descriptorCache |
private LazyValue<java.util.Set<java.lang.Class<?>>> |
foreignRequestScopedComponents |
private Cache<ContextInjectionResolverImpl.CacheKey,org.glassfish.hk2.api.Injectee> |
foreignRequestScopedInjecteeCache |
private org.glassfish.hk2.api.ServiceLocator |
serviceLocator |
Constructor and Description |
---|
ContextInjectionResolverImpl() |
Modifier and Type | Method and Description |
---|---|
private org.glassfish.hk2.api.Factory |
asFactory(org.glassfish.hk2.api.ServiceHandle handle) |
java.lang.Class<javax.ws.rs.core.Context> |
getAnnotation()
This method returns the annotation for what the injection resolver is implemented.
|
private org.glassfish.hk2.api.Injectee |
getFactoryInjectee(org.glassfish.hk2.api.Injectee injectee,
java.lang.reflect.Type requiredType) |
private java.util.Set<java.lang.Class<?>> |
getForeignRequestScopedComponents() |
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)
Jersey Injection Resolver method that just populate HK2 injectee object and delegates the processing to HK2 Injection
Resolver.
|
java.lang.Object |
resolve(org.glassfish.hk2.api.Injectee injectee,
org.glassfish.hk2.api.ServiceHandle<?> root) |
private static org.glassfish.hk2.utilities.InjecteeImpl |
toInjecteeImpl(Injectee injectee) |
@Inject private org.glassfish.hk2.api.ServiceLocator serviceLocator
private final Cache<ContextInjectionResolverImpl.CacheKey,org.glassfish.hk2.api.ActiveDescriptor<?>> descriptorCache
private final Cache<ContextInjectionResolverImpl.CacheKey,org.glassfish.hk2.api.Injectee> foreignRequestScopedInjecteeCache
private LazyValue<java.util.Set<java.lang.Class<?>>> foreignRequestScopedComponents
public java.lang.Object resolve(org.glassfish.hk2.api.Injectee injectee, org.glassfish.hk2.api.ServiceHandle<?> root)
public java.lang.Object resolve(Injectee injectee)
resolve
in interface InjectionResolver<javax.ws.rs.core.Context>
injectee
- The injection point this value is being injected intoprivate static org.glassfish.hk2.utilities.InjecteeImpl toInjecteeImpl(Injectee injectee)
private org.glassfish.hk2.api.Factory asFactory(org.glassfish.hk2.api.ServiceHandle handle)
private org.glassfish.hk2.api.Injectee getFactoryInjectee(org.glassfish.hk2.api.Injectee injectee, java.lang.reflect.Type requiredType)
public boolean isConstructorParameterIndicator()
InjectionResolver
isConstructorParameterIndicator
in interface InjectionResolver<javax.ws.rs.core.Context>
public boolean isMethodParameterIndicator()
InjectionResolver
isMethodParameterIndicator
in interface InjectionResolver<javax.ws.rs.core.Context>
public java.lang.Class<javax.ws.rs.core.Context> getAnnotation()
InjectionResolver
getAnnotation
in interface InjectionResolver<javax.ws.rs.core.Context>
private java.util.Set<java.lang.Class<?>> getForeignRequestScopedComponents()