@Singleton class DelegatedInjectionValueFactoryProvider extends java.lang.Object implements ValueFactoryProvider
ValueFactoryProvider.Priority, ValueFactoryProvider.PriorityType
Modifier and Type | Field and Description |
---|---|
(package private) static org.glassfish.hk2.utilities.cache.Cache<Parameter,org.glassfish.hk2.api.ActiveDescriptor> |
descriptorCache
We do not want to create a new descriptor instance for every and each method invocation.
|
private ContextInjectionResolver |
resolver |
Constructor and Description |
---|
DelegatedInjectionValueFactoryProvider(org.glassfish.hk2.api.ServiceLocator locator)
Injection constructor.
|
Modifier and Type | Method and Description |
---|---|
private static <T> org.glassfish.hk2.utilities.AbstractActiveDescriptor<T> |
createDescriptor(java.lang.Class<T> clazz) |
private static org.glassfish.hk2.api.Injectee |
getInjectee(Parameter parameter) |
ValueFactoryProvider.PriorityType |
getPriority()
Gets the priority of this provider.
|
org.glassfish.hk2.api.Factory<?> |
getValueFactory(Parameter parameter)
Get an injected value factory for the parameter.
|
private final ContextInjectionResolver resolver
static final org.glassfish.hk2.utilities.cache.Cache<Parameter,org.glassfish.hk2.api.ActiveDescriptor> descriptorCache
@Inject public DelegatedInjectionValueFactoryProvider(org.glassfish.hk2.api.ServiceLocator locator)
locator
- HK2 service locator.public org.glassfish.hk2.api.Factory<?> getValueFactory(Parameter parameter)
ValueFactoryProvider
null
in case the parameter is not supported by the value factory provider.getValueFactory
in interface ValueFactoryProvider
parameter
- parameter requesting the value factory instance.null
if parameter
is not supported.public ValueFactoryProvider.PriorityType getPriority()
ValueFactoryProvider
getPriority
in interface ValueFactoryProvider
ValueFactoryProvider.PriorityType
,
ValueFactoryProvider.Priority
private static org.glassfish.hk2.api.Injectee getInjectee(Parameter parameter)
private static <T> org.glassfish.hk2.utilities.AbstractActiveDescriptor<T> createDescriptor(java.lang.Class<T> clazz)