org.apache.tuscany.sca.contribution.resolver
Class DefaultDelegatingModelResolver

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.resolver.DefaultDelegatingModelResolver
All Implemented Interfaces:
ModelResolver

public class DefaultDelegatingModelResolver
extends java.lang.Object
implements ModelResolver

A model resolver implementation that delegates to a list of model resolvers.


Constructor Summary
DefaultDelegatingModelResolver(java.util.List<ModelResolver> resolvers)
           
 
Method Summary
 void addModel(java.lang.Object resolved)
          Add a resolved model.
 java.lang.Object removeModel(java.lang.Object resolved)
          Remove a resolved model.
<T> T
resolveModel(java.lang.Class<T> modelClass, T unresolved)
          Resolve the model representing an artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDelegatingModelResolver

public DefaultDelegatingModelResolver(java.util.List<ModelResolver> resolvers)
Method Detail

addModel

public void addModel(java.lang.Object resolved)
Description copied from interface: ModelResolver
Add a resolved model.

Specified by:
addModel in interface ModelResolver
Parameters:
resolved - The model

removeModel

public java.lang.Object removeModel(java.lang.Object resolved)
Description copied from interface: ModelResolver
Remove a resolved model.

Specified by:
removeModel in interface ModelResolver
Returns:
The removed model, or null if the model was not removed

resolveModel

public <T> T resolveModel(java.lang.Class<T> modelClass,
                          T unresolved)
Description copied from interface: ModelResolver
Resolve the model representing an artifact.

Specified by:
resolveModel in interface ModelResolver
Parameters:
modelClass - the type of artifact
unresolved - the unresolved model
Returns:
the resolved model