org.apache.tapestry.internal.services
Class DefaultInjectionProvider

java.lang.Object
  extended by org.apache.tapestry.internal.services.DefaultInjectionProvider
All Implemented Interfaces:
InjectionProvider

public class DefaultInjectionProvider
extends Object
implements InjectionProvider

Worker for the Inject annotation that delegates out to the master MasterObjectProvider to access the value. This worker must be scheduled after certain other workers, such as BlockInjectionProvider (which is keyed off a combination of type and the Inject annotation).

See Also:
MasterObjectProvider

Constructor Summary
DefaultInjectionProvider(MasterObjectProvider masterObjectProvider, ObjectLocator locator)
           
 
Method Summary
 boolean provideInjection(String fieldName, Class fieldType, ObjectLocator locator, ClassTransformation transformation, MutableComponentModel componentModel)
          Peform the injection, if possible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInjectionProvider

public DefaultInjectionProvider(MasterObjectProvider masterObjectProvider,
                                ObjectLocator locator)
Method Detail

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 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-2008 Apache Software Foundation. All Rights Reserved.