Modifier and Type | Method and Description |
---|---|
Object |
createOrFindService(Injectee injectee,
ServiceHandle<?> root)
Given an injectee create and cache or resolve the service associated with
it.
|
Object |
findOrCreateCollaborator(int position,
String fieldName,
Injectee injectee,
ServiceHandle<?> root)
Given metadata about collborator an an injectee create or resolve the
collaborating service.
|
Object |
findOrCreateSUT(SUT sut,
Injectee injectee,
ServiceHandle<?> root)
Given an SUT annotation and an injectee resolve the service associated
with the injectee and use the metadata in the SUT annotation to possibly
create a mockito spy.
|
Object |
resolve(Injectee injectee,
ServiceHandle<?> root)
Given an injectee find the service by iterating through all the resolvers
in the system to resolve it.
|
public Object resolve(Injectee injectee, ServiceHandle<?> root)
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 Object findOrCreateSUT(SUT sut, Injectee injectee, ServiceHandle<?> root)
sut
- annotation containing sut config meta-datainjectee
- The injection point this value is being injected intoroot
- The service handle of the root class being createdpublic Object createOrFindService(Injectee injectee, ServiceHandle<?> root)
injectee
- The injection point this value is being injected intoroot
- The service handle of the root class being createdpublic Object findOrCreateCollaborator(int position, String fieldName, Injectee injectee, ServiceHandle<?> root)
position
- method or constructor the parameter position metadatafieldName
- field name metadatainjectee
- The injection point this value is being injected intoroot
- The service handle of the root class being createdCopyright © 2009–2023 Oracle Corporation. All rights reserved.