org.apache.tapestry.internal.services
Class ServiceInjectionProvider
java.lang.Object
org.apache.tapestry.internal.services.ServiceInjectionProvider
- All Implemented Interfaces:
- InjectionProvider
public class ServiceInjectionProvider
- extends Object
- implements InjectionProvider
A very late worker related to the Inject annotation that, when all other forms of injection have failed,
matches the field type to a service interface.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceInjectionProvider
public ServiceInjectionProvider(ObjectLocator locator)
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-2008 Apache Software Foundation. All Rights Reserved.