Package com.google.javascript.jscomp
Class SourceFile.Builder
java.lang.Object
com.google.javascript.jscomp.SourceFile.Builder
- Enclosing class:
SourceFile
A builder interface for source files.
Allows users to customize the Charset, and the original path of the source file (if it differs from the path on disk).
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Sets that this SourceFile is a stub file for an input that was already provided to the compiler in the form of TypedAST.withCharset
(Charset charset) Set the charset to use when reading from an input stream or file.Set the source kind.withOriginalPath
(String originalPath) Sets a name for this source file that does not need to correspond to a path on disk.withZipEntryPath
(String zipPath, String entryPath)
-
Method Details
-
withKind
Set the source kind. -
withCharset
Set the charset to use when reading from an input stream or file. -
withPath
-
withPath
-
withContent
-
withContent
-
withZipEntryPath
-
withOriginalPath
Sets a name for this source file that does not need to correspond to a path on disk.Allow passing a reasonable human-readable name in cases like for zip files and for generated files with unstable artifact prefixes.
The name must still be unique.
-
setIsStubSourceFileForAlreadyProvidedInput
Sets that this SourceFile is a stub file for an input that was already provided to the compiler in the form of TypedAST. -
build
-