@Singleton @Visibility(value=LOCAL) public class ConfiguredByInjectionResolver extends java.lang.Object implements InjectionResolver<Configured>
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.ConcurrentHashMap<ActiveDescriptor<?>,BeanInfo> |
beanMap |
private ConfiguredByContext |
context |
private InjectionResolver<javax.inject.Inject> |
systemResolver |
SYSTEM_RESOLVER_NAME
Constructor and Description |
---|
ConfiguredByInjectionResolver() |
Modifier and Type | Method and Description |
---|---|
(package private) BeanInfo |
addBean(ActiveDescriptor<?> descriptor,
java.lang.Object bean,
java.lang.String type,
java.lang.Object metadata) |
private static java.lang.String |
getParameterNameFromConstructor(java.lang.reflect.Constructor<?> cnst,
int position) |
private static java.lang.String |
getParameterNameFromMethod(java.lang.reflect.Method method,
int position) |
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.
|
(package private) void |
removeBean(ActiveDescriptor<?> descriptor) |
java.lang.Object |
resolve(Injectee injectee,
ServiceHandle<?> root)
This method will return the object that should be injected into the given
injection point.
|
java.lang.String |
toString() |
@Inject @Named(value="SystemInjectResolver") private InjectionResolver<javax.inject.Inject> systemResolver
@Inject private ConfiguredByContext context
private final java.util.concurrent.ConcurrentHashMap<ActiveDescriptor<?>,BeanInfo> beanMap
private static java.lang.String getParameterNameFromConstructor(java.lang.reflect.Constructor<?> cnst, int position)
private static java.lang.String getParameterNameFromMethod(java.lang.reflect.Method method, int position)
public java.lang.Object resolve(Injectee injectee, ServiceHandle<?> root)
InjectionResolver
This method should not do the injection themselves
resolve
in interface InjectionResolver<Configured>
injectee
- The injection point this value is being injected intoroot
- The service handle of the root class being created, which should
be used in order to ensure proper destruction of associated &64;PerLookup
scoped objects. This can be null in the case that this is being used
for an object not managed by HK2. This will only happen if this
object is being created with the create method of ServiceLocator.public boolean isConstructorParameterIndicator()
InjectionResolver
isConstructorParameterIndicator
in interface InjectionResolver<Configured>
public boolean isMethodParameterIndicator()
InjectionResolver
isMethodParameterIndicator
in interface InjectionResolver<Configured>
BeanInfo addBean(ActiveDescriptor<?> descriptor, java.lang.Object bean, java.lang.String type, java.lang.Object metadata)
void removeBean(ActiveDescriptor<?> descriptor)
public java.lang.String toString()
toString
in class java.lang.Object