Class AbstractCompiler

java.lang.Object
com.google.javascript.jscomp.AbstractCompiler
All Implemented Interfaces:
SourceExcerptProvider
Direct Known Subclasses:
Compiler

public abstract class AbstractCompiler extends Object implements SourceExcerptProvider
An abstract compiler, to help remove the circular dependency of passes on JSCompiler. This is an abstract class, so that we can make the methods package-private.
  • Constructor Details

    • AbstractCompiler

      public AbstractCompiler()
  • Method Details

    • getInput

      public abstract CompilerInput getInput(InputId inputId)
      Looks up an input (possibly an externs input) by input id. May return null.
    • getTypeRegistry

      public abstract JSTypeRegistry getTypeRegistry()
      Gets a central registry of type information from the compiled JS.
    • getTopScope

      public abstract Scope getTopScope()
      Gets the top scope.
    • report

      public abstract void report(JSError error)
      Report an error or warning.
    • getCodingConvention

      public abstract CodingConvention getCodingConvention()
      Gets the current coding convention.
    • reportCodeChange

      public abstract void reportCodeChange()
      Report code changes.
    • getReverseAbstractInterpreter

      public abstract ReverseAbstractInterpreter getReverseAbstractInterpreter()
      Get an interpreter for type analysis.
    • getErrorManager

      public abstract ErrorManager getErrorManager()
      Gets the error manager.
    • getProgress

      public abstract double getProgress()
      Returns:
      a number in [0,1] range indicating an approximate progress of the last compile. Note this should only be used as a hint and no assumptions should be made on accuracy, even a completed compile may choose not to set this to 1.0 at the end.