Class Source
java.lang.Object
com.google.javascript.jscomp.bundle.Source
An abstract representation of a source file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for Source instances.static interfaceAn automorphic transformation on sources. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Source.Builderbuilder()Makes a new empty builder.final Stringcode()The actual code in this source file.abstract intA best estimate of the size of this source (in case the source itself is not yet loaded.The load flags, specifying module type and language level.final StringThe untransformed code from the original source file.abstract Pathpath()The path of this source.abstract com.google.common.collect.ImmutableSet<String> runtimes()Any runtime libraries necessary for this source.abstract StringThe text of any source map applicable to this file.abstract StringThe URL for a source map associated with this file.abstract StringThe source URL associated with this file.abstract Source.BuilderCopies the data from this source to a new builder.
-
Constructor Details
-
Source
public Source()
-
-
Method Details
-
path
The path of this source. This may refer to a path on disk or a path on the HTTP server. -
sourceMap
The text of any source map applicable to this file. -
sourceUrl
The source URL associated with this file. -
sourceMappingUrl
The URL for a source map associated with this file. -
runtimes
Any runtime libraries necessary for this source. Any transformation that adds a runtime library to any sources must be responsible to never add the same library as a substring to a different source (so that the "no duplicates" invariant of Set will work correctly). -
loadFlags
The load flags, specifying module type and language level. -
estimatedSize
public abstract int estimatedSize()A best estimate of the size of this source (in case the source itself is not yet loaded. -
code
The actual code in this source file. -
originalCode
The untransformed code from the original source file. -
toBuilder
Copies the data from this source to a new builder. -
builder
Makes a new empty builder.
-