Package io.codemodder
Class Runner
java.lang.Object
io.codemodder.Runner
Provides an entrypoint for CLIs built with the codemodder framework.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
run
(List<Class<? extends CodeChanger>> codemods, String[] args) Runs the given codemods with CLI arguments you get from a main() method.static int
run
(List<Class<? extends CodeChanger>> codemods, String[] args, PrintWriter stdout, PrintWriter stderr) Runs the codemods with a set of customized streams.
-
Constructor Details
-
Runner
public Runner()
-
-
Method Details
-
run
public static int run(List<Class<? extends CodeChanger>> codemods, String[] args, PrintWriter stdout, PrintWriter stderr) Runs the codemods with a set of customized streams.- Parameters:
codemods
- the codemods to runargs
- the arguments to pass to the codemod runnerstdout
- alternate stdout to use, ornull
to use the defaultstderr
- alternate stderr to use, ornull
to use the default- Returns:
- the exit code of the codemodder CLI
-
run
Runs the given codemods with CLI arguments you get from a main() method. This is the most like entry point you want to use.
-