The Refactoring Toolkit offers a comprehensive set of optimization features designed to improve code quality, maintainability, and efficiency. These tools automatically identify and apply enhancements, such as optimizing conditional logic, eliminating redundancies and refining structural elements of the codebase.
By adhering to established best practices such as SonarQube quality guidelines, the toolkit ensures consistent and reliable code transformations across all development projects. Below is a list of built-in refactorings available in the toolkit, each addressing specific optimization needs:
In the Refactor.java class, you are required to import the built-in classes. This can be accomplished as follows:
import com.netfective.bluage.reverse.gapwalk.refactoring.java.api.builtins.*;
Subsequently, you will have the capability to use any built-in class within the getRefactorings() method. In the following example we will use the built-in MQConstantsRefactoring:
public static List<Supplier<? extends IGapwalkRefactoring>> getRefactorings() {
List<Supplier<? extends IGapwalkRefactoring>> refactorings = new ArrayList<>();
refactorings.add(() -> new MQConstantsRefactoring());
return refactorings;
}