gr.uom.java.xmi.diff.PushDownOperationRefactoring 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 gr.uom.java.xmi.diff;
import java.util.ArrayList;
import java.util.List;
import org.refactoringminer.api.RefactoringType;
import gr.uom.java.xmi.UMLOperation;
import gr.uom.java.xmi.decomposition.UMLOperationBodyMapper;
public class PushDownOperationRefactoring extends MoveOperationRefactoring {
public PushDownOperationRefactoring(UMLOperationBodyMapper bodyMapper) {
super(bodyMapper);
}
public PushDownOperationRefactoring(UMLOperation originalOperation, UMLOperation movedOperation) {
super(originalOperation, movedOperation);
}
public RefactoringType getRefactoringType() {
return RefactoringType.PUSH_DOWN_OPERATION;
}
@Override
public List rightSide() {
List ranges = new ArrayList();
ranges.add(movedOperation.codeRange()
.setDescription("pushed down method declaration")
.setCodeElement(movedOperation.toString()));
return ranges;
}
}