org.apache.tapestry5.services
Interface InjectionProvider
- All Known Implementing Classes:
- AssetInjectionProvider, BlockInjectionProvider, CommonResourcesInjectionProvider, ComponentResourcesInjectionProvider, DefaultInjectionProvider, ServiceInjectionProvider
public interface InjectionProvider
Provides some form of injection when the value for an Inject annotation is
present. In this case, the provider is responsible for determining the value to be injected from the field name and
field type.
This interface will be used as part of a chain of command.
provideInjection
boolean provideInjection(String fieldName,
Class fieldType,
ObjectLocator locator,
ClassTransformation transformation,
MutableComponentModel componentModel)
- 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).
- 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-2008 Apache Software Foundation. All Rights Reserved.