Tuscany Core

org.apache.tuscany.core.injection
Class FieldInjector<T>

java.lang.Object
  extended by org.apache.tuscany.core.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

Version:
$Rev: 406532 $ $Date: 2006-05-15 00:23:43 -0400 (Mon, 15 May 2006) $

Constructor Summary
FieldInjector(java.lang.reflect.Field field, 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 isntance
 
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 field,
                     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 isntance

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

Tuscany Core

-