org.apache.tuscany.sca.implementation.java.injection
Class FieldInjector<T>

java.lang.Object
  extended by org.apache.tuscany.sca.implementation.java.injection.FieldInjector<T>
All Implemented Interfaces:
Injector<T>

public class FieldInjector<T>
extends java.lang.Object
implements Injector<T>

Injects a value created by an ObjectFactory on a given field


Constructor Summary
FieldInjector(java.lang.reflect.Field pField, ObjectFactory<?> objectFactory)
          Create an injector and have it use the given ObjectFactory to inject a value on the instance using the reflected Field
 
Method Summary
 void inject(T instance)
          Inject a new value on the given instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldInjector

public FieldInjector(java.lang.reflect.Field pField,
                     ObjectFactory<?> objectFactory)
Create an injector and have it use the given ObjectFactory to inject a value on the instance using the reflected Field

Method Detail

inject

public void inject(T instance)
            throws ObjectCreationException
Inject a new value on the given instance

Specified by:
inject in interface Injector<T>
Throws:
ObjectCreationException