Class DefaultInjectionProvider
java.lang.Object
org.apache.tapestry5.internal.services.DefaultInjectionProvider
- All Implemented Interfaces:
InjectionProvider2
Worker for the
Inject
annotation that delegates out to the master
MasterObjectProvider
to access the value. This worker must be scheduled
after certain other workers, such as BlockInjectionProvider
(which is keyed off a combination of type and
the Inject annotation).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInjectionProvider
(MasterObjectProvider masterObjectProvider, ObjectLocator locator, ComponentClassCache classCache) -
Method Summary
Modifier and TypeMethodDescriptionboolean
provideInjection
(PlasticField field, ObjectLocator locator, MutableComponentModel componentModel) Perform the injection, if possible.
-
Constructor Details
-
DefaultInjectionProvider
public DefaultInjectionProvider(MasterObjectProvider masterObjectProvider, ObjectLocator locator, ComponentClassCache classCache)
-
-
Method Details
-
provideInjection
public boolean provideInjection(PlasticField field, ObjectLocator locator, MutableComponentModel componentModel) Description copied from interface:InjectionProvider2
Perform 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:
provideInjection
in interfaceInjectionProvider2
- Parameters:
field
- that has theInject
annotationlocator
- 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
-