Package io.codemodder

Class CompositeJavaParserChanger

java.lang.Object
io.codemodder.javaparser.JavaParserChanger
io.codemodder.CompositeJavaParserChanger
All Implemented Interfaces:
CodeChanger

public abstract class CompositeJavaParserChanger extends JavaParserChanger
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().

  • Constructor Details

  • Method Details

    • visit

      public List<CodemodChange> visit(CodemodInvocationContext context, com.github.javaparser.ast.CompilationUnit cu)
      Description copied from class: JavaParserChanger
      Called when a Java file, which has already been parsed into a compilation unit, is seen.
      Specified by:
      visit in class JavaParserChanger
    • shouldRun

      public boolean shouldRun()
      Description copied from interface: CodeChanger
      A lifecycle event that is called before any files are processed. This is a good place to short circuit if you don't have the necessary resources (e.g., SARIF).