public class BlockInjectionProvider extends Object implements InjectionProvider2
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 and Description |
---|
BlockInjectionProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
provideInjection(PlasticField field,
ObjectLocator locator,
MutableComponentModel componentModel)
Perform the injection, if possible.
|
public BlockInjectionProvider()
public boolean provideInjection(PlasticField field, ObjectLocator locator, MutableComponentModel componentModel)
InjectionProvider2
PlasticField.inject(Object)
. The caller is responsible for invoking PlasticField.claim(Object)
.provideInjection
in interface InjectionProvider2
field
- that has the Inject
annotationlocator
- allows services to be locatedcomponentModel
- defines the relevant aspects of the component${project.version} - Copyright © 2003-2015 The Apache Software Foundation.