Interface ImportStatementParser


  • public interface ImportStatementParser
    For parsing a source file into a ParsedFile.
    • 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 given LanguageSupport implementation to recognize import statements.
        Parameters:
        sourceFilePath - The path of the file to parse.
        Returns:
        The parsed file.