Package io.codemodder
Class CompositeJavaParserChanger
java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.CompositeJavaParserChanger
- All Implemented Interfaces:
CodeChanger
A type that allows composing multiple
JavaParserChanger instances are under the same
umbrella.
For instance, you might want to have multiple changers, each with their own SARIF collection,
all be reported under the same Codemod.id().
-
Field Summary
Fields inherited from class io.codemodder.javaparser.JavaParserChanger
reporter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompositeJavaParserChanger(CodemodReporterStrategy reporterStrategy, JavaParserChanger... changers) protectedCompositeJavaParserChanger(JavaParserChanger... changers) -
Method Summary
Modifier and TypeMethodDescriptionA list of paths patterns requested or rejected by the codemod.booleanA predicate which dictates if the file should be inspected by the codemod.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.Methods inherited from class io.codemodder.javaparser.JavaParserChanger
getDescription, getIndividualChangeDescription, getReferences, getSummaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.codemodder.CodeChanger
shouldRun
-
Constructor Details
-
CompositeJavaParserChanger
protected CompositeJavaParserChanger(CodemodReporterStrategy reporterStrategy, JavaParserChanger... changers) -
CompositeJavaParserChanger
-
-
Method Details
-
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- Overrides:
getIncludesExcludesPatternin classJavaParserChanger
-
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- Overrides:
supportsin classJavaParserChanger
-
visit
public CodemodFileScanningResult visit(CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu) Description copied from class:JavaParserChangerCalled when a Java file, which has already been parsed into a compilation unit, is seen.- Specified by:
visitin classJavaParserChanger
-