Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-10-08 15:46:22 +0000
committerEd Willink2016-10-30 11:37:02 +0000
commitc6a0ba01d59c0f4b783a44aa20ed79707f5b84f5 (patch)
treee6328e65e6941f71c1f1652707ebf4227b7286e5
parent2e167f5a805fe0474fda70cff4ed29297bb49a67 (diff)
downloadorg.eclipse.qvtd-c6a0ba01d59c0f4b783a44aa20ed79707f5b84f5.tar.gz
org.eclipse.qvtd-c6a0ba01d59c0f4b783a44aa20ed79707f5b84f5.tar.xz
org.eclipse.qvtd-c6a0ba01d59c0f4b783a44aa20ed79707f5b84f5.zip
[500962] Better Transformer API
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/Transformer.java5
-rw-r--r--plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java20
2 files changed, 25 insertions, 0 deletions
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/Transformer.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/Transformer.java
index ea0a69e9e..c5573229c 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/Transformer.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/evaluation/Transformer.java
@@ -15,6 +15,7 @@ import java.util.Collection;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.ocl.pivot.evaluation.ModelManager;
+import org.eclipse.ocl.pivot.internal.evaluation.EvaluationCache;
/**
* A Transformer provides the core support to execute an auto-generated transformation
@@ -42,6 +43,10 @@ public interface Transformer extends ModelManager, ExecutionVisitable
public static int RUN_TIME_EVALUATOR_API_VERSION = RUN_TIME_EVALUATOR_API_VERSION_1_1_0_2;
void addRootObjects(@NonNull String modelName, @NonNull Iterable<@NonNull ? extends Object> rootObjects);
+ @NonNull EvaluationCache getEvaluationCache();
+ @NonNull TransformationExecutor getExecutor();
+ @NonNull InvocationManager getInvocationManager();
+ @NonNull ObjectManager getObjectManager();
@NonNull Collection<@NonNull ? extends EObject> getRootEObjects(@NonNull String modelName);
@NonNull Collection<@NonNull Object> getRootObjects(@NonNull String modelName);
boolean run() throws Exception;
diff --git a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java
index e9c600717..e12b8dcf2 100644
--- a/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java
+++ b/plugins/org.eclipse.qvtd.runtime/src/org/eclipse/qvtd/runtime/internal/evaluation/AbstractTransformerInternal.java
@@ -581,6 +581,26 @@ public abstract class AbstractTransformerInternal extends AbstractModelManager i
return classIndexes;
}
+ @Override
+ public @NonNull EvaluationCache getEvaluationCache() {
+ return evaluationCache;
+ }
+
+ @Override
+ public @NonNull TransformationExecutor getExecutor() {
+ return executor;
+ }
+
+ @Override
+ public @NonNull InvocationManager getInvocationManager() {
+ return invocationManager;
+ }
+
+ @Override
+ public @NonNull ObjectManager getObjectManager() {
+ return objectManager;
+ }
+
/**
* Return all objects in the modelIndex model that conform to eClass.
*

Back to the top