blob: 15cf577eb2e42e0925659ee6c181ac95184a3ce5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*******************************************************************************
* Copyright (c) 2010-2017, Grill Balázs, IncQueryLabs
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-v20.html.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package tools.refinery.viatra.runtime.matchers.psystem.rewriters;
import java.util.stream.Stream;
import tools.refinery.viatra.runtime.matchers.psystem.PTraceable;
/**
* This implementation does not store any traces and scales to NOP for every traceability feature.
* @since 1.6
*
*/
public class NopTraceCollector implements IRewriterTraceCollector {
public static final IRewriterTraceCollector INSTANCE = new NopTraceCollector();
private NopTraceCollector() {
// Private constructor to force using the common instance
}
/**
* @since 2.0
*/
@Override
public Stream<PTraceable> getCanonicalTraceables(PTraceable derivative) {
return Stream.empty();
}
/**
* @since 2.0
*/
@Override
public Stream<PTraceable> getRewrittenTraceables(PTraceable source) {
return Stream.empty();
}
@Override
public void addTrace(PTraceable origin, PTraceable derivative) {
// ignored
}
@Override
public void derivativeRemoved(PTraceable derivative, IDerivativeModificationReason reason) {
// ignored
}
@Override
public boolean isRemoved(PTraceable traceable) {
return false;
}
/**
* @since 2.0
*/
@Override
public Stream<IDerivativeModificationReason> getRemovalReasons(PTraceable traceable) {
return Stream.empty();
}
}
|