Tuscany Core

org.apache.tuscany.core.system.injection
Class AutowireObjectFactory<T>

java.lang.Object
  extended by org.apache.tuscany.core.system.injection.AutowireObjectFactory<T>
All Implemented Interfaces:
ObjectFactory<T>

public class AutowireObjectFactory<T>
extends Object
implements ObjectFactory<T>

Returns an instance by resolving against an AutowireContext.

Version:
$Rev: 385139 $ $Date: 2006-03-11 11:03:11 -0800 (Sat, 11 Mar 2006) $

Constructor Summary
AutowireObjectFactory(Class<T> implementationType)
          Creates a new factory that resolves against the cuurent context using the given implementation type
AutowireObjectFactory(Class<T> autowireType, ContextResolver resolver)
           
 
Method Summary
 T getInstance()
          Return a instance of the type that this factory creates.
 void setContextResolver(ContextResolver resolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutowireObjectFactory

public AutowireObjectFactory(Class<T> autowireType,
                             ContextResolver resolver)
Throws:
FactoryInitException

AutowireObjectFactory

public AutowireObjectFactory(Class<T> implementationType)
Creates a new factory that resolves against the cuurent context using the given implementation type

Throws:
FactoryInitException
Method Detail

getInstance

public T getInstance()
              throws ObjectCreationException
Description copied from interface: ObjectFactory
Return a instance of the type that this factory creates.

Specified by:
getInstance in interface ObjectFactory<T>
Returns:
a instance from this factory
Throws:
ObjectCreationException

setContextResolver

public void setContextResolver(ContextResolver resolver)

Tuscany Core

-