Interface ImportStatementParser
-
public interface ImportStatementParserFor parsing a source file into aParsedFile.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ImportStatementParserforCharset(Charset charset, boolean parseFullCompilationUnit)Constructs a default instance of the parser which uses the provided charset.ParsedFileparse(Path sourceFilePath)Parses the given source file using the givenLanguageSupportimplementation to recognize import statements.
-
-
-
Method Detail
-
forCharset
static ImportStatementParser forCharset(Charset charset, boolean parseFullCompilationUnit)
Constructs a default instance of the parser which uses the provided charset.- Parameters:
charset- The charset to use.parseFullCompilationUnit- If supported, use full compilation unit parsing. Otherwise fall back to the original line based parsing.- Returns:
- The parser instance.
-
parse
ParsedFile parse(Path sourceFilePath)
Parses the given source file using the givenLanguageSupportimplementation to recognize import statements.- Parameters:
sourceFilePath- The path of the file to parse.- Returns:
- The parsed file.
-
-