Class LabelWithEditClass
java.lang.Object
org.variantsync.diffdetective.variation.diff.transform.LabelWithEditClass
- All Implemented Interfaces:
VariationDiffTransformer<DiffLinesLabel>
Label all nodes with their edit class.
This transformation leaves the graph structure of the
VariationDiff
unchanged.
All artifact
nodes will be labeled by their respective edit class.
All other nodes will be labeled by the name of their node type
.- Author:
- Paul Bittner
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLabelWithEditClass
(EditClassCatalogue editClasses) Creates a new transformation that will use the given catalog of edit classes to relabelartifact
nodes. -
Method Summary
Modifier and TypeMethodDescriptionList<Class<? extends VariationDiffTransformer<DiffLinesLabel>>>
Returns a list of dependencies to other transformers.void
transform
(VariationDiff<DiffLinesLabel> variationDiff) Apply a transformation to the given VariationDiff inplace.
-
Field Details
-
relabelNodes
-
-
Constructor Details
-
LabelWithEditClass
Creates a new transformation that will use the given catalog of edit classes to relabelartifact
nodes.- Parameters:
editClasses
- Catalog of edit classes to match on artifact nodes.
-
-
Method Details
-
transform
Description copied from interface:VariationDiffTransformer
Apply a transformation to the given VariationDiff inplace. The given tree will be changed.- Specified by:
transform
in interfaceVariationDiffTransformer<DiffLinesLabel>
- Parameters:
variationDiff
- The VariationDiff to transform.
-
getDependencies
Description copied from interface:VariationDiffTransformer
Returns a list of dependencies to other transformers. A transformer should only be run, if another transformation with the respective type was run for each type on the dependencies.- Specified by:
getDependencies
in interfaceVariationDiffTransformer<DiffLinesLabel>
- Returns:
- List of types of which instances should be run before applying this transformation.
-