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 class
Builder for Source instances.static interface
An automorphic transformation on sources. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Source.Builder
builder()
Makes a new empty builder.final String
code()
The actual code in this source file.abstract int
A 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 String
The untransformed code from the original source file.abstract Path
path()
The path of this source.abstract com.google.common.collect.ImmutableSet
<String> runtimes()
Any runtime libraries necessary for this source.abstract String
The text of any source map applicable to this file.abstract String
The URL for a source map associated with this file.abstract String
The source URL associated with this file.abstract Source.Builder
Copies 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.
-