Class MappingTraceCollector
java.lang.Object
tools.refinery.interpreter.matchers.psystem.rewriters.MappingTraceCollector
- All Implemented Interfaces:
IPTraceableTraceProvider
,IRewriterTraceCollector
Multimap-based implementation to contain and query traces
- Since:
- 1.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTrace
(PTraceable original, 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.getCanonicalTraceables
(PTraceable derivative) Find and return the canonicalPTraceable
s in the original query which are the sources of the given derivativePTraceable
according to the transformation.getRemovalReasons
(PTraceable traceable) Returns the reasons for which the traceable element has been removed by the rewriters.getRewrittenTraceables
(PTraceable source) Find and return thePTraceable
s in the rewritten query which are the destinations of the given sourcePTraceable
according to the transformation.boolean
isRemoved
(PTraceable traceable) Returns whether the given traceable element has been removed by every rewriter for a reason.
-
Constructor Details
-
MappingTraceCollector
public MappingTraceCollector()
-
-
Method Details
-
getCanonicalTraceables
Description copied from interface:IPTraceableTraceProvider
Find and return the canonicalPTraceable
s in the original query which are the sources of the given derivativePTraceable
according to the transformation.- Specified by:
getCanonicalTraceables
in interfaceIPTraceableTraceProvider
- Parameters:
derivative
- aPTraceable
which is contained by thePQuery
produced by the associated rewriter- Since:
- 2.0
-
getRewrittenTraceables
Description copied from interface:IPTraceableTraceProvider
Find and return thePTraceable
s in the rewritten query which are the destinations of the given sourcePTraceable
according to the transformation.- Specified by:
getRewrittenTraceables
in interfaceIPTraceableTraceProvider
- Parameters:
source
- aPTraceable
which is contained by aPQuery
before rewriting- Since:
- 2.0
-
addTrace
Description copied from interface:IRewriterTraceCollector
Mark the given derivative to be originated from the given original constraint.- Specified by:
addTrace
in interfaceIRewriterTraceCollector
-
derivativeRemoved
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 interfaceIRewriterTraceCollector
-
isRemoved
Description copied from interface:IPTraceableTraceProvider
Returns whether the given traceable element has been removed by every rewriter for a reason.- Specified by:
isRemoved
in interfaceIPTraceableTraceProvider
-
getRemovalReasons
Description copied from interface:IPTraceableTraceProvider
Returns the reasons for which the traceable element has been removed by the rewriters.- Specified by:
getRemovalReasons
in interfaceIPTraceableTraceProvider
- Returns:
- the reasons of removal during rewriting
- Since:
- 2.0
-