Package io.codemodder.javaparser
Class JavaParserCodemodRunner
java.lang.Object
io.codemodder.javaparser.JavaParserCodemodRunner
- All Implemented Interfaces:
CodemodRunner
This type specializes in non-Java file.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaParserCodemodRunner(CachingJavaParser parser, JavaParserChanger javaParserChanger, EncodingDetector encodingDetector) -
Method Summary
Modifier and TypeMethodDescriptionrun(CodemodInvocationContext context) Run the codemod on a single file.booleanThePredicatethat determines if this runner supports the given file.
-
Constructor Details
-
JavaParserCodemodRunner
public JavaParserCodemodRunner(CachingJavaParser parser, JavaParserChanger javaParserChanger, EncodingDetector encodingDetector)
-
-
Method Details
-
supports
Description copied from interface:CodemodRunnerThePredicatethat determines if this runner supports the given file.- Specified by:
supportsin interfaceCodemodRunner
-
run
Description copied from interface:CodemodRunnerRun the codemod on a single file.- Specified by:
runin interfaceCodemodRunner- Parameters:
context- the context for the codemod invocation- Returns:
- an
Optionalrepresenting the file "before and after" the codemod - Throws:
IOException- if there is an error reading or writing the file
-