Package com.google.javascript.jscomp
Class AbstractCompiler
java.lang.Object
com.google.javascript.jscomp.AbstractCompiler
- All Implemented Interfaces:
SourceExcerptProvider
- Direct Known Subclasses:
Compiler
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.javascript.jscomp.SourceExcerptProvider
SourceExcerptProvider.ExcerptFormatter, SourceExcerptProvider.SourceExcerpt
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract CodingConvention
Gets the current coding convention.abstract ErrorManager
Gets the error manager.abstract CompilerInput
Looks up an input (possibly an externs input) by input id.abstract double
abstract ReverseAbstractInterpreter
Get an interpreter for type analysis.abstract Scope
Gets the top scope.abstract JSTypeRegistry
Gets a central registry of type information from the compiled JS.abstract void
Report an error or warning.abstract void
Report code changes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.javascript.jscomp.SourceExcerptProvider
getSourceLine, getSourceRegion
-
Constructor Details
-
AbstractCompiler
public AbstractCompiler()
-
-
Method Details
-
getInput
Looks up an input (possibly an externs input) by input id. May return null. -
getTypeRegistry
Gets a central registry of type information from the compiled JS. -
getTopScope
Gets the top scope. -
report
Report an error or warning. -
getCodingConvention
Gets the current coding convention. -
reportCodeChange
public abstract void reportCodeChange()Report code changes. -
getReverseAbstractInterpreter
Get an interpreter for type analysis. -
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.
-