Package io.codemodder.javaparser
Interface JavaParserFacade
public interface JavaParserFacade
Responsible for parsing Java files and maintaining the compilation units across different
accesses.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JavaParserFacade
from
(javax.inject.Provider<com.github.javaparser.JavaParser> parser) Return a simple implementation of theJavaParserFacade
interface.com.github.javaparser.ast.CompilationUnit
parseJavaFile
(Path file) Return theCompilationUnit
for the given Java file.
-
Method Details
-
parseJavaFile
Return theCompilationUnit
for the given Java file. If the given file has not been seen before, it will be cached and all future invocations will return the sameCompilationUnit
.- Parameters:
file
- a Java file path- Returns:
- a
CompilationUnit
for the given file - Throws:
IOException
- if the file cannot be read
-
from
Return a simple implementation of theJavaParserFacade
interface.
-