Package io.codemodder.remediation
Class SearcherStrategyRemediator<T>
java.lang.Object
io.codemodder.remediation.SearcherStrategyRemediator<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
Remediator<T>
Remediates issues with pairs of searchers and strategies. Searchers will associate an issue with
a node from the AST, while a strategy will try to fix an issue.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SearcherStrategyRemediator
(Map<FixCandidateSearcher<T>, RemediationStrategy> searcherRemediatorMap) -
Method Summary
Modifier and TypeMethodDescriptionremediateAll
(com.github.javaparser.ast.CompilationUnit cu, String path, io.codemodder.codetf.DetectorRule detectorRule, Collection<T> findingsForPath, Function<T, String> findingIdExtractor, Function<T, Integer> findingStartLineExtractor, Function<T, Optional<Integer>> findingEndLineExtractor, Function<T, Optional<Integer>> findingStartColumnExtractor) Performs the work of performing all remediation, and returning reporting metadata.
-
Constructor Details
-
SearcherStrategyRemediator
protected SearcherStrategyRemediator(Map<FixCandidateSearcher<T>, RemediationStrategy> searcherRemediatorMap)
-
-
Method Details
-
remediateAll
public CodemodFileScanningResult remediateAll(com.github.javaparser.ast.CompilationUnit cu, String path, io.codemodder.codetf.DetectorRule detectorRule, Collection<T> findingsForPath, Function<T, String> findingIdExtractor, Function<T, Integer> findingStartLineExtractor, Function<T, Optional<Integer>> findingEndLineExtractor, Function<T, Optional<Integer>> findingStartColumnExtractor) Description copied from interface:Remediator
Performs the work of performing all remediation, and returning reporting metadata.- Specified by:
remediateAll
in interfaceRemediator<T>
-