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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract CodingConventionGets the current coding convention.abstract ErrorManagerGets the error manager.abstract CompilerInputLooks up an input (possibly an externs input) by input id.abstract doubleabstract ReverseAbstractInterpreterGet an interpreter for type analysis.abstract ScopeGets the top scope.abstract JSTypeRegistryGets a central registry of type information from the compiled JS.abstract voidReport an error or warning.abstract voidReport code changes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.
-