Package io.codemodder.javaparser
Class JavaParserChanger
java.lang.Object
io.codemodder.javaparser.JavaParserChanger
- All Implemented Interfaces:
CodeChanger
- Direct Known Subclasses:
CompositeJavaParserChanger,SarifPluginJavaParserChanger
Uses JavaParser to change Java source files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionA deep description of what this codemod's changes.A list of paths patterns requested or rejected by the codemod.getIndividualChangeDescription(Path filePath, CodemodChange change) A description of an individual change made by this codemod.List<io.codemodder.codetf.CodeTFReference>A list of references for further reading on the issues this codemod addresses or other supplementary information.The headline for this codemod's changes.booleanA predicate which dictates if the file should be inspected by the codemod.abstract CodemodFileScanningResultvisit(CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu) Called when a Java file, which has already been parsed into a compilation unit, is seen.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.codemodder.CodeChanger
shouldRun
-
Field Details
-
reporter
-
-
Constructor Details
-
JavaParserChanger
public JavaParserChanger() -
JavaParserChanger
-
-
Method Details
-
visit
public abstract CodemodFileScanningResult visit(CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu) Called when a Java file, which has already been parsed into a compilation unit, is seen. -
getSummary
Description copied from interface:CodeChangerThe headline for this codemod's changes.- Specified by:
getSummaryin interfaceCodeChanger
-
getDescription
Description copied from interface:CodeChangerA deep description of what this codemod's changes.- Specified by:
getDescriptionin interfaceCodeChanger
-
getIndividualChangeDescription
Description copied from interface:CodeChangerA description of an individual change made by this codemod.- Specified by:
getIndividualChangeDescriptionin interfaceCodeChanger
-
getIncludesExcludesPattern
Description copied from interface:CodeChangerA list of paths patterns requested or rejected by the codemod. Those patterns are treated as relative to the repository root. These patterns should follow thePathMatcherspecification. These patterns can be overridden by global patterns.- Specified by:
getIncludesExcludesPatternin interfaceCodeChanger
-
supports
Description copied from interface:CodeChangerA predicate which dictates if the file should be inspected by the codemod. This cannot be overridden and should always pass before executing the codemod.- Specified by:
supportsin interfaceCodeChanger
-
getReferences
Description copied from interface:CodeChangerA list of references for further reading on the issues this codemod addresses or other supplementary information.- Specified by:
getReferencesin interfaceCodeChanger
-