Class LabelWithEditClass
java.lang.Object
org.variantsync.diffdetective.variation.diff.transform.LabelWithEditClass
- All Implemented Interfaces:
Transformer<VariationDiff<DiffLinesLabel>>
public class LabelWithEditClass
extends Object
implements Transformer<VariationDiff<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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLabelWithEditClass(EditClassCatalogue editClasses) Creates a new transformation that will use the given catalog of edit classes to relabelartifactnodes. -
Method Summary
Modifier and TypeMethodDescriptionList<Class<? extends Transformer<VariationDiff<DiffLinesLabel>>>> Returns a list of dependencies to other transformers.voidtransform(VariationDiff<DiffLinesLabel> variationDiff) Apply a transformation to the given Object inplace.
-
Field Details
-
relabelNodes
-
-
Constructor Details
-
LabelWithEditClass
Creates a new transformation that will use the given catalog of edit classes to relabelartifactnodes.- Parameters:
editClasses- Catalog of edit classes to match on artifact nodes.
-
-
Method Details
-
transform
Description copied from interface:TransformerApply a transformation to the given Object inplace. The object will be changed.- Specified by:
transformin interfaceTransformer<VariationDiff<DiffLinesLabel>>- Parameters:
variationDiff- The T object to transform.
-
getDependencies
Description copied from interface:TransformerReturns 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:
getDependenciesin interfaceTransformer<VariationDiff<DiffLinesLabel>>- Returns:
- List of types of which instances should be run before applying this transformation.
-