Tuscany Core

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

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

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

Implementation of ObjectFactory that returns a single instance, typically an immutable type.

Version:
$Rev: 408581 $ $Date: 2006-05-21 23:34:24 -0700 (Sun, 21 May 2006) $

Constructor Summary
SingletonObjectFactory(T instance)
           
 
Method Summary
 T getInstance()
          Return a instance of the type that this factory creates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonObjectFactory

public SingletonObjectFactory(T instance)
Method Detail

getInstance

public T getInstance()
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

Tuscany Core

-