org.refactoringminer.astDiff.matchers.TreeMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refactoring-miner Show documentation
Show all versions of refactoring-miner Show documentation
RefactoringMiner is a library/API written in Java that can detect refactorings applied in the history of a Java project.
package org.refactoringminer.astDiff.matchers;
import com.github.gumtreediff.tree.Tree;
import org.refactoringminer.astDiff.models.ExtendedMultiMappingStore;
/**
* @author Pourya Alikhani Fard [email protected]
*/
public interface TreeMatcher {
void match(Tree src, Tree dst, ExtendedMultiMappingStore mappingStore);
default ExtendedMultiMappingStore matchAndMake(Tree srcTree, Tree dstTree) {
ExtendedMultiMappingStore mappingStore = new ExtendedMultiMappingStore(srcTree, dstTree);
match(srcTree, dstTree, mappingStore);
return mappingStore;
}
}