Class ConfiguredByInjectionResolver
java.lang.Object
org.glassfish.hk2.configuration.internal.ConfiguredByInjectionResolver
- All Implemented Interfaces:
InjectionResolver<Configured>
@Singleton
@Visibility(LOCAL)
public class ConfiguredByInjectionResolver
extends Object
implements InjectionResolver<Configured>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentHashMap
<ActiveDescriptor<?>, BeanInfo> private ConfiguredByContext
private InjectionResolver
<javax.inject.Inject> Fields inherited from interface org.glassfish.hk2.api.InjectionResolver
SYSTEM_RESOLVER_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) BeanInfo
addBean
(ActiveDescriptor<?> descriptor, Object bean, String type, Object metadata) private static String
getParameterNameFromConstructor
(Constructor<?> cnst, int position) private static String
getParameterNameFromMethod
(Method method, int position) boolean
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
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) resolve
(Injectee injectee, ServiceHandle<?> root) This method will return the object that should be injected into the given injection point.toString()
-
Field Details
-
systemResolver
@Inject @Named("SystemInjectResolver") private InjectionResolver<javax.inject.Inject> systemResolver -
context
-
beanMap
-
-
Constructor Details
-
ConfiguredByInjectionResolver
public ConfiguredByInjectionResolver()
-
-
Method Details
-
getParameterNameFromConstructor
-
getParameterNameFromMethod
-
resolve
Description copied from interface:InjectionResolver
This method will return the object that should be injected into the given injection point. It is the responsiblity 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:
resolve
in interfaceInjectionResolver<Configured>
- Parameters:
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 invalid input: '&'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.- Returns:
- A possibly null value to be injected into the given injection point
-
isConstructorParameterIndicator
public boolean isConstructorParameterIndicator()Description copied from interface:InjectionResolver
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.- Specified by:
isConstructorParameterIndicator
in interfaceInjectionResolver<Configured>
- Returns:
- true if the injection annotation can appear in the parameter list of a constructor
-
isMethodParameterIndicator
public boolean isMethodParameterIndicator()Description copied from interface:InjectionResolver
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.- Specified by:
isMethodParameterIndicator
in interfaceInjectionResolver<Configured>
- Returns:
- true if the injection annotation can appear in the parameter list of a method
-
addBean
-
removeBean
-
toString
-