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.


Method Summary
 boolean provideInjection(String fieldName, Class fieldType, ObjectLocator locator, ClassTransformation transformation, MutableComponentModel componentModel)
          Peform the injection, if possible.
 

Method Detail

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 injection
fieldType - the type of the field
locator - allows services to be located
transformation - allows the code for the class to be transformed
componentModel - 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.