Class AbstractCompilationUnitBuilder

java.lang.Object
com.google.j2cl.transpiler.frontend.common.AbstractCompilationUnitBuilder

public abstract class AbstractCompilationUnitBuilder extends Object
Base class for implementing that AST conversion from different front ends.
  • Constructor Details

    • AbstractCompilationUnitBuilder

      public AbstractCompilationUnitBuilder()
  • Method Details

    • getCurrentSourceFile

      protected String getCurrentSourceFile()
    • setCurrentSourceFile

      protected void setCurrentSourceFile(String currentSourceFile)
    • getCurrentCompilationUnit

      protected com.google.j2cl.transpiler.ast.CompilationUnit getCurrentCompilationUnit()
    • setCurrentCompilationUnit

      protected void setCurrentCompilationUnit(com.google.j2cl.transpiler.ast.CompilationUnit currentCompilationUnit)
    • processEnclosedBy

      protected <T> T processEnclosedBy(com.google.j2cl.transpiler.ast.Type type, Supplier<T> supplier)
      Invoke supplier with type in the type stack.
    • getCurrentType

      protected com.google.j2cl.transpiler.ast.Type getCurrentType()
      Returns the current type.
    • toResource

      protected static com.google.j2cl.transpiler.ast.VariableDeclarationExpression toResource(com.google.j2cl.transpiler.ast.Expression expression)
      Creates temporary variables for a resource that is declared outside of the try-catch statement.
    • internalCompilerError

      @FormatMethod protected Error internalCompilerError(Throwable e, String format, Object... params)
    • internalCompilerError

      @FormatMethod protected Error internalCompilerError(String format, Object... params)
    • internalCompilerErrorMessage

      @FormatMethod protected String internalCompilerErrorMessage(String format, Object... params)