org.apache.tuscany.sca.contribution
Class DefaultModelFactoryExtensionPoint

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint
All Implemented Interfaces:
ModelFactoryExtensionPoint

public class DefaultModelFactoryExtensionPoint
extends java.lang.Object
implements ModelFactoryExtensionPoint

Default implementation of a model factory extension point.


Constructor Summary
DefaultModelFactoryExtensionPoint()
          Constructs a new DefaultModelFactoryExtensionPoint.
 
Method Summary
 void addFactory(java.lang.Object factory)
          Add a model factory extension.
<T> T
getFactory(java.lang.Class<T> factoryInterface)
          Get a factory implementing the given interface.
 void removeFactory(java.lang.Object factory)
          Remove a model factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultModelFactoryExtensionPoint

public DefaultModelFactoryExtensionPoint()
Constructs a new DefaultModelFactoryExtensionPoint.

Method Detail

addFactory

public void addFactory(java.lang.Object factory)
Add a model factory extension.

Specified by:
addFactory in interface ModelFactoryExtensionPoint
Parameters:
factory - The factory to add

removeFactory

public void removeFactory(java.lang.Object factory)
Remove a model factory.

Specified by:
removeFactory in interface ModelFactoryExtensionPoint
Parameters:
factory - The factory to remove

getFactory

public <T> T getFactory(java.lang.Class<T> factoryInterface)
Get a factory implementing the given interface.

Specified by:
getFactory in interface ModelFactoryExtensionPoint
Parameters:
factoryInterface - The lookup key (factory interface)
Returns:
The factory