org.apache.tapestry5.internal.services
Class BlockInjectionProvider
java.lang.Object
org.apache.tapestry5.internal.services.BlockInjectionProvider
- All Implemented Interfaces:
- InjectionProvider
public class BlockInjectionProvider
- extends Object
- implements InjectionProvider
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlockInjectionProvider
public BlockInjectionProvider()
provideInjection
public boolean provideInjection(String fieldName,
Class fieldType,
ObjectLocator locator,
ClassTransformation transformation,
MutableComponentModel componentModel)
- Description copied from interface:
InjectionProvider
- Peform the injection, if possible. Most often, this will result in a call to
ClassTransformation.injectField(String, Object). The caller is responsible for invoking ClassTransformation.claimField(String, Object).
- Specified by:
provideInjection in interface InjectionProvider
- Parameters:
fieldName - the name of the field requesting injectionfieldType - the type of the fieldlocator - allows services to be locatedtransformation - allows the code for the class to be transformedcomponentModel - 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
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.