Class ServiceInjectionProvider
java.lang.Object
org.apache.tapestry5.internal.services.ServiceInjectionProvider
- All Implemented Interfaces:
InjectionProvider2
A very late worker related to the
Inject annotation that, when all other forms of injection have failed,
matches the field type to a service interface.-
Constructor Summary
ConstructorsConstructorDescriptionServiceInjectionProvider(ObjectLocator locator, ComponentClassCache classCache) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprovideInjection(PlasticField field, ObjectLocator locator, MutableComponentModel componentModel) Perform the injection, if possible.
-
Constructor Details
-
ServiceInjectionProvider
-
-
Method Details
-
provideInjection
public boolean provideInjection(PlasticField field, ObjectLocator locator, MutableComponentModel componentModel) Description copied from interface:InjectionProvider2Perform the injection, if possible. Most often, this will result in a call toPlasticField.inject(Object). The caller is responsible for invokingPlasticField.claim(Object).- Specified by:
provideInjectionin interfaceInjectionProvider2- Parameters:
field- that has theInjectannotationlocator- allows services to be locatedcomponentModel- defines the relevant aspects of the component- Returns:
- true if an injection has been made (terminates the command chain), false to continue down the chain
-