# All Classes and Interfaces

Class
Description
AbstractCompiler
An abstract compiler, to help remove the circular dependency of passes on JSCompiler.
AbstractMessageFormatter
Abstract message formatter providing default behavior for implementations of `MessageFormatter` needing a `SourceExcerptProvider`.
AbstractStaticScope<T>
A scope that just returns null for everything.
AbstractWebServiceException
All the exceptions that can be returned as error to the client of the API.
AdjacencyGraph<N,E>
A minimal graph interface.
AllType
All type, representing all values.
Annotatable
Object that has an annotation.
Annotation
Information that can be annotated to a `GraphNode` or `Graph.GraphEdge`.
AnonymousFunctionNamingPolicy
Strategies for how to do naming of anonymous functions that occur as r-values in assignments and variable declarations.
AntErrorManager
An error manager that pipes warnings and errors properly into the Ant task infrastructure.
Asserts
Helper methods for making assertions about the validity of types.
AstValidator
This class walks the AST and validates that the structure is correct.
AstValidator.ViolationHandler
Base64
A utility class for working with Base64 values.
BaseJSTypeTestCase
BasicErrorManager
A basic error manager that sorts all errors and warnings reported to it to generate a sorted report when the `BasicErrorManager.generateReport()` method is called.
BooleanLiteralSet
A set in the domain {true,false}.
BooleanType
Boolean type.
ByPathWarningsGuard
An implementation of a `WarningsGuard` that can modify the `CheckLevel` based on the file that caused the warning, and whether this file matches a set of paths (specified either as include or exclude of path name parts).
CallGraph
A pass the uses a `DefinitionProvider` to compute a call graph for an AST.
CaseCanonicalize
Implements the ECMAScript 5 Canonicalize operation used to specify how case-insensitive regular expressions match.
ChainableReverseAbstractInterpreter
Chainable reverse abstract interpreter providing basic functionality.
CheckLevel
Controls checking levels of certain options.
CheckLevelLegacy
Enum used in flags to control the behavior of JS compiler checks.
ClosureCodingConvention
This describes the Closure-specific JavaScript coding conventions.
ClosureCodingConvention.AssertInstanceofSpec
A function that will throw an exception when if the value is not an instanceof a specific type.
ClosureReverseAbstractInterpreter
A reverse abstract interpreter (RAI) for specific closure patterns such as `goog.isDef`.
CodingConvention
CodingConvention defines a set of hooks to customize the behavior of the Compiler for a specific team/company.
CodingConvention.AssertionFunctionSpec
A function that will throw an exception when either: -One or more of its parameters evaluate to false.
CodingConvention.Bind
CodingConvention.DelegateRelationship
Delegates provides a mechanism and structure for identifying where classes can call out to optional code to augment their functionality.
CodingConvention.ObjectLiteralCast
An object literal cast provides a mechanism to cast object literals to other types without a warning.
CodingConvention.SubclassRelationship
CodingConvention.SubclassType
CodingConventions
Helper classes for dealing with coding conventions.
CodingConventions.Proxy
A convention that wraps another.
CommandLineRunner
CommandLineRunner translates flags into Java API calls on the Compiler.
CompilationLevel
A CompilationLevel represents the level of optimization that should be applied when compiling JavaScript code.
Compiler
Compiler (and the other classes in this package) does the following: parses JS code checks for undefined variables performs optimizations such as constant folding and constants inlining renames variables (to short names) outputs compact JavaScript code External variables are declared in 'externs' files.
Compiler.CodeBuilder
Stores a buffer of text to which more can be appended.
Compiler.IntermediateState
Stores the internal compiler state just before optimization is performed.
CompilerInput
A class for the internal representation of an input to the compiler.
CompilerOptions
Compiler options
CompilerOptions.AliasTransformation
A Role Specific Interface for the JS Compiler to report aliases used to change the code during a compile.
CompilerOptions.AliasTransformationHandler
A Role Specific Interface for JS Compiler that represents a data holder object which is used to store goog.scope alias code changes to code made during a compile.
CompilerOptions.LanguageMode
When to do the extra sanity checks
CompilerOptions.Reach
CompilerOptions.TracerMode
CompilerOptions.TweakProcessing
CompilerPass
Interface for classes that can compile JS.
CompileTask
This class implements a simple Ant task to do almost the same as CommandLineRunner.
ComposeWarningsGuard
WarningsGuard that represents just a chain of other guards.
Config
Configuration for the AST factory.
Config.LanguageMode
CssRenamingMap
Interface used by `ReplaceCssNames` to substitute CSS class names.
CssRenamingMap.ByPart
CssRenamingMap.ByWhole
CssRenamingMap.Style
CustomPassExecutionTime
Custom pass type.
DefaultPassConfig
Pass factories and meta-data for native JSCompiler passes.
DependencyInfo
A data structure for JS dependency information for a single .js file.
DependencyOptions
Options for how to manage dependencies between input files.
DepsFileParser
A parser that can extract dependency information from existing deps.js files.
DepsGenerator
Generates deps.js files by scanning JavaScript files for calls to goog.provide(), goog.require() and goog.addDependency().
DepsGenerator.InclusionStrategy
DiagnosticGroup
Group a set of related diagnostic types together, so that they can be toggled on and off as one unit.
DiagnosticGroups
Named groups of DiagnosticTypes exposed by Compiler.
DiagnosticGroupWarningsGuard
Sets the level for a particular DiagnosticGroup.
DiagnosticType
The type of a compile or analysis error.
DiGraph<N,E>
A generic directed graph.
DiGraph.DiGraphEdge<N,E>
A generic directed graph edge.
DiGraph.DiGraphNode<N,E>
A generic directed graph node.
DotFormatter
DotFormatter prints out a dot file of the Abstract Syntax Tree.
EmptyMessageBundle
An implementation of MessageBundle that has no translations.
EnumElementType
The type of individual elements of an enum type (see `EnumType`).
EnumType
An enum type representing a branded collection of elements.
ErrorCode
Enum of all the possible error described in the Web Service protocol.
ErrorFormat
Error formats available.
ErrorHandler
The error handler is any generic sink for warnings and errors, after they've passed through any filtering `WarningsGuard`s.
ErrorLevel
Represents possible error levels for JsonML errors.
ErrorManager
The error manager is in charge of storing, organizing and displaying errors and warnings generated by the compiler.
ErrorReporter
This is interface defines a protocol for the reporting of errors during JavaScript translation or execution.
FieldCleanupPass
A CleanupPass implementation that will remove all field declarations on JSTypes contributed by the original file.
FilePosition
Represents a position in a source file.
FindExportableNodes
Records all of the symbols and properties that should be exported.
FindExportableNodes.GenerateNodeContext
Context holding the node references required for generating the export calls.
FixedPointGraphTraversal<N,E>
A utility class for doing fixed-point computations.
FixedPointGraphTraversal.EdgeCallback<Node,Edge>
FlowScope
A symbol table for inferring types during data flow analysis.
FunctionBuilder
A builder class for function and arrow types.
FunctionInfo
FunctionInformationMap
Protobuf type `jscomp.FunctionInformationMap`
FunctionInformationMap.Builder
Protobuf type `jscomp.FunctionInformationMap`
FunctionInformationMap.Entry
Protobuf type `jscomp.FunctionInformationMap.Entry`
FunctionInformationMap.Entry.Builder
Protobuf type `jscomp.FunctionInformationMap.Entry`
FunctionInformationMap.EntryOrBuilder
FunctionInformationMap.Module
Protobuf type `jscomp.FunctionInformationMap.Module`
FunctionInformationMap.Module.Builder
Protobuf type `jscomp.FunctionInformationMap.Module`
FunctionInformationMap.ModuleOrBuilder
FunctionInformationMapOrBuilder
FunctionParamBuilder
A builder for the Rhino Node representing Function parameters.
FunctionType
This derived type provides extended information about a function, including its return type and argument types.
GoogleCodingConvention
This describes the Google-specific JavaScript coding conventions.
GoogleJsMessageIdGenerator
An `JsMessage.IdGenerator` designed to play nicely with Google's Translation systems.
Graph<N,E>
The base generic class for graph-like data structure and algorithms in the compiler.
Graph.GraphEdge<N,E>
A generic edge.
GraphColoring<N,E>
Annotates the graph with a color in a way that no connected node will have the same color.
GraphColoring.Color
GraphColoring.GreedyGraphColoring<N,E>
Greedily assign nodes with high degree unique colors.
GraphNode<N,E>
A generic node.
GraphPruner<N,E>
Prunes a graph, creating a new graph with nodes removed.
GraphReachability<N,E>
Computes all the reachable nodes.
GraphReachability.EdgeTuple<N,E>
Represents Source Node, Edge and Destination Node.
GraphvizGraph
A graph that can be dumped to a Graphviz DOT file.
GraphvizGraph.GraphvizEdge
A Graphviz edge.
GraphvizGraph.GraphvizNode
A Graphviz node.
HotSwapCompilerPass
Interface for compiler passes that can be used in a hot-swap fashion.
InlineProperties
InlineProperties attempts to find references to properties that are known to be constants and inline the known value.
InputId
An id used uniquely identify a CompilerInput
Instrumentation
Protobuf type `jscomp.Instrumentation`
Instrumentation.Builder
Protobuf type `jscomp.Instrumentation`
InstrumentationOrBuilder
InstrumentationTemplate
IR
An AST construction helper class
JqueryCodingConvention
This describes the jQuery specific JavaScript coding conventions.
JsAst
Generates an AST for a JavaScript source file.
JSDocInfo
JSDoc information describing JavaScript code.
JSDocInfo.Marker
Defines a class for containing the parsing information for this JSDocInfo.
JSDocInfo.NamePosition
A piece of information (found in a marker) which contains a position with a name node.
JSDocInfo.StringPosition
A piece of information (found in a marker) which contains a position with a string.
JSDocInfo.TypePosition
A piece of information (found in a marker) which contains a position with a type expression syntax tree.
JSDocInfo.Visibility
Visibility categories.
JSDocInfoBuilder
A builder for `JSDocInfo` objects.
JsDocInfoParser
A parser for JSDoc comments.
JSError
Compile error description
JsFileLineParser
Base class for classes that parse JavaScript sources on a line-by-line basis.
JsFileParser
A parser that can extract goog.require() and goog.provide() dependency information from a .js file.
JsFunctionParser
A parser that can extract dependency information from a .js file.
JsFunctionParser.SymbolInfo
JsMessage
A representation of a translatable message in JavaScript source code.
JsMessage.Builder
Contains functionality for creating JS messages.
JsMessage.IdGenerator
JsMessage.PlaceholderReference
A reference to a placeholder in a translatable message.
JsMessage.Style
Message style that could be used for JS code parsing.
JsMessageExtractor
Extracts messages and message comments from JS code.
JSModule
A JavaScript module has a unique name, consists of a list of compiler inputs, and can depend on other modules.
JSModuleGraph
A `JSModule` dependency graph that assigns a depth to each module and can answer depth-related queries about them.
JSModuleGraph.MissingModuleException
JSModuleGraph.ModuleDependenceException
JsonML
Class which represents JsonML element according to the specification at "http://code.google.com/p/es-lab/wiki/JsonMLASTFormat"
JsonMLAst
Generates an AST from a JsonML source file.
JsonMLError
Class used to represent errors which correspond to JsonML elements.
JsonMLUtil
JsonMLUtil contains utilities for the JsonML object.
JSSourceFile
Deprecated.
JSSourceFile is an empty wrapper around SourceFile.
JSType
Represents JavaScript value types.
JSType.TypePair
JSTypeExpression
Represents a type expression as a miniature Rhino AST, so that the type expression can be evaluated later.
JSTypeNative
Constants corresponding to types that are built into a JavaScript engine and other types that occur very often in the type system.
JSTypeRegistry
The type registry is used to resolve named types.
JSTypeRegistry.ResolveMode
The type registry has three modes, which control how type ASTs are converted to types in `JSTypeRegistry.createFromTypeNodes(com.google.javascript.rhino.Node, java.lang.String, com.google.javascript.rhino.jstype.StaticScope<com.google.javascript.rhino.jstype.JSType>)`.
LatticeElement
A lattice element.
LightweightMessageFormatter
Lightweight message formatter.
LinkedDirectedGraph<N,E>
A directed graph using linked list within nodes to store edge information.
LinkedUndirectedGraph<N,E>
An undirected graph using linked list within nodes to store edge information.
LoggerErrorManager
An error manager that logs errors and warnings using a logger in addition to collecting them in memory.
MapBasedScope
A scope based on a simple hashmap.
Mapping
Mapping.LineMapping
Maps a position on a given line to the mapping describing the original code.
Mapping.LineMapping.Builder
Maps a position on a given line to the mapping describing the original code.
Mapping.LineMappingOrBuilder
Mapping.OriginalMapping
Protobuf type `sourcemap.OriginalMapping`
Mapping.OriginalMapping.Builder
Protobuf type `sourcemap.OriginalMapping`
Mapping.OriginalMappingOrBuilder
MessageBundle
An interface for providing alternative values for user-visible messages in JavaScript code.
MessageFormatter
Format warnings and errors.
ModificationVisitor
A visitor implementation that enables type substitutions.
Node
This class implements the root of the intermediate representation.
Node.AncestorIterable
Iterator to go up the ancestor tree.
Node.SideEffectFlags
A helper class for getting and setting the side-effect flags.
NodeTraversal
NodeTraversal allows an iteration through the nodes in the parse tree, and facilitates the optimizations on the parse tree.
NodeTraversal.AbstractNodeTypePruningCallback
Abstract callback to visit a pruned set of nodes.
NodeTraversal.AbstractPostOrderCallback
Abstract callback to visit all nodes in post order.
NodeTraversal.AbstractScopedCallback
Abstract scoped callback to visit all nodes in post order.
NodeTraversal.AbstractShallowCallback
Abstract callback to visit all nodes but not traverse into function bodies.
NodeTraversal.AbstractShallowStatementCallback
Abstract callback to visit all structure and statement nodes but doesn't traverse into functions or expressions.
NodeTraversal.Callback
Callback
NodeTraversal.ScopedCallback
Callback that also knows about scope changes
NodeUtil
NodeUtil contains generally useful AST utilities.
NoObjectType
The bottom Object type, representing the subclass of all objects.
NoType
Bottom type, representing the subclass of any value or object.
NullErrorReporter
An error reporter which consumes all calls and performs no actions.
NullType
Null type.
NumberType
Number type.
ObjectPropertyStringPreprocess
Rewrites `new goog.testing.ObjectPropertyString(foo, 'bar')` to `new JSCompiler_ObjectPropertyString(window, foo.bar)`.
ObjectType
Object type.
ParserRunner
ParserRunner.ParseResult
Holds results of parsing.
PassConfig
Pass factories and meta-data for native Compiler passes.
PassConfig.State
Intermediate state for a running pass configuration.
PassFactory
A factory for creating JSCompiler passes based on the Options injected.
PathUtil
Utility methods for manipulation of UNIX-like paths.
PeepholeCollectPropertyAssignments
A pass that looks for assignments to properties of an object or array immediately following its creation using the abbreviated syntax.
PerformanceTracker
PerformanceTracker.Stats
For each pass, keep track of the runtime, the size changes, etc
PrintStreamErrorManager
An error manager that prints errors and warnings to the print stream provided in addition to the functionality of the `BasicErrorManager`.
ProcessCommonJSModules
Rewrites a CommonJS module http://wiki.commonjs.org/wiki/Modules/1.1.1 into a form that can be safely concatenated.
Property
A property slot of an object.
PropertyRenamingPolicy
Policies to determine how properties should be renamed.
Protocol
All the strings used by the webservice protocol.
Protocol.ApiKeyResponse
Fields in the JSON response from the ApiKeyGenerationServlet.
Protocol.CompilationLevelKey
Protocol.FormattingKey
All the possible values for the FORMATTING key.
Protocol.OutputFormatKey
Protocol.OutputInfoKey
All the possible values for the OUTPUT_INFO key.
Protocol.ProtocolEnum
All enums that need to be shared between the Java and JS code should implement this interface.
Protocol.RequestKey
All the keys that can be part of the http request.
Protocol.ResponseTag
All the xml/json tags that can be returned by the backend if xml or json is selected as the output mode.
Protocol.WarningLevelKey
Reader
Traverse JsonML source tree and generates AST.
RecordTypeBuilder
A builder for record types.
RegExpTree
An AST for JavaScript regular expressions.
Region
Source code region.
Result
Compilation results
ReverseAbstractInterpreter
This interface defines what reversed abstract interpreters provide.
Scope
Scope contains information about a variable scope in JavaScript.
Scope.Arguments
A special subclass of Var used to distinguish "arguments" in the current scope.
Scope.Var
Stores info about a variable
ScriptRuntime
This is the class that implements the run-time.
SecureCompiler
Compilation of JavaScript code which guarantees that all security capabilities are preserved after the process.
SemanticReverseAbstractInterpreter
A reverse abstract interpreter using the semantics of the JavaScript language as a means to reverse interpret computations.
ShowByPathWarningsGuard
Control whether warnings should be restricted or suppressed for specified paths.
ShowByPathWarningsGuard.ShowType
Controls whether warnings should be restricted to a specified path or suppressed within the specified path.
SimpleDependencyInfo
A class to hold JS dependency information for a single .js file.
SimpleErrorReporter
A simple `ErrorReporter` that collects warnings and errors and makes them accessible via `SimpleErrorReporter.errors()` and `SimpleErrorReporter.warnings()`.
SimpleReference<T>
A simple immutable reference.
SimpleRegion
Simple region.
SimpleSlot
The minimum implementation of StaticSlot<JSType>.
SimpleSourceExcerptProvider
A simple source excerpt provider for testing.
SimpleSourceFile
A simple implementation of `StaticSourceFile` for testing.
SortedDependencies<INPUT>
A sorted list of inputs with dependency information.
SortedDependencies.CircularDependencyException
SortedDependencies.MissingProvideException
SourceAst
An interface for accessing the AST root of an input.
SourceExcerptProvider
A source excerpt provider is responsible for building source code excerpt of specific locations, such as a specific line or a region around a given line number.
SourceExcerptProvider.ExcerptFormatter
A excerpt formatter is responsible of formatting source excerpts.
SourceExcerptProvider.SourceExcerpt
Source excerpt variety.
SourceFile
An abstract representation of a source file that provides access to language-neutral features.
SourceFile.Builder
A builder interface for source files.
SourceFile.Generator
A JavaScript source code provider.
SourceMap
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
SourceMap.DetailLevel
Source maps can be very large different levels of detail can be specified.
SourceMap.Format
SourceMap.LocationMapping
SourceMapConsumer
A SourceMapConsumer is a SourceMapping provide that can parse from a raw string.
SourceMapConsumerFactory
Detect and parse the provided source map.
SourceMapConsumerV1
Class for parsing and representing a SourceMap, as produced by the Closure Compiler, Caja-Compiler, etc.
SourceMapConsumerV2
Class for parsing version 2 of the SourceMap format, as produced by the Closure Compiler, etc.
SourceMapConsumerV3
Class for parsing version 3 of the SourceMap format, as produced by the Closure Compiler, etc.
SourceMapConsumerV3.EntryVisitor
SourceMapFormat
A list of currently support SourceMap format revisions.
SourceMapGenerator
Collects information mapping the generated (compiled) source back to its original source for debugging purposes
SourceMapGeneratorFactory
SourceMapGeneratorV1
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
SourceMapGeneratorV2
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
SourceMapGeneratorV2.LineMapEncoder
SourceMapGeneratorV3
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
SourceMapParseException
Throw if an invalid or unknown source map is encountered.
SourceMapping
Interface for provide a way of mapping (line, column) positions back to positions in the original (uncompiled) source code.
SourceMappingReversable
A SourceMappingReversable is a SourceMapping that can provide the reverse (source --> target) source mapping.
SourceMapSection
A class representing a partial source map.
SourceMapSection.SectionType
SourceMapSupplier
A class for mapping source map names to the actual contents.
SourcePosition<T>
Represents a position in some piece of source code, with an associated item of type T found at that position.
StandardUnionFind<E>
A Union-Find implementation.
StatementFusion
Tries to fuse all the statements in a block into a one statement by using COMMAs.
StaticReference<T>
The `StaticReference` tells us all the ways that a `StaticSlot` is used in a program.
StaticScope<T>
The `StaticScope` interface must be implemented by any object that defines variables for the purposes of static analysis.
StaticSlot<T>
The `StaticSlot` interface must be implemented by variables that can appear as members of a `StaticScope`.
StaticSourceFile
The `StaticSourceFile` contains information about a compiler input.
StaticSymbolTable<S,R>
Lookup references by the symbols that they refer to.
StrictWarningsGuard
All warnings should be reported as errors.
StringType
String type.
SubGraph<N,E>
An interface representing a subgraph that provides adjacency calculation to a node.
SymbolTable
A symbol table for people that want to use Closure Compiler as an indexer.
SymbolTable.Reference
SymbolTable.Symbol
SymbolTable.SymbolScope
SyntheticAst
An AST generated totally by the compiler.
TagAttr
List of attributes that a JsonML element may have.
TagType
List of types allowed for JsonML elements.
TemplateType
TemplateTypeMap
Manages a mapping from TemplateType to its resolved JSType.
TemplatizedType
An object type with declared template types, such as `Array.<string>`.
TernaryValue
An enum for ternary logic.
TestErrorReporter
An error reporter for testing that verifies that messages reported to the reporter are expected.
TestErrorReporter
An error reporter for testing that verifies that messages reported to the reporter are expected.
Token
This class implements the JavaScript scanner.
TokenStream
This class implements the JavaScript scanner.
TypeCheck
Checks the types of JS expressions against any declared type information.
UndiGraph<N,E>
A generic undirected graph.
UndiGraph.UndiGraphEdge<N,E>
A generic undirected graph edge.
UndiGraph.UndiGraphNode<N,E>
A generic undirected graph node.
UnionFind<E>
Union-Find is a classical algorithm used to find connected components in graph theory.
UnionType
The `UnionType` implements a common JavaScript idiom in which the code is specifically designed to work with multiple input types.
UnknownType
The `Unknown` type.
Validator
Statically validates JsonML elements.
VariableMap
Stores the mapping from original variable name to new variable names.
VariableRenamingPolicy
Policies to determine which variables should be renamed.
Visitor<T>
A type visitor.
VoidType
Void type whose only element is the `undefined` value.
Warning
Simple representation of a warning flag in Ant
WarningLevel
Convert the warnings level to an Options object.
WarningsGuard
Class that allows to flexibly manage what to do with a reported warning/error.
WarningsGuard.Priority
WhitelistWarningsGuard
An extension of `WarningsGuard` that provides functionality to maintain a list of warnings (white-list).
WhitelistWarningsGuard.WhitelistBuilder
Writer
Converts internal AST into JsonML tree.
XtbMessageBundle
A MessageBundle that parses messages from an XML Translation Bundle (XTB) file.