org.apache.tuscany.sca.implementation.java.context
Interface InstanceFactory<T>

Type Parameters:
T - Type of the instance generated by the factory.
All Known Implementing Classes:
ReflectiveInstanceFactory

public interface InstanceFactory<T>

Interface for a factory that returns an injected component instance. This is used by a Component implementation to create new instances of application implementation objects as determined by the component scope's lifecycle.

The implementation of this interface may be supplied by the user, may be generated during deployment, or may be dynamic.


Method Summary
 InstanceWrapper<T> newInstance()
          Creates a new instance of the component.
 

Method Detail

newInstance

InstanceWrapper<T> newInstance()
Creates a new instance of the component. All injected values must be set but any @Init methods must not have been invoked.

Returns:
A wrapper for the created component instance.