public class CompilerOptions
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static interface |
CompilerOptions.AliasTransformation
A Role Specific Interface for the JS Compiler to report aliases used to
change the code during a compile.
|
static interface |
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.
|
static class |
CompilerOptions.DevMode
When to do the extra validity checks
|
static class |
CompilerOptions.DisposalCheckingPolicy
Deprecated.
No longer has any effect.
|
static class |
CompilerOptions.Environment
An environment specifies the built-in externs that are loaded for a given
compilation.
|
static class |
CompilerOptions.Es6ModuleTranspilation
How ES6 modules should be transformed.
|
static class |
CompilerOptions.ExtractPrototypeMemberDeclarationsMode |
static class |
CompilerOptions.IncrementalCheckMode |
static class |
CompilerOptions.IsolationMode
What kind of isolation is going to be used
|
static class |
CompilerOptions.J2clPassMode
A mode enum used to indicate whether J2clPass should be enabled, disabled, or enabled
automatically if there is any J2cl source file (i.e.
|
static class |
CompilerOptions.LanguageMode
A language mode applies to the whole compilation job.
|
static class |
CompilerOptions.OutputJs
What type of JS file should be output by this compilation
|
static class |
CompilerOptions.PropertyCollapseLevel |
static class |
CompilerOptions.Reach
A common enum for compiler passes that can run either globally or locally.
|
static class |
CompilerOptions.TracerMode
How much tracing we want to do
|
static class |
CompilerOptions.TweakProcessing
Option for the ProcessTweaks pass
|
Modifier and Type | Field and Description |
---|---|
java.util.Set<java.lang.String> |
aliasableStrings
If set to a non-empty set, those strings literals will be aliased to a
single global instance per string, to avoid creating more objects than
necessary.
|
boolean |
aliasAllStrings
Aliases all string literals to global instances, to avoid creating more
objects than necessary (if true, overrides any set of strings passed in
to aliasableStrings)
|
java.lang.String |
aliasStringsBlacklist
A blacklist in the form of a regular expression to block strings that
contains certain words from being aliased.
|
AnonymousFunctionNamingPolicy |
anonymousFunctionNaming
Give anonymous functions names for easier debugging
|
CheckLevel |
brokenClosureRequiresLevel
Deprecated.
|
CheckLevel |
checkGlobalNamesLevel |
CheckLevel |
checkGlobalThisLevel |
java.lang.String |
checkMissingGetCssNameBlacklist
Regex of string literals that may only appear in goog.getCssName arguments.
|
CheckLevel |
checkMissingGetCssNameLevel |
boolean |
checkSuspiciousCode
Checks for suspicious statements that have no effect
|
boolean |
checkSymbols
Checks that all symbols are defined
|
boolean |
checkTypes
Checks types on expressions
|
boolean |
closurePass
Processes goog.provide() and goog.require() calls
|
boolean |
coalesceVariableNames
Merge two variables together as one.
|
boolean |
collapseAnonymousFunctions
Collapses anonymous function declarations into named function
declarations
|
boolean |
collapseVariableDeclarations
Collapses multiple variable declarations into one
|
boolean |
computeFunctionSideEffects
Use @nosideeffects annotations, function bodies and name graph
to determine if calls have side effects.
|
boolean |
convertToDottedProperties
Converts quoted property accesses to dot syntax (a['b'] → a.b)
|
CssRenamingMap |
cssRenamingMap
Map used in the renaming of CSS class names.
|
protected com.google.common.collect.Multimap<CustomPassExecutionTime,CompilerPass> |
customPasses
Custom passes
|
boolean |
deadAssignmentElimination
Remove assignments to values that can not be referenced
|
boolean |
devirtualizePrototypeMethods
Devirtualize prototype method by rewriting them to be static calls that
take the this pointer as their first argument
|
ErrorFormat |
errorFormat |
boolean |
exportTestFunctions
Whether to export test functions.
|
boolean |
flowSensitiveInlineVariables |
boolean |
foldConstants
Folds constants (e.g.
|
boolean |
gatherCssNames
Gather CSS names (requires closurePass)
|
boolean |
generateExports |
boolean |
generatePseudoNames
Generate pseudo names for variables and properties for debugging purposes.
|
boolean |
inlineConstantVars
Inlines constants (symbols that are all CAPS)
|
boolean |
inlineVariables
Inlines variables
|
java.lang.String |
inputDelimiter
The string to use as the separator for printInputDelimiter
|
boolean |
instrumentBranchCoverage
Instrument branch coverage data - valid only if instrumentForCoverage is True
|
boolean |
instrumentForCoverage
Instrument code for the purpose of collecting coverage data.
|
boolean |
labelRenaming
Controls label renaming.
|
boolean |
lineBreak
Line break the output a bit more aggressively
|
java.lang.String |
locale
Compiling locale
|
boolean |
markAsCompiled
Sets the special "COMPILED" value to true
|
MessageBundle |
messageBundle
Returns localized replacement for MSG_* variables
|
boolean |
moveFunctionDeclarations
Move top-level function declarations to the top
|
boolean |
optimizeArgumentsArray
Provide formal names for elements of arguments array.
|
boolean |
optimizeCalls
Remove unused parameters from call sites.
|
boolean |
preferLineBreakAtEndOfFile
Prefer line breaks at end of file
|
boolean |
preserveTypeAnnotations
Do not strip closure-style type annotations from code.
|
boolean |
printInputDelimiter
Prints a separator comment before each JS script
|
boolean |
removeDeadCode
Removes code that will never execute
|
boolean |
removeUnusedClassProperties
Removes unused member properties
|
boolean |
removeUnusedLocalVars
Removes unused variables in local scope.
|
boolean |
removeUnusedPrototypeProperties
Removes unused member prototypes
|
boolean |
removeUnusedPrototypePropertiesInExterns
Tells AnalyzePrototypeProperties it can remove externed props.
|
boolean |
removeUnusedVars
Removes unused variables
|
java.lang.String |
renamePrefix
Specifies a prefix for all globals
|
java.lang.String |
renamePrefixNamespace
Specifies the name of an object that will be used to store all non-extern
globals.
|
boolean |
reserveRawExports
Reserve property names on the global this object.
|
boolean |
rewriteFunctionExpressions
Reduces the size of common function expressions.
|
boolean |
smartNameRemoval
Removes code associated with unused global names
|
SourceMap.DetailLevel |
sourceMapDetailLevel
The detail level for the generated source map.
|
SourceMap.Format |
sourceMapFormat
The source map file format
|
java.util.List<? extends SourceMap.LocationMapping> |
sourceMapLocationMappings |
java.lang.String |
sourceMapOutputPath
The output path for the source map.
|
java.util.Set<java.lang.String> |
stripNamePrefixes
Name prefixes that determine which variables and properties to strip
|
java.util.Set<java.lang.String> |
stripNameSuffixes
Name suffixes that determine which variables and properties to strip
|
java.util.Set<java.lang.String> |
stripTypePrefixes
Qualified type name prefixes that determine which types to strip
|
java.util.Set<java.lang.String> |
stripTypes
Names of types to strip
|
java.lang.String |
syntheticBlockEndMarker |
java.lang.String |
syntheticBlockStartMarker |
VariableRenamingPolicy |
variableRenaming
Controls which variables get renamed.
|
Constructor and Description |
---|
CompilerOptions()
Initializes compiler options.
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomPass(CustomPassExecutionTime time,
CompilerPass customPass) |
void |
addWarningsGuard(WarningsGuard guard)
Add a guard to the set of warnings guards.
|
boolean |
assumeClosuresOnlyCaptureReferences() |
boolean |
assumeStrictThis() |
void |
clearConformanceConfigs() |
static CompilerOptions |
deserialize(java.io.InputStream objectInputStream)
Deserializes compiler options from a stream.
|
void |
disableRuntimeTypeCheck() |
void |
enableRuntimeTypeCheck(java.lang.String logFunction)
Enable run-time type checking, which adds JS type assertions for debugging.
|
boolean |
expectStrictModeInput() |
CompilerOptions.AliasTransformationHandler |
getAliasTransformationHandler() |
com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> |
getBrowserResolverPrefixReplacements() |
boolean |
getCheckDeterminism() |
CompilerOptions.DisposalCheckingPolicy |
getCheckEventfulObjectDisposalPolicy()
Deprecated.
No longer has any effect.
|
CodingConvention |
getCodingConvention() |
boolean |
getCollapseObjectLiterals() |
com.google.common.collect.ImmutableList<ConformanceConfig> |
getConformanceConfigs() |
java.util.Map<java.lang.String,Node> |
getDefineReplacements()
Returns the map of define replacements.
|
DependencyOptions |
getDependencyOptions() |
CompilerOptions.Environment |
getEnvironment() |
ErrorFormat |
getErrorFormat() |
CompilerOptions.Es6ModuleTranspilation |
getEs6ModuleTranspilation() |
boolean |
getInferTypes()
Gets the inferTypes flag.
|
CompilerOptions.Reach |
getInlineFunctionsLevel()
Get the function inlining policy for the compiler.
|
boolean |
getInstrumentForCoverageOnly() |
CompilerOptions.LanguageMode |
getLanguageIn() |
boolean |
getLegacyCodeCompile() |
int |
getLineLengthThreshold() |
ModuleLoader.ResolutionMode |
getModuleResolutionMode() |
FeatureSet |
getOutputFeatureSet()
Gets the set of features that can appear in the output.
|
java.util.List<java.lang.String> |
getPackageJsonEntryNames() |
ModuleLoader.PathEscaper |
getPathEscaper() |
boolean |
getPreferLineBreakAtEndOfFile() |
boolean |
getProcessCommonJSModules() |
CompilerOptions.PropertyCollapseLevel |
getPropertyCollapseLevel() |
PropertyRenamingPolicy |
getPropertyRenaming() |
char[] |
getPropertyReservedNamingFirstChars() |
char[] |
getPropertyReservedNamingNonFirstChars() |
java.lang.String |
getRenamePrefixNamespace() |
boolean |
getRewritePolyfills() |
CompilerOptions.TracerMode |
getTracerMode() |
CompilerOptions.TweakProcessing |
getTweakProcessing() |
java.util.Map<java.lang.String,Node> |
getTweakReplacements()
Returns the map of tweak replacements.
|
boolean |
getUseOriginalNamesInOutput() |
boolean |
isChromePassEnabled() |
boolean |
isDisambiguatePrivateProperties() |
boolean |
isExternExportsEnabled() |
Config.JsDocParsing |
isParseJsDocDocumentation()
Checks JSDoc documentation will be parsed.
|
boolean |
isPrettyPrint() |
boolean |
isRemoveUnusedClassProperties() |
boolean |
isRemoveUnusedConstructorProperties() |
boolean |
isTypecheckingEnabled() |
boolean |
needsTranspilationFrom(FeatureSet languageLevel) |
boolean |
needsTranspilationOf(FeatureSet.Feature feature) |
void |
resetWarningsGuard()
Reset the warnings guard.
|
void |
serialize(java.io.OutputStream objectOutputStream)
Serializes compiler options to a stream.
|
void |
setAliasableStrings(java.util.Set<java.lang.String> aliasableStrings) |
void |
setAliasAllStrings(boolean aliasAllStrings) |
void |
setAliasStringsBlacklist(java.lang.String aliasStringsBlacklist) |
void |
setAliasTransformationHandler(CompilerOptions.AliasTransformationHandler changes) |
void |
setAllowHotswapReplaceScript(boolean allowRecompilation) |
void |
setAmbiguateProperties(boolean ambiguateProperties) |
void |
setAngularPass(boolean angularPass) |
void |
setAnonymousFunctionNaming(AnonymousFunctionNamingPolicy anonymousFunctionNaming) |
void |
setApplyInputSourceMaps(boolean applyInputSourceMaps) |
void |
setAssumeClosuresOnlyCaptureReferences(boolean enable)
Whether to assume closures capture only what they reference.
|
void |
setAssumeForwardDeclaredForMissingTypes(boolean assumeForwardDeclaredForMissingTypes)
If
true , considers all missing types to be forward declared (useful for partial
compilation). |
void |
setAssumeStrictThis(boolean enable)
If true, enables enables additional optimizations.
|
void |
setBrokenClosureRequiresLevel(CheckLevel level)
Deprecated.
|
void |
setBrowserResolverPrefixReplacements(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> browserResolverPrefixReplacements) |
void |
setCheckDeterminism(boolean checkDeterminism) |
void |
setCheckEventfulObjectDisposalPolicy(CompilerOptions.DisposalCheckingPolicy policy)
Deprecated.
No longer has any effect.
|
void |
setCheckGlobalNamesLevel(CheckLevel level)
Checks the integrity of references to qualified global names.
|
void |
setCheckGlobalThisLevel(CheckLevel level)
Checks for certain uses of the
this keyword that are considered
unsafe because they are likely to reference the global this
object unintentionally. |
void |
setCheckMissingGetCssNameBlacklist(java.lang.String blackList) |
void |
setCheckMissingGetCssNameLevel(CheckLevel level)
Checks that certain string literals only appear in strings used as
goog.getCssName arguments.
|
void |
setChecksOnly(boolean checksOnly) |
void |
setCheckSuspiciousCode(boolean checkSuspiciousCode) |
void |
setCheckSymbols(boolean checkSymbols) |
void |
setCheckTypes(boolean checkTypes) |
void |
setChromePass(boolean chromePass) |
void |
setChunksToPrintAfterEachPassRegexList(java.util.List<java.lang.String> chunkPathRegexList) |
void |
setClosurePass(boolean closurePass) |
void |
setCoalesceVariableNames(boolean coalesceVariableNames) |
void |
setCodingConvention(CodingConvention codingConvention) |
void |
setCollapseAnonymousFunctions(boolean enabled) |
void |
setCollapseObjectLiterals(boolean enabled) |
void |
setCollapseProperties(boolean fullyCollapse)
Deprecated.
|
void |
setCollapsePropertiesLevel(CompilerOptions.PropertyCollapseLevel level) |
void |
setCollapseVariableDeclarations(boolean enabled) |
void |
setColorizeErrorOutput(boolean colorizeErrorOutput) |
void |
setCommonJSModulePathPrefix(java.lang.String commonJSModulePathPrefix)
Sets a path prefix for CommonJS modules (maps to
setModuleRoots(List) ). |
void |
setComputeFunctionSideEffects(boolean computeFunctionSideEffects) |
void |
setConformanceConfig(ConformanceConfig conformanceConfig)
Both enable and configure conformance checks, if non-null.
|
void |
setConformanceConfigs(java.util.List<ConformanceConfig> configs)
Both enable and configure conformance checks, if non-null.
|
void |
setContinueAfterErrors(boolean continueAfterErrors) |
void |
setConvertToDottedProperties(boolean convertToDottedProperties) |
void |
setCrossChunkCodeMotion(boolean crossChunkCodeMotion) |
void |
setCrossChunkCodeMotionNoStubMethods(boolean crossChunkCodeMotionNoStubMethods) |
void |
setCrossChunkMethodMotion(boolean crossChunkMethodMotion) |
void |
setCssRenamingMap(CssRenamingMap cssRenamingMap) |
void |
setCssRenamingWhitelist(java.util.Set<java.lang.String> whitelist) |
void |
setDartPass(boolean dartPass) |
void |
setDeadAssignmentElimination(boolean deadAssignmentElimination) |
void |
setDefineReplacements(java.util.Map<java.lang.String,java.lang.Object> defineReplacements) |
void |
setDefineToBooleanLiteral(java.lang.String defineName,
boolean value)
Sets the value of the
@define variable in JS
to a boolean literal. |
void |
setDefineToDoubleLiteral(java.lang.String defineName,
double value)
Sets the value of the
@define variable in JS to a
number literal. |
void |
setDefineToNumberLiteral(java.lang.String defineName,
int value)
Sets the value of the
@define variable in JS to a
number literal. |
void |
setDefineToStringLiteral(java.lang.String defineName,
java.lang.String value)
Sets the value of the
@define variable in JS to a
String literal. |
void |
setDependencyOptions(DependencyOptions dependencyOptions)
Sets the dependency management options.
|
void |
setDevirtualizePrototypeMethods(boolean devirtualizePrototypeMethods) |
void |
setDevMode(CompilerOptions.DevMode devMode) |
void |
setDisambiguatePrivateProperties(boolean value) |
void |
setDisambiguateProperties(boolean disambiguateProperties) |
CompilerOptions |
setEmitUseStrict(boolean emitUseStrict) |
void |
setEnvironment(CompilerOptions.Environment environment)
Set which set of builtin externs to use.
|
void |
setErrorFormat(ErrorFormat errorFormat) |
void |
setErrorHandler(ErrorHandler handler)
Set a custom handler for warnings and errors.
|
void |
setEs6ModuleTranspilation(CompilerOptions.Es6ModuleTranspilation value) |
void |
setExportLocalPropertyDefinitions(boolean export) |
void |
setExportTestFunctions(boolean exportTestFunctions) |
void |
setExternExports(boolean externExports) |
void |
setExternExportsPath(java.lang.String externExportsPath) |
void |
setExtraAnnotationNames(java.lang.Iterable<java.lang.String> extraAnnotationNames) |
void |
setExtractPrototypeMemberDeclarations(boolean enabled) |
void |
setExtractPrototypeMemberDeclarations(CompilerOptions.ExtractPrototypeMemberDeclarationsMode mode) |
void |
setExtraSmartNameRemoval(boolean smartNameRemoval) |
void |
setFilesToPrintAfterEachPassRegexList(java.util.List<java.lang.String> filePathRegexList) |
void |
setFlowSensitiveInlineVariables(boolean enabled) |
void |
setFoldConstants(boolean foldConstants) |
void |
setForceLibraryInjection(java.lang.Iterable<java.lang.String> libraries)
Sets list of libraries to always inject, even if not needed.
|
void |
setGatherCssNames(boolean gatherCssNames) |
void |
setGenerateExports(boolean generateExports) |
void |
setGeneratePseudoNames(boolean generatePseudoNames) |
void |
setIdeMode(boolean ideMode)
Deprecated.
Some "IDE" clients will need some of these options but not
others. Consider calling setChecksOnly, setAllowRecompilation, etc,
explicitly, instead of calling this method which does a variety of
different things.
|
void |
setIdGenerators(java.util.Map<java.lang.String,RenamingMap> idGenerators)
Sets the id generators to replace.
|
void |
setIdGenerators(java.util.Set<java.lang.String> idGenerators)
Sets the id generators to replace.
|
void |
setIdGeneratorsMap(java.lang.String previousMappings)
A previous map of ids (serialized to a string by a previous compile).
|
void |
setIncrementalChecks(CompilerOptions.IncrementalCheckMode value) |
void |
setInferConst(boolean value) |
void |
setInferTypes(boolean enable)
If true, enables type inference.
|
void |
setInlineConstantVars(boolean inlineConstantVars) |
void |
setInlineFunctions(boolean inlineFunctions)
Deprecated.
|
void |
setInlineFunctions(CompilerOptions.Reach reach)
Set the function inlining policy for the compiler.
|
void |
setInlineLocalVariables(boolean inlineLocalVariables) |
void |
setInlineProperties(boolean enable)
Set the function inlining policy for the compiler.
|
void |
setInlineVariables(boolean inlineVariables) |
void |
setInlineVariables(CompilerOptions.Reach reach)
Set the variable inlining policy for the compiler.
|
void |
setInputAnonymousFunctionNamingMap(VariableMap inputMap) |
void |
setInputDelimiter(java.lang.String inputDelimiter) |
void |
setInputPropertyMap(VariableMap inputPropertyMap) |
void |
setInputSourceMaps(com.google.common.collect.ImmutableMap<java.lang.String,SourceMapInput> inputSourceMaps)
Sets the input sourcemap files, indexed by the JS files they refer to.
|
void |
setInputVariableMap(VariableMap inputVariableMap) |
void |
setInstrumentBranchCoverage(boolean instrumentBranchCoverage)
Set whether to instrument to collect branch coverage
|
void |
setInstrumentForCoverage(boolean instrumentForCoverage)
Set whether or not code should be modified to provide coverage
information.
|
void |
setInstrumentForCoverageOnly(boolean instrumentForCoverageOnly) |
void |
setJ2clPass(CompilerOptions.J2clPassMode j2clPassMode) |
void |
setLabelRenaming(boolean labelRenaming) |
void |
setLanguage(CompilerOptions.LanguageMode language)
Sets ECMAScript version to use.
|
void |
setLanguageIn(CompilerOptions.LanguageMode languageIn)
Sets ECMAScript version to use for the input.
|
void |
setLanguageInToUnsupported()
Sets the ECMAScript version to the unsupported features that can be parsed but are not
understood by the rest of the compiler.
|
void |
setLanguageOut(CompilerOptions.LanguageMode languageOut)
Sets ECMAScript version to use for the output.
|
void |
setLegacyCodeCompile(boolean legacy) |
void |
setLineBreak(boolean lineBreak) |
void |
setLineLengthThreshold(int lineLengthThreshold) |
void |
setLocale(java.lang.String locale) |
void |
setMarkAsCompiled(boolean markAsCompiled) |
void |
setMaxFunctionSizeAfterInlining(int funAstSize) |
void |
setMaxOptimizationLoopIterations(int maxIterations) |
void |
setMessageBundle(MessageBundle messageBundle) |
void |
setModuleResolutionMode(ModuleLoader.ResolutionMode moduleResolutionMode) |
void |
setModuleRoots(java.util.List<java.lang.String> moduleRoots)
Sets the module roots.
|
void |
setModulesToPrintAfterEachPassRegexList(java.util.List<java.lang.String> chunkPathRegexList)
Deprecated.
|
void |
setMoveFunctionDeclarations(boolean moveFunctionDeclarations) |
void |
setNameGenerator(com.google.javascript.jscomp.NameGenerator nameGenerator) |
void |
setNewTypeInference(boolean enable)
Deprecated.
This is a no-op.
|
void |
setNumParallelThreads(int parallelism)
Sets the level of parallelism for compilation passes that can exploit multi-threading.
|
void |
setOptimizeArgumentsArray(boolean optimizeArgumentsArray) |
void |
setOptimizeCalls(boolean optimizeCalls) |
void |
setOutputCharset(java.nio.charset.Charset charset)
Sets the output charset.
|
void |
setOutputFeatureSet(FeatureSet featureSet)
Sets the features that allowed to appear in the output.
|
void |
setOutputJs(CompilerOptions.OutputJs outputJs) |
void |
setOutputJsStringUsage(boolean outputJsStringUsage) |
void |
setPackageJsonEntryNames(java.util.List<java.lang.String> names) |
void |
setParentChunkCanSeeSymbolsDeclaredInChildren(boolean parentChunkCanSeeSymbolsDeclaredInChildren) |
void |
setParseInlineSourceMaps(boolean parseInlineSourceMaps) |
void |
setParseJsDocDocumentation(Config.JsDocParsing parseJsDocDocumentation)
Enables or disables the parsing of JSDoc documentation, and optionally also
the preservation of all whitespace and formatting within a JSDoc comment.
|
void |
setPathEscaper(ModuleLoader.PathEscaper pathEscaper) |
void |
setPolymerVersion(java.lang.Integer polymerVersion) |
void |
setPreferLineBreakAtEndOfFile(boolean lineBreakAtEnd) |
void |
setPreferSingleQuotes(boolean enabled)
Normally, when there are an equal number of single and double quotes
in a string, the compiler will use double quotes.
|
void |
setPreferStableNames(boolean preferStableNames) |
void |
setPreserveClosurePrimitives(boolean preserveClosurePrimitives)
Preserve closure primitives.
|
void |
setPreserveDetailedSourceInfo(boolean preserveDetailedSourceInfo) |
void |
setPreserveTypeAnnotations(boolean preserveTypeAnnotations) |
void |
setPrettyPrint(boolean prettyPrint) |
void |
setPreventLibraryInjection(boolean preventLibraryInjection)
Sets the set of libraries to never inject, even if required.
|
void |
setPrintConfig(boolean printConfig)
Should the compiler print its configuration options to stderr when they are initialized?
|
void |
setPrintInputDelimiter(boolean printInputDelimiter) |
void |
setPrintSourceAfterEachPass(boolean printSource) |
void |
setProcessCommonJSModules(boolean processCommonJSModules)
Rewrites CommonJS modules so that modules can be concatenated together,
by renaming all globals to avoid conflicting with other modules.
|
void |
setPropertyInvalidationErrors(java.util.Map<java.lang.String,CheckLevel> propertyInvalidationErrors)
Sets the list of properties that we report property invalidation errors
for.
|
void |
setPropertyRenaming(PropertyRenamingPolicy propertyRenaming) |
void |
setProtectHiddenSideEffects(boolean enable)
When enabled, assume that apparently side-effect free code is meaningful.
|
void |
setQuoteKeywordProperties(boolean quoteKeywordProperties) |
void |
setRemoveAbstractMethods(boolean remove) |
void |
setRemoveClosureAsserts(boolean remove) |
void |
setRemoveDeadCode(boolean removeDeadCode) |
void |
setRemoveJ2clAsserts(boolean remove) |
void |
setRemoveUnusedClassProperties(boolean removeUnusedClassProperties) |
void |
setRemoveUnusedConstructorProperties(boolean removeUnused) |
void |
setRemoveUnusedPrototypeProperties(boolean enabled) |
void |
setRemoveUnusedPrototypePropertiesInExterns(boolean enabled) |
void |
setRemoveUnusedVariables(CompilerOptions.Reach reach)
Set the variable removal policy for the compiler.
|
void |
setRenamePrefix(java.lang.String renamePrefix) |
void |
setRenamePrefixNamespace(java.lang.String renamePrefixNamespace) |
void |
setRenamingPolicy(VariableRenamingPolicy newVariablePolicy,
PropertyRenamingPolicy newPropertyPolicy)
Sets the variable and property renaming policies for the compiler,
in a way that clears warnings about the renaming policy being
uninitialized from flags.
|
void |
setReplaceIdGenerators(boolean replaceIdGenerators) |
void |
setReplaceMessagesWithChromeI18n(boolean replaceMessagesWithChromeI18n,
java.lang.String tcProjectId) |
void |
setReplaceStringsConfiguration(java.lang.String placeholderToken,
java.util.List<java.lang.String> functionDescriptors)
Sets the functions whose debug strings to replace.
|
void |
setReplaceStringsFunctionDescriptions(java.util.List<java.lang.String> replaceStringsFunctionDescriptions) |
void |
setReplaceStringsInputMap(VariableMap serializedMap) |
void |
setReplaceStringsPlaceholderToken(java.lang.String replaceStringsPlaceholderToken) |
void |
setReplaceStringsReservedStrings(java.util.Set<java.lang.String> replaceStringsReservedStrings) |
void |
setReserveRawExports(boolean reserveRawExports) |
void |
setResolveSourceMapAnnotations(boolean resolveSourceMapAnnotations) |
void |
setRewriteFunctionExpressions(boolean rewriteFunctionExpressions) |
void |
setRewritePolyfills(boolean rewritePolyfills)
Sets whether to rewrite polyfills.
|
void |
setRuntimeTypeCheck(boolean runtimeTypeCheck) |
void |
setRuntimeTypeCheckLogFunction(java.lang.String runtimeTypeCheckLogFunction) |
void |
setShadowVariables(boolean shadow)
Should shadow outer scope variable name during renaming.
|
void |
setSkipNonTranspilationPasses(boolean skipNonTranspilationPasses)
Skip all passes (other than transpilation, if requested).
|
void |
setSkipTranspilationAndCrash(boolean value)
Deprecated.
|
void |
setSmartNameRemoval(boolean smartNameRemoval) |
void |
setSourceMapDetailLevel(SourceMap.DetailLevel sourceMapDetailLevel) |
void |
setSourceMapFormat(SourceMap.Format sourceMapFormat) |
void |
setSourceMapIncludeSourcesContent(boolean sourceMapIncludeSourcesContent) |
void |
setSourceMapLocationMappings(java.util.List<? extends SourceMap.LocationMapping> sourceMapLocationMappings) |
void |
setSourceMapOutputPath(java.lang.String sourceMapOutputPath) |
CompilerOptions |
setStrictModeInput(boolean isStrictModeInput) |
void |
setStripNamePrefixes(java.util.Set<java.lang.String> stripNamePrefixes) |
void |
setStripNameSuffixes(java.util.Set<java.lang.String> stripNameSuffixes) |
void |
setStripTypePrefixes(java.util.Set<java.lang.String> stripTypePrefixes) |
void |
setStripTypes(java.util.Set<java.lang.String> stripTypes) |
void |
setSummaryDetailLevel(int summaryDetailLevel)
Controls how detailed the compilation summary is.
|
void |
setSyntheticBlockEndMarker(java.lang.String syntheticBlockEndMarker) |
void |
setSyntheticBlockStartMarker(java.lang.String syntheticBlockStartMarker) |
void |
setTracerMode(CompilerOptions.TracerMode mode) |
void |
setTracerOutput(java.io.PrintStream out) |
void |
setTransformAMDToCJSModules(boolean transformAMDToCJSModules)
Activates transformation of AMD to CommonJS modules.
|
void |
setTrustedStrings(boolean yes)
Some people want to put arbitrary user input into strings, which are then
run through the compiler.
|
void |
setTweakProcessing(CompilerOptions.TweakProcessing tweakProcessing)
Sets how goog.tweak calls are processed.
|
void |
setTweakReplacements(java.util.Map<java.lang.String,java.lang.Object> tweakReplacements) |
void |
setTweakToBooleanLiteral(java.lang.String tweakId,
boolean value)
Sets the value of the tweak in JS
to a boolean literal.
|
void |
setTweakToDoubleLiteral(java.lang.String tweakId,
double value)
Sets the value of the tweak in JS to a
number literal.
|
void |
setTweakToNumberLiteral(java.lang.String tweakId,
int value)
Sets the value of the tweak in JS to a
number literal.
|
void |
setTweakToStringLiteral(java.lang.String tweakId,
java.lang.String value)
Sets the value of the tweak in JS to a
String literal.
|
void |
setUseOriginalNamesInOutput(boolean useOriginalNamesInOutput) |
void |
setUseSizeHeuristicToStopOptimizationLoop(boolean mayStopEarly) |
void |
setUseTypesForLocalOptimization(boolean useTypesForLocalOptimization) |
void |
setUseTypesForOptimization(boolean useTypesForOptimization)
Deprecated.
|
void |
setVariableRenaming(VariableRenamingPolicy variableRenaming) |
void |
setWarningLevel(DiagnosticGroup type,
CheckLevel level)
Configure the given type of warning to the given level.
|
void |
setWarningsGuard(ComposeWarningsGuard warningsGuard) |
void |
setWrapGoogModulesForWhitespaceOnly(boolean enable) |
void |
setXidHashFunction(Xid.HashFunction xidHashFunction)
Sets the hash function to use for Xid
|
boolean |
shouldAmbiguateProperties() |
boolean |
shouldCollapseProperties()
Deprecated.
use getPropertyCollapseLevel
|
boolean |
shouldColorizeErrorOutput() |
boolean |
shouldDisambiguateProperties() |
boolean |
shouldEmitUseStrict()
Whether the output should contain a 'use strict' directive.
|
boolean |
shouldExportLocalPropertyDefinitions() |
boolean |
shouldGenerateTypedExterns() |
boolean |
shouldInlineProperties() |
boolean |
shouldPreserveGoogLibraryPrimitives()
Do not process goog.
|
boolean |
shouldPreserveGoogModule() |
boolean |
shouldPreservesGoogProvidesAndRequires() |
boolean |
shouldProtectHiddenSideEffects()
Whether or not the compiler should wrap apparently side-effect free code
to prevent it from being removed
|
boolean |
shouldQuoteKeywordProperties() |
boolean |
shouldRunCrossChunkCodeMotion() |
boolean |
shouldRunCrossChunkMethodMotion() |
boolean |
shouldRunTypeSummaryChecksLate() |
boolean |
shouldUseTypesForLocalOptimization() |
void |
skipAllCompilerPasses()
Skip all possible passes, to make the compiler as fast as possible.
|
java.lang.String |
toString() |
public MessageBundle messageBundle
public boolean checkSymbols
public boolean checkSuspiciousCode
public boolean checkTypes
public CheckLevel checkGlobalNamesLevel
@Deprecated public CheckLevel brokenClosureRequiresLevel
public CheckLevel checkGlobalThisLevel
public CheckLevel checkMissingGetCssNameLevel
public java.lang.String checkMissingGetCssNameBlacklist
public boolean foldConstants
public boolean deadAssignmentElimination
public boolean inlineConstantVars
public boolean coalesceVariableNames
public boolean inlineVariables
public boolean flowSensitiveInlineVariables
public boolean smartNameRemoval
public boolean removeDeadCode
public boolean removeUnusedPrototypeProperties
public boolean removeUnusedPrototypePropertiesInExterns
public boolean removeUnusedClassProperties
public boolean removeUnusedVars
public boolean removeUnusedLocalVars
public boolean collapseVariableDeclarations
public boolean collapseAnonymousFunctions
public java.util.Set<java.lang.String> aliasableStrings
public java.lang.String aliasStringsBlacklist
public boolean aliasAllStrings
public boolean convertToDottedProperties
public boolean rewriteFunctionExpressions
public boolean optimizeCalls
public boolean optimizeArgumentsArray
public VariableRenamingPolicy variableRenaming
public boolean labelRenaming
public boolean reserveRawExports
public boolean generatePseudoNames
public java.lang.String renamePrefix
public java.lang.String renamePrefixNamespace
public boolean devirtualizePrototypeMethods
public boolean computeFunctionSideEffects
public AnonymousFunctionNamingPolicy anonymousFunctionNaming
public boolean exportTestFunctions
@Nullable public java.lang.String syntheticBlockStartMarker
@Nullable public java.lang.String syntheticBlockEndMarker
public java.lang.String locale
public boolean markAsCompiled
public boolean closurePass
public boolean gatherCssNames
public java.util.Set<java.lang.String> stripTypes
public java.util.Set<java.lang.String> stripNameSuffixes
public java.util.Set<java.lang.String> stripNamePrefixes
public java.util.Set<java.lang.String> stripTypePrefixes
protected transient com.google.common.collect.Multimap<CustomPassExecutionTime,CompilerPass> customPasses
public boolean moveFunctionDeclarations
public boolean generateExports
public CssRenamingMap cssRenamingMap
public boolean preserveTypeAnnotations
public boolean lineBreak
public boolean preferLineBreakAtEndOfFile
public boolean printInputDelimiter
public java.lang.String inputDelimiter
public ErrorFormat errorFormat
public java.lang.String sourceMapOutputPath
public SourceMap.DetailLevel sourceMapDetailLevel
public SourceMap.Format sourceMapFormat
public java.util.List<? extends SourceMap.LocationMapping> sourceMapLocationMappings
public boolean instrumentForCoverage
public boolean instrumentBranchCoverage
public CompilerOptions()
public boolean shouldRunCrossChunkCodeMotion()
public boolean shouldRunCrossChunkMethodMotion()
public void setInstrumentForCoverageOnly(boolean instrumentForCoverageOnly)
public boolean getInstrumentForCoverageOnly()
@Deprecated public void setSkipTranspilationAndCrash(boolean value)
public void setInputSourceMaps(com.google.common.collect.ImmutableMap<java.lang.String,SourceMapInput> inputSourceMaps)
inputSourceMaps
- the collection of input sourcemap filespublic void setInferConst(boolean value)
public void setIncrementalChecks(CompilerOptions.IncrementalCheckMode value)
public boolean shouldGenerateTypedExterns()
public boolean shouldRunTypeSummaryChecksLate()
public void setCheckGlobalNamesLevel(CheckLevel level)
@Deprecated public void setBrokenClosureRequiresLevel(CheckLevel level)
public void setCheckGlobalThisLevel(CheckLevel level)
this
keyword that are considered
unsafe because they are likely to reference the global this
object unintentionally.
If this is off, but collapseProperties is on, then the compiler will
usually ignore you and run this check anyways.public void setCheckMissingGetCssNameLevel(CheckLevel level)
@Deprecated public void setCheckEventfulObjectDisposalPolicy(CompilerOptions.DisposalCheckingPolicy policy)
@Deprecated public CompilerOptions.DisposalCheckingPolicy getCheckEventfulObjectDisposalPolicy()
public boolean getLegacyCodeCompile()
public void setLegacyCodeCompile(boolean legacy)
public void setNumParallelThreads(int parallelism)
Some compiler passes may take advantage of multi-threading, for example, parsing inputs. This sets the level of parallelism. The compiler will not start more than this number of threads.
parallelism
- up to this number of parallel threads may be created.@Deprecated public boolean shouldCollapseProperties()
public CompilerOptions.PropertyCollapseLevel getPropertyCollapseLevel()
public void setCollapseObjectLiterals(boolean enabled)
public boolean getCollapseObjectLiterals()
public void setNameGenerator(com.google.javascript.jscomp.NameGenerator nameGenerator)
public void setReplaceMessagesWithChromeI18n(boolean replaceMessagesWithChromeI18n, java.lang.String tcProjectId)
public void setAssumeForwardDeclaredForMissingTypes(boolean assumeForwardDeclaredForMissingTypes)
true
, considers all missing types to be forward declared (useful for partial
compilation).public void setPreferSingleQuotes(boolean enabled)
public void setTrustedStrings(boolean yes)
public void setPrintSourceAfterEachPass(boolean printSource)
public void setFilesToPrintAfterEachPassRegexList(java.util.List<java.lang.String> filePathRegexList)
public void setChunksToPrintAfterEachPassRegexList(java.util.List<java.lang.String> chunkPathRegexList)
@Deprecated public void setModulesToPrintAfterEachPassRegexList(java.util.List<java.lang.String> chunkPathRegexList)
public CompilerOptions.TracerMode getTracerMode()
public void setTracerMode(CompilerOptions.TracerMode mode)
public void setTracerOutput(java.io.PrintStream out)
public void setProtectHiddenSideEffects(boolean enable)
public boolean shouldProtectHiddenSideEffects()
public void setWrapGoogModulesForWhitespaceOnly(boolean enable)
public void setPrintConfig(boolean printConfig)
Default false
.
public boolean isRemoveUnusedClassProperties()
public void setRemoveUnusedClassProperties(boolean removeUnusedClassProperties)
removeUnusedClassProperties
- Whether to attempt to remove
unused class propertiespublic boolean isRemoveUnusedConstructorProperties()
public void setRemoveUnusedConstructorProperties(boolean removeUnused)
removeUnused
- Whether to attempt to remove
unused constructor propertiespublic java.util.Map<java.lang.String,Node> getDefineReplacements()
public java.util.Map<java.lang.String,Node> getTweakReplacements()
public void setDefineToBooleanLiteral(java.lang.String defineName, boolean value)
@define
variable in JS
to a boolean literal.public void setDefineToStringLiteral(java.lang.String defineName, java.lang.String value)
@define
variable in JS to a
String literal.public void setDefineToNumberLiteral(java.lang.String defineName, int value)
@define
variable in JS to a
number literal.public void setDefineToDoubleLiteral(java.lang.String defineName, double value)
@define
variable in JS to a
number literal.public void setTweakToBooleanLiteral(java.lang.String tweakId, boolean value)
public void setTweakToStringLiteral(java.lang.String tweakId, java.lang.String value)
public void setTweakToNumberLiteral(java.lang.String tweakId, int value)
public void setTweakToDoubleLiteral(java.lang.String tweakId, double value)
public void skipAllCompilerPasses()
public void setWarningLevel(DiagnosticGroup type, CheckLevel level)
public void resetWarningsGuard()
public void addWarningsGuard(WarningsGuard guard)
public void setRenamingPolicy(VariableRenamingPolicy newVariablePolicy, PropertyRenamingPolicy newPropertyPolicy)
public void setShadowVariables(boolean shadow)
public void setReplaceIdGenerators(boolean replaceIdGenerators)
replaceIdGenerators
- the replaceIdGenerators to setpublic void setIdGenerators(java.util.Set<java.lang.String> idGenerators)
public void setIdGenerators(java.util.Map<java.lang.String,RenamingMap> idGenerators)
public void setIdGeneratorsMap(java.lang.String previousMappings)
public void setXidHashFunction(Xid.HashFunction xidHashFunction)
@Deprecated public void setInlineFunctions(boolean inlineFunctions)
setInlineFunctions(Reach)
insteadpublic void setInlineFunctions(CompilerOptions.Reach reach)
public CompilerOptions.Reach getInlineFunctionsLevel()
public void setMaxFunctionSizeAfterInlining(int funAstSize)
public void setInlineVariables(boolean inlineVariables)
public void setInlineVariables(CompilerOptions.Reach reach)
public void setInlineProperties(boolean enable)
public boolean shouldInlineProperties()
public void setRemoveUnusedVariables(CompilerOptions.Reach reach)
public void setReplaceStringsConfiguration(java.lang.String placeholderToken, java.util.List<java.lang.String> functionDescriptors)
public void setRemoveAbstractMethods(boolean remove)
public void setRemoveClosureAsserts(boolean remove)
public void setRemoveJ2clAsserts(boolean remove)
public void setColorizeErrorOutput(boolean colorizeErrorOutput)
public boolean shouldColorizeErrorOutput()
public void enableRuntimeTypeCheck(java.lang.String logFunction)
logFunction
- A JS function to be used for logging run-time type
assertion failures.public void disableRuntimeTypeCheck()
public void setChecksOnly(boolean checksOnly)
public void setOutputJs(CompilerOptions.OutputJs outputJs)
public void setGenerateExports(boolean generateExports)
public void setExportLocalPropertyDefinitions(boolean export)
public boolean shouldExportLocalPropertyDefinitions()
public void setAngularPass(boolean angularPass)
public void setPolymerVersion(java.lang.Integer polymerVersion)
public void setChromePass(boolean chromePass)
public boolean isChromePassEnabled()
public void setDartPass(boolean dartPass)
public void setJ2clPass(CompilerOptions.J2clPassMode j2clPassMode)
public void setCodingConvention(CodingConvention codingConvention)
public CodingConvention getCodingConvention()
public void setDependencyOptions(DependencyOptions dependencyOptions)
public DependencyOptions getDependencyOptions()
public void setSummaryDetailLevel(int summaryDetailLevel)
public void setExtraAnnotationNames(java.lang.Iterable<java.lang.String> extraAnnotationNames)
public boolean isExternExportsEnabled()
public void setOutputCharset(java.nio.charset.Charset charset)
public void setTweakProcessing(CompilerOptions.TweakProcessing tweakProcessing)
public CompilerOptions.TweakProcessing getTweakProcessing()
public void setLanguage(CompilerOptions.LanguageMode language)
public void setLanguageIn(CompilerOptions.LanguageMode languageIn)
public void setLanguageInToUnsupported()
Should not be used outside tests!
public CompilerOptions.LanguageMode getLanguageIn()
public void setLanguageOut(CompilerOptions.LanguageMode languageOut)
If you are not transpiling from one version to another, use #setLanguage instead.
If you you need something more fine grained (e.g. "ES2017 without modules") use #setOutputFeatureSet.
public void setOutputFeatureSet(FeatureSet featureSet)
public FeatureSet getOutputFeatureSet()
public boolean needsTranspilationFrom(FeatureSet languageLevel)
public boolean needsTranspilationOf(FeatureSet.Feature feature)
public void setEnvironment(CompilerOptions.Environment environment)
public CompilerOptions.Environment getEnvironment()
public void setAliasTransformationHandler(CompilerOptions.AliasTransformationHandler changes)
public CompilerOptions.AliasTransformationHandler getAliasTransformationHandler()
public void setErrorHandler(ErrorHandler handler)
public void setInferTypes(boolean enable)
public boolean getInferTypes()
@Deprecated public void setNewTypeInference(boolean enable)
public boolean isTypecheckingEnabled()
public boolean assumeStrictThis()
public void setAssumeStrictThis(boolean enable)
public boolean assumeClosuresOnlyCaptureReferences()
public void setAssumeClosuresOnlyCaptureReferences(boolean enable)
public void setPropertyInvalidationErrors(java.util.Map<java.lang.String,CheckLevel> propertyInvalidationErrors)
@Deprecated public void setIdeMode(boolean ideMode)
CustomPassExecutionTime.BEFORE_OPTIMIZATIONS
public void setAllowHotswapReplaceScript(boolean allowRecompilation)
public void setPreserveDetailedSourceInfo(boolean preserveDetailedSourceInfo)
public void setContinueAfterErrors(boolean continueAfterErrors)
public void setParseJsDocDocumentation(Config.JsDocParsing parseJsDocDocumentation)
public Config.JsDocParsing isParseJsDocDocumentation()
public void setSkipNonTranspilationPasses(boolean skipNonTranspilationPasses)
public void setDevMode(CompilerOptions.DevMode devMode)
public void setCheckDeterminism(boolean checkDeterminism)
public boolean getCheckDeterminism()
public void setMessageBundle(MessageBundle messageBundle)
public void setCheckSymbols(boolean checkSymbols)
public void setCheckSuspiciousCode(boolean checkSuspiciousCode)
public void setCheckTypes(boolean checkTypes)
public void setCheckMissingGetCssNameBlacklist(java.lang.String blackList)
public void setFoldConstants(boolean foldConstants)
public void setDeadAssignmentElimination(boolean deadAssignmentElimination)
public void setInlineConstantVars(boolean inlineConstantVars)
public void setCrossChunkCodeMotion(boolean crossChunkCodeMotion)
public void setCrossChunkCodeMotionNoStubMethods(boolean crossChunkCodeMotionNoStubMethods)
public void setParentChunkCanSeeSymbolsDeclaredInChildren(boolean parentChunkCanSeeSymbolsDeclaredInChildren)
public void setCrossChunkMethodMotion(boolean crossChunkMethodMotion)
public void setCoalesceVariableNames(boolean coalesceVariableNames)
public void setInlineLocalVariables(boolean inlineLocalVariables)
public void setFlowSensitiveInlineVariables(boolean enabled)
public void setSmartNameRemoval(boolean smartNameRemoval)
public void setExtraSmartNameRemoval(boolean smartNameRemoval)
public void setRemoveDeadCode(boolean removeDeadCode)
public void setExtractPrototypeMemberDeclarations(boolean enabled)
public void setExtractPrototypeMemberDeclarations(CompilerOptions.ExtractPrototypeMemberDeclarationsMode mode)
public void setRemoveUnusedPrototypeProperties(boolean enabled)
public void setRemoveUnusedPrototypePropertiesInExterns(boolean enabled)
public void setCollapseVariableDeclarations(boolean enabled)
public void setCollapseAnonymousFunctions(boolean enabled)
public void setAliasableStrings(java.util.Set<java.lang.String> aliasableStrings)
public void setAliasStringsBlacklist(java.lang.String aliasStringsBlacklist)
public void setAliasAllStrings(boolean aliasAllStrings)
public void setOutputJsStringUsage(boolean outputJsStringUsage)
public void setConvertToDottedProperties(boolean convertToDottedProperties)
public void setUseTypesForLocalOptimization(boolean useTypesForLocalOptimization)
public boolean shouldUseTypesForLocalOptimization()
@Deprecated public void setUseTypesForOptimization(boolean useTypesForOptimization)
public void setRewriteFunctionExpressions(boolean rewriteFunctionExpressions)
public void setOptimizeCalls(boolean optimizeCalls)
public void setOptimizeArgumentsArray(boolean optimizeArgumentsArray)
public void setVariableRenaming(VariableRenamingPolicy variableRenaming)
public void setPropertyRenaming(PropertyRenamingPolicy propertyRenaming)
public PropertyRenamingPolicy getPropertyRenaming()
public void setLabelRenaming(boolean labelRenaming)
public void setReserveRawExports(boolean reserveRawExports)
public void setPreferStableNames(boolean preferStableNames)
public void setGeneratePseudoNames(boolean generatePseudoNames)
public void setRenamePrefix(java.lang.String renamePrefix)
public java.lang.String getRenamePrefixNamespace()
public void setRenamePrefixNamespace(java.lang.String renamePrefixNamespace)
public void setCollapsePropertiesLevel(CompilerOptions.PropertyCollapseLevel level)
@Deprecated public void setCollapseProperties(boolean fullyCollapse)
public void setDevirtualizePrototypeMethods(boolean devirtualizePrototypeMethods)
public void setComputeFunctionSideEffects(boolean computeFunctionSideEffects)
public boolean isDisambiguatePrivateProperties()
public void setDisambiguatePrivateProperties(boolean value)
value
- Whether to enable private property disambiguation based on
the coding convention.public void setDisambiguateProperties(boolean disambiguateProperties)
public boolean shouldDisambiguateProperties()
public void setAmbiguateProperties(boolean ambiguateProperties)
public boolean shouldAmbiguateProperties()
public void setAnonymousFunctionNaming(AnonymousFunctionNamingPolicy anonymousFunctionNaming)
public void setInputAnonymousFunctionNamingMap(VariableMap inputMap)
public void setInputVariableMap(VariableMap inputVariableMap)
public void setInputPropertyMap(VariableMap inputPropertyMap)
public void setExportTestFunctions(boolean exportTestFunctions)
public void setRuntimeTypeCheck(boolean runtimeTypeCheck)
public void setRuntimeTypeCheckLogFunction(java.lang.String runtimeTypeCheckLogFunction)
public void setSyntheticBlockStartMarker(java.lang.String syntheticBlockStartMarker)
public void setSyntheticBlockEndMarker(java.lang.String syntheticBlockEndMarker)
public void setLocale(java.lang.String locale)
public void setMarkAsCompiled(boolean markAsCompiled)
public void setClosurePass(boolean closurePass)
public void setPreserveClosurePrimitives(boolean preserveClosurePrimitives)
public boolean shouldPreservesGoogProvidesAndRequires()
public boolean shouldPreserveGoogModule()
public boolean shouldPreserveGoogLibraryPrimitives()
public void setPreserveTypeAnnotations(boolean preserveTypeAnnotations)
public void setGatherCssNames(boolean gatherCssNames)
public void setStripTypes(java.util.Set<java.lang.String> stripTypes)
public void setStripNameSuffixes(java.util.Set<java.lang.String> stripNameSuffixes)
public void setStripNamePrefixes(java.util.Set<java.lang.String> stripNamePrefixes)
public void setStripTypePrefixes(java.util.Set<java.lang.String> stripTypePrefixes)
public void addCustomPass(CustomPassExecutionTime time, CompilerPass customPass)
public void setDefineReplacements(java.util.Map<java.lang.String,java.lang.Object> defineReplacements)
public void setTweakReplacements(java.util.Map<java.lang.String,java.lang.Object> tweakReplacements)
public void setMoveFunctionDeclarations(boolean moveFunctionDeclarations)
public void setCssRenamingMap(CssRenamingMap cssRenamingMap)
public void setCssRenamingWhitelist(java.util.Set<java.lang.String> whitelist)
public void setReplaceStringsFunctionDescriptions(java.util.List<java.lang.String> replaceStringsFunctionDescriptions)
public void setReplaceStringsPlaceholderToken(java.lang.String replaceStringsPlaceholderToken)
public void setReplaceStringsReservedStrings(java.util.Set<java.lang.String> replaceStringsReservedStrings)
public void setReplaceStringsInputMap(VariableMap serializedMap)
public void setPrettyPrint(boolean prettyPrint)
public boolean isPrettyPrint()
public void setLineBreak(boolean lineBreak)
public boolean getPreferLineBreakAtEndOfFile()
public void setPreferLineBreakAtEndOfFile(boolean lineBreakAtEnd)
public void setPrintInputDelimiter(boolean printInputDelimiter)
public void setInputDelimiter(java.lang.String inputDelimiter)
public void setQuoteKeywordProperties(boolean quoteKeywordProperties)
public boolean shouldQuoteKeywordProperties()
public void setErrorFormat(ErrorFormat errorFormat)
public ErrorFormat getErrorFormat()
public void setWarningsGuard(ComposeWarningsGuard warningsGuard)
public void setLineLengthThreshold(int lineLengthThreshold)
public int getLineLengthThreshold()
public void setUseOriginalNamesInOutput(boolean useOriginalNamesInOutput)
public boolean getUseOriginalNamesInOutput()
public void setExternExports(boolean externExports)
public void setExternExportsPath(java.lang.String externExportsPath)
public void setSourceMapOutputPath(java.lang.String sourceMapOutputPath)
public void setApplyInputSourceMaps(boolean applyInputSourceMaps)
public void setResolveSourceMapAnnotations(boolean resolveSourceMapAnnotations)
public void setSourceMapIncludeSourcesContent(boolean sourceMapIncludeSourcesContent)
public void setParseInlineSourceMaps(boolean parseInlineSourceMaps)
public void setSourceMapDetailLevel(SourceMap.DetailLevel sourceMapDetailLevel)
public void setSourceMapFormat(SourceMap.Format sourceMapFormat)
public void setSourceMapLocationMappings(java.util.List<? extends SourceMap.LocationMapping> sourceMapLocationMappings)
public void setTransformAMDToCJSModules(boolean transformAMDToCJSModules)
public void setProcessCommonJSModules(boolean processCommonJSModules)
public boolean getProcessCommonJSModules()
public void setEs6ModuleTranspilation(CompilerOptions.Es6ModuleTranspilation value)
public CompilerOptions.Es6ModuleTranspilation getEs6ModuleTranspilation()
public void setCommonJSModulePathPrefix(java.lang.String commonJSModulePathPrefix)
setModuleRoots(List)
).public void setModuleRoots(java.util.List<java.lang.String> moduleRoots)
public void setRewritePolyfills(boolean rewritePolyfills)
public boolean getRewritePolyfills()
public void setForceLibraryInjection(java.lang.Iterable<java.lang.String> libraries)
public void setPreventLibraryInjection(boolean preventLibraryInjection)
public void setInstrumentForCoverage(boolean instrumentForCoverage)
public void setInstrumentBranchCoverage(boolean instrumentBranchCoverage)
public final com.google.common.collect.ImmutableList<ConformanceConfig> getConformanceConfigs()
@GwtIncompatible(value="Conformance") public void setConformanceConfig(ConformanceConfig conformanceConfig)
@GwtIncompatible(value="Conformance") public void setConformanceConfigs(java.util.List<ConformanceConfig> configs)
public void clearConformanceConfigs()
public boolean shouldEmitUseStrict()
public CompilerOptions setEmitUseStrict(boolean emitUseStrict)
public ModuleLoader.ResolutionMode getModuleResolutionMode()
public void setModuleResolutionMode(ModuleLoader.ResolutionMode moduleResolutionMode)
public com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> getBrowserResolverPrefixReplacements()
public void setBrowserResolverPrefixReplacements(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> browserResolverPrefixReplacements)
public void setPathEscaper(ModuleLoader.PathEscaper pathEscaper)
public ModuleLoader.PathEscaper getPathEscaper()
public java.util.List<java.lang.String> getPackageJsonEntryNames()
public void setPackageJsonEntryNames(java.util.List<java.lang.String> names)
public void setUseSizeHeuristicToStopOptimizationLoop(boolean mayStopEarly)
public void setMaxOptimizationLoopIterations(int maxIterations)
@GwtIncompatible(value="ObjectOutputStream") public void serialize(java.io.OutputStream objectOutputStream) throws java.io.IOException
java.io.IOException
@GwtIncompatible(value="ObjectInputStream") public static CompilerOptions deserialize(java.io.InputStream objectInputStream) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean expectStrictModeInput()
public CompilerOptions setStrictModeInput(boolean isStrictModeInput)
public char[] getPropertyReservedNamingFirstChars()
public char[] getPropertyReservedNamingNonFirstChars()
Copyright © 2009-2019 Google. All Rights Reserved.