Class BlockInjectionProvider
java.lang.Object
org.apache.tapestry5.internal.services.BlockInjectionProvider
- All Implemented Interfaces:
InjectionProvider2
Identifies fields of type
Block
that have the Inject
annotation and converts them
into read-only
fields containing the injected Block from the template. The annotation's value is the id of the
block to inject; if
omitted, the block id is deduced from the field id.
Must be scheduled before DefaultInjectionProvider
because it uses the same annotation, Inject, with a
different interpretation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
provideInjection
(PlasticField field, ObjectLocator locator, MutableComponentModel componentModel) Perform the injection, if possible.
-
Constructor Details
-
BlockInjectionProvider
public BlockInjectionProvider()
-
-
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
-