aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/FeatureListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/FeatureListener.java')
-rw-r--r--subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/FeatureListener.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/FeatureListener.java b/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/FeatureListener.java
new file mode 100644
index 00000000..fa2d679e
--- /dev/null
+++ b/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/FeatureListener.java
@@ -0,0 +1,48 @@
1/*******************************************************************************
2 * Copyright (c) 2010-2012, Tamas Szabo, Gabor Bergmann, Istvan Rath and Daniel Varro
3 * This program and the accompanying materials are made available under the
4 * terms of the Eclipse Public License v. 2.0 which is available at
5 * http://www.eclipse.org/legal/epl-v20.html.
6 *
7 * SPDX-License-Identifier: EPL-2.0
8 *******************************************************************************/
9package tools.refinery.viatra.runtime.base.api;
10
11import org.eclipse.emf.ecore.EAttribute;
12import org.eclipse.emf.ecore.EObject;
13import org.eclipse.emf.ecore.EReference;
14import org.eclipse.emf.ecore.EStructuralFeature;
15
16/**
17 * Interface for observing insertion and deletion of structural feature values ("settings"). (Works both for
18 * single-valued and many-valued features.)
19 *
20 * @author Tamas Szabo
21 *
22 */
23public interface FeatureListener {
24
25 /**
26 * Called when the given value is inserted into the given feature of the given host EObject.
27 *
28 * @param host
29 * the host (holder) of the feature
30 * @param feature
31 * the {@link EAttribute} or {@link EReference} instance
32 * @param value
33 * the target of the feature
34 */
35 public void featureInserted(EObject host, EStructuralFeature feature, Object value);
36
37 /**
38 * Called when the given value is removed from the given feature of the given host EObject.
39 *
40 * @param host
41 * the host (holder) of the feature
42 * @param feature
43 * the {@link EAttribute} or {@link EReference} instance
44 * @param value
45 * the target of the feature
46 */
47 public void featureDeleted(EObject host, EStructuralFeature feature, Object value);
48}