Package org.eclipse.viatra.query.runtime.matchers.psystem.rewriters

## Class NopTraceCollector

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.NopTraceCollector

- All Implemented Interfaces:
    `IPTraceableTraceProvider`, `IRewriterTraceCollector`

      public class NopTraceCollector
      extends java.lang.Object
      implements IRewriterTraceCollector

  This implementation does not store any traces and scales to NOP for every traceability feature.
  Since:
    1.6

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static IRewriterTraceCollector` | `INSTANCE` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addTrace​(PTraceable origin, PTraceable derivative)` | Mark the given derivative to be originated from the given original constraint.
    `void` | `derivativeRemoved​(PTraceable derivative, IDerivativeModificationReason reason)` | Indicate that the given derivative is removed from the resulting query, thus its trace information should be removed also.
    `java.util.stream.Stream<PTraceable>` | `getCanonicalTraceables​(PTraceable derivative)` | Find and return the canonical `PTraceable`s in the original query which are the sources of the given derivative `PTraceable` according to the transformation.
    `java.util.stream.Stream<IDerivativeModificationReason>` | `getRemovalReasons​(PTraceable traceable)` | Returns the reasons for which the traceable element has been removed by the rewriters.
    `java.util.stream.Stream<PTraceable>` | `getRewrittenTraceables​(PTraceable source)` | Find and return the `PTraceable`s in the rewritten query which are the destinations of the given source `PTraceable` according to the transformation.
    `boolean` | `isRemoved​(PTraceable traceable)` | Returns whether the given traceable element has been removed by every rewriter for a reason.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final IRewriterTraceCollector INSTANCE

  - ### Method Detail

    - #### getCanonicalTraceables

          public java.util.stream.Stream<PTraceable> getCanonicalTraceables​(PTraceable derivative)

      Description copied from interface: `IPTraceableTraceProvider`
      Find and return the canonical `PTraceable`s in the original query which are the sources of the given derivative `PTraceable` according to the transformation.
      Specified by:
        `getCanonicalTraceables` in interface `IPTraceableTraceProvider`
      Parameters:
        `derivative` - a `PTraceable` which is contained by the `PQuery` produced by the associated rewriter
      Since:
        2.0

    - #### getRewrittenTraceables

          public java.util.stream.Stream<PTraceable> getRewrittenTraceables​(PTraceable source)

      Description copied from interface: `IPTraceableTraceProvider`
      Find and return the `PTraceable`s in the rewritten query which are the destinations of the given source `PTraceable` according to the transformation.
      Specified by:
        `getRewrittenTraceables` in interface `IPTraceableTraceProvider`
      Parameters:
        `source` - a `PTraceable` which is contained by a `PQuery` before rewriting
      Since:
        2.0

    - #### addTrace

          public void addTrace​(PTraceable origin,
                               PTraceable derivative)

      Description copied from interface: `IRewriterTraceCollector`
      Mark the given derivative to be originated from the given original constraint.
      Specified by:
        `addTrace` in interface `IRewriterTraceCollector`

    - #### derivativeRemoved

          public void derivativeRemoved​(PTraceable derivative,
                                        IDerivativeModificationReason reason)

      Description copied from interface: `IRewriterTraceCollector`
      Indicate that the given derivative is removed from the resulting query, thus its trace information should be removed also.
      Specified by:
        `derivativeRemoved` in interface `IRewriterTraceCollector`

    - #### isRemoved

          public boolean isRemoved​(PTraceable traceable)

      Description copied from interface: `IPTraceableTraceProvider`
      Returns whether the given traceable element has been removed by every rewriter for a reason.
      Specified by:
        `isRemoved` in interface `IPTraceableTraceProvider`

    - #### getRemovalReasons

          public java.util.stream.Stream<IDerivativeModificationReason> getRemovalReasons​(PTraceable traceable)

      Description copied from interface: `IPTraceableTraceProvider`
      Returns the reasons for which the traceable element has been removed by the rewriters.
      Specified by:
        `getRemovalReasons` in interface `IPTraceableTraceProvider`
      Returns:
        the reasons of removal during rewriting
      Since:
        2.0