aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/store-query-viatra/src/main/java/org/eclipse/viatra/query/runtime/rete/network/RefineryConnectionFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/store-query-viatra/src/main/java/org/eclipse/viatra/query/runtime/rete/network/RefineryConnectionFactory.java')
-rw-r--r--subprojects/store-query-viatra/src/main/java/org/eclipse/viatra/query/runtime/rete/network/RefineryConnectionFactory.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/subprojects/store-query-viatra/src/main/java/org/eclipse/viatra/query/runtime/rete/network/RefineryConnectionFactory.java b/subprojects/store-query-viatra/src/main/java/org/eclipse/viatra/query/runtime/rete/network/RefineryConnectionFactory.java
new file mode 100644
index 00000000..241c5b58
--- /dev/null
+++ b/subprojects/store-query-viatra/src/main/java/org/eclipse/viatra/query/runtime/rete/network/RefineryConnectionFactory.java
@@ -0,0 +1,34 @@
1/*
2 * SPDX-FileCopyrightText: 2023 The Refinery Authors <https://refinery.tools/>
3 *
4 * SPDX-License-Identifier: EPL-2.0
5 */
6package org.eclipse.viatra.query.runtime.rete.network;
7
8import org.eclipse.viatra.query.runtime.rete.traceability.RecipeTraceInfo;
9import tools.refinery.store.query.viatra.internal.rete.network.RefineryConnectionFactoryExtensions;
10
11/**
12 * This class overrides some RETE connection types from {@link ConnectionFactory}.
13 * <p>
14 * Since {@link ConnectionFactory} is package-private, this class has to be in the
15 * {@code org.eclipse.viatra.query.runtime.rete.network} package as well.
16 * However, due to JAR signature verification errors, <b>this class cannot be loaded directly</b>
17 * and has to be loaded at runtime as a byte array instead.
18 */
19@SuppressWarnings("unused")
20public class RefineryConnectionFactory extends ConnectionFactory {
21 private final RefineryConnectionFactoryExtensions extensions;
22
23 public RefineryConnectionFactory(ReteContainer reteContainer) {
24 super(reteContainer);
25 extensions = new RefineryConnectionFactoryExtensions(reteContainer);
26 }
27
28 @Override
29 public void connectToParents(RecipeTraceInfo recipeTrace, Node freshNode) {
30 if (!extensions.connectToParents(recipeTrace, freshNode)) {
31 super.connectToParents(recipeTrace, freshNode);
32 }
33 }
34}