2016/05/28 - Apache Tuscany has been retired.
For more information, please explore the Attic.
org.apache.tuscany.sca.contribution.groovy
Class GroovyModelResolver
java.lang.Object
org.apache.tuscany.sca.contribution.groovy.GroovyModelResolver
- All Implemented Interfaces:
- ModelResolver
public class GroovyModelResolver
- extends java.lang.Object
- implements ModelResolver
A ModelResolver that compiles Groovy scripts into the contribution
class loader so they can be used just like a regular java class.
Method Summary |
void |
addModel(java.lang.Object model)
Add a resolved model. |
java.lang.Object |
removeModel(java.lang.Object arg0)
Remove a resolved model. |
|
resolveModel(java.lang.Class<T> arg0,
T arg1)
Resolve the model representing an artifact. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modelresolver
protected ModelResolver modelresolver
contribution
protected Contribution contribution
GroovyModelResolver
public GroovyModelResolver(Contribution contribution,
ModelFactoryExtensionPoint modelFactories)
addModel
public void addModel(java.lang.Object model)
- Description copied from interface:
ModelResolver
- Add a resolved model.
- Specified by:
addModel
in interface ModelResolver
- Parameters:
model
- The model
removeModel
public java.lang.Object removeModel(java.lang.Object arg0)
- 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> arg0,
T arg1)
- Description copied from interface:
ModelResolver
- Resolve the model representing an artifact.
- Specified by:
resolveModel
in interface ModelResolver
- Parameters:
arg0
- the type of artifactarg1
- the unresolved model
- Returns:
- the resolved model