Class JavacParser

java.lang.Object
com.google.j2cl.transpiler.frontend.javac.JavacParser

public class JavacParser extends Object
A delegator of Javac ASTParser that provides a more convenient interface for parsing source files into compilation unit.
  • Constructor Summary

    Constructors
    Constructor
    Description
    JavacParser(List<String> classpathEntries, com.google.j2cl.common.Problems problems)
    Create and initialize a JavacParser based on passed parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.google.j2cl.transpiler.ast.CompilationUnit>
    parseFiles(List<com.google.j2cl.common.SourceUtils.FileInfo> filePaths, boolean useTargetPath, com.google.common.collect.ImmutableList<String> forbiddenAnnotations)
    Returns a map from file paths to compilation units after Javac parsing.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JavacParser

      public JavacParser(List<String> classpathEntries, com.google.j2cl.common.Problems problems)
      Create and initialize a JavacParser based on passed parameters.
  • Method Details

    • parseFiles

      @Nullable public List<com.google.j2cl.transpiler.ast.CompilationUnit> parseFiles(List<com.google.j2cl.common.SourceUtils.FileInfo> filePaths, boolean useTargetPath, com.google.common.collect.ImmutableList<String> forbiddenAnnotations)
      Returns a map from file paths to compilation units after Javac parsing.