public class PrecompileTaskOptionsImpl extends Object implements PrecompileTaskOptions
OptionMethodNameDisplayMode.Mode
OptionJsInteropMode.Mode
OPTIMIZE_LEVEL_DEFAULT, OPTIMIZE_LEVEL_DRAFT, OPTIMIZE_LEVEL_MAX
Constructor and Description |
---|
PrecompileTaskOptionsImpl() |
PrecompileTaskOptionsImpl(CompileTaskOptions other) |
PrecompileTaskOptionsImpl(JJSOptions other) |
PrecompileTaskOptionsImpl(PrecompileTaskOptions other) |
Modifier and Type | Method and Description |
---|---|
void |
addModuleName(String moduleName)
Sets the name of the module.
|
void |
copyFrom(CompileTaskOptions other) |
void |
copyFrom(JJSOptions other) |
void |
copyFrom(PrecompileTaskOptions other) |
boolean |
enforceStrictPublicResources()
Returns true if the compiler should not implicitly add a "public" dependency.
|
boolean |
enforceStrictSourceResources()
Returns true if the compiler should not implicitly add a "client" dependency.
|
File |
getCompilerWorkDir(String moduleName) |
Properties |
getFinalProperties()
Returns the final properties.
|
int |
getFragmentCount() |
int |
getFragmentsMerge() |
File |
getGenDir()
Returns the generated resource directory.
|
OptionJsInteropMode.Mode |
getJsInteropMode() |
List<String> |
getLibraryPaths()
Returns the list of paths to input libraries.
|
TreeLogger.Type |
getLogLevel()
Returns the tree logger level.
|
int |
getMaxPermsPerPrecompile()
Get the maximum number of permutations per precompile.
|
OptionMethodNameDisplayMode.Mode |
getMethodNameDisplayMode() |
File |
getMissingDepsFile()
Returns the missing dependencies file.
|
List<String> |
getModuleNames()
Returns the list of module names.
|
JsNamespaceOption |
getNamespace() |
int |
getOptimizationLevel()
Returns the compiler's requested optimization level.
|
JsOutputOption |
getOutput()
Returns the compiler output style.
|
String |
getOutputLibraryPath()
Returns the output library path.
|
SourceLevel |
getSourceLevel() |
String |
getSourceMapFilePrefix()
Returns the prefix to be added (or null for no prefix).
|
File |
getWorkDir()
Returns the compiler work directory.
|
boolean |
isAggressivelyOptimize()
Deprecated.
|
boolean |
isCastCheckingDisabled() |
boolean |
isClassMetadataDisabled() |
boolean |
isClosureCompilerEnabled() |
boolean |
isCompilerMetricsEnabled()
Returns true if the compiler should output compilation metrics.
|
boolean |
isDraftCompile() |
boolean |
isEnableAssertions()
Returns true if the compiler should generate code to check assertions.
|
boolean |
isEnabledGeneratingOnShards()
Returns
true if generation is allowed to happen on shards. |
boolean |
isIncrementalCompileEnabled()
Whether monolithic recompiles should process only changed files and construct JS output by
linking old and new JS on a per class basis.
|
boolean |
isJsonSoycEnabled()
Returns true if the compiler should record and emit Compile Report information in json format.
|
boolean |
isOptimizePrecompile()
Returns true if the compiler should lightly optimize the raw AST before any permutation work.
|
boolean |
isRunAsyncEnabled()
Returns true if the compiler should code-split at runAsync boundaries.
|
boolean |
isSoycEnabled()
Returns true if the compiler should gather Story Of Your Compile data.
|
boolean |
isSoycExtra()
Returns true if the compiler should record and emit extra Compile Report information.
|
boolean |
isSoycHtmlDisabled()
Returns false if the compiler should produce HTML SOYC compile reports in
addition to XML reports.
|
boolean |
isStrict()
Returns true if the compiler should strictly fail when any input file has compilation errors.
|
boolean |
isUpdateCheckDisabled()
Check to see if update checks are disabled.
|
boolean |
isValidateOnly()
Returns true the compiler should only validate.
|
void |
setAddRuntimeChecks(boolean enabled) |
void |
setAggressivelyOptimize(boolean aggressivelyOptimize)
Deprecated.
|
void |
setCastCheckingDisabled(boolean disabled) |
void |
setClassMetadataDisabled(boolean disabled) |
void |
setClosureCompilerEnabled(boolean enabled) |
void |
setClusterSimilarFunctions(boolean enabled)
Sets whether or not the compiler should cluster similar functions.
|
void |
setCompilerMetricsEnabled(boolean enabled)
Sets whether or not the compiler should output compilation metrics.
|
void |
setDisableUpdateCheck(boolean disabled)
Sets the disable update check flag.
|
void |
setEnableAssertions(boolean enableAssertions)
Sets whether or not the compiler should generate code to check assertions.
|
void |
setEnabledGeneratingOnShards(boolean enabled)
Sets whether generation may happen on shards.
|
void |
setEnforceStrictPublicResources(boolean strictPublicResources)
Sets whether the compiler should not implicitly add a "public" dependency.
|
void |
setEnforceStrictSourceResources(boolean strictSourceResources)
Sets whether the compiler should not implicitly add a "client" dependency.
|
void |
setFinalProperties(Properties finalProperties)
Sets the list of paths to input libraries.
|
void |
setFragmentCount(int numFragments) |
void |
setFragmentsMerge(int numFragments) |
void |
setGenDir(File genDir)
Sets the generated resource directory.
|
void |
setIncrementalCompileEnabled(boolean enabled)
Sets whether or not monolithic recompiles should process only changed files.
|
void |
setInlineLiteralParameters(boolean enabled)
Sets whether or not the compiler should inline literal parameters.
|
void |
setJsInteropMode(OptionJsInteropMode.Mode mode) |
void |
setJsonSoycEnabled(boolean enabled)
Sets whether or not the compiler should record and emit Compile Report information in json
format.
|
void |
setLibraryPaths(List<String> libraryPaths)
Sets the list of paths to input libraries.
|
void |
setLink(boolean link)
Sets whether the separate compiler should link compiled output and supplied precompiled
libraries into a usable result.
|
void |
setLogLevel(TreeLogger.Type logLevel)
Sets the tree logger level.
|
void |
setMaxPermsPerPrecompile(int maxPermsPerPrecompile)
Sets the maximum number of permutations to compile at once.
|
void |
setMethodNameDisplayMode(OptionMethodNameDisplayMode.Mode methodNameDisplayMode) |
void |
setMissingDepsFile(File missingDepsFile)
Sets the missing dependency file.
|
void |
setModuleNames(List<String> moduleNames)
Sets the list of module names.
|
void |
setNamespace(JsNamespaceOption newValue) |
void |
setOptimizationLevel(int level)
Sets the compiler's requested optimization level.
|
void |
setOptimizeDataflow(boolean enabled)
Sets whether or not the compiler should optimize dataflow.
|
void |
setOptimizePrecompile(boolean optimize)
Sets whether or not the compiler should lightly optimize the raw AST before any permutation
work.
|
void |
setOrdinalizeEnums(boolean enabled)
Sets whether or not the compiler should ordinalize enums.
|
void |
setOutput(JsOutputOption output)
Sets the compiler output style.
|
void |
setOutputLibraryPath(String outputLibraryPath)
Sets the output library path.
|
void |
setRemoveDuplicateFunctions(boolean enabled)
Sets whether or not the compiler should remove duplicate functions.
|
void |
setRunAsyncEnabled(boolean enabled)
Sets whether or not the compiler should code-split at runAsync boundaries.
|
void |
setSaveSource(boolean enabled)
If set to true and sourcemaps are on, source code will be saved.
|
void |
setSourceLevel(SourceLevel sourceLevel) |
void |
setSourceMapFilePrefix(String path)
Sets the prefix.
|
void |
setSoycEnabled(boolean enabled)
Sets whether or not the compiler should gather Story Of Your Compile data.
|
void |
setSoycExtra(boolean soycExtra)
Sets whether or not the compiler should record and emit extra Compile Report
information.
|
void |
setSoycHtmlDisabled(boolean disabled)
Sets whether or not the compiler should produce HTML compile reports in
addition to SOYC XML output.
|
void |
setStrict(boolean strict)
Sets whether or not the compiler should strictly fail when any input file has compilation
errors.
|
void |
setUseDetailedTypeIds(boolean detailed)
Sets whether or not type ids should be detailed.
|
void |
setValidateOnly(boolean validateOnly)
Sets whether or not the compiler should only validate.
|
void |
setWarnMissingDeps(boolean showMissingDepsWarnings)
Sets whether or not to warn when modules are missing dependencies necessary to satisfy type
references in their provided source.
|
void |
setWarnOverlappingSource(boolean warnOverlappingSource)
Sets whether or not to warn when more than one module includes the same source files.
|
void |
setWorkDir(File workDir)
Sets the compiler work directory.
|
boolean |
shouldAddRuntimeChecks() |
boolean |
shouldClusterSimilarFunctions()
Returns true if the compiler should cluster similar functions.
|
boolean |
shouldInlineLiteralParameters()
Returns true if the compiler should inline literal parameters.
|
boolean |
shouldJDTInlineCompileTimeConstants()
Whether constant inlining is done at the AST construction time or not.
|
boolean |
shouldLink()
Whether the separate compiler should link compiled output and supplied precompiled libraries
into a usable result.
|
boolean |
shouldOptimizeDataflow()
Returns true if the compiler should optimize dataflow.
|
boolean |
shouldOrdinalizeEnums()
Returns true if the compiler should ordinalize enums.
|
boolean |
shouldRemoveDuplicateFunctions()
Returns true if the compiler should remove duplicate functions.
|
boolean |
shouldSaveSource()
Returns false if source code should not be saved.
|
boolean |
useDetailedTypeIds()
Whether type ids in the compilation output should be detailed.
|
boolean |
warnMissingDeps()
Whether or not to warn on when modules are missing dependencies necessary to satisfy type
references in their provided source.
|
boolean |
warnOverlappingSource()
Whether or not to warn when more than one module includes the same source files.
|
addModuleName, getModuleNames, setModuleNames
getLogLevel, setLogLevel
getWorkDir, setWorkDir
getOutputLibraryPath, setOutputLibraryPath
getLibraryPaths, setLibraryPaths
getFinalProperties, setFinalProperties
setLink, shouldLink
public PrecompileTaskOptionsImpl()
public PrecompileTaskOptionsImpl(CompileTaskOptions other)
public PrecompileTaskOptionsImpl(JJSOptions other)
public PrecompileTaskOptionsImpl(PrecompileTaskOptions other)
public void copyFrom(JJSOptions other)
public void copyFrom(PrecompileTaskOptions other)
public boolean enforceStrictPublicResources()
OptionStrictPublicResources
enforceStrictPublicResources
in interface OptionStrictPublicResources
public boolean enforceStrictSourceResources()
OptionStrictSourceResources
enforceStrictSourceResources
in interface OptionStrictSourceResources
public int getFragmentCount()
getFragmentCount
in interface OptionFragmentCount
public int getFragmentsMerge()
getFragmentsMerge
in interface OptionFragmentsMerge
public File getGenDir()
OptionGenDir
getGenDir
in interface OptionGenDir
public int getMaxPermsPerPrecompile()
OptionMaxPermsPerPrecompile
getMaxPermsPerPrecompile
in interface OptionMaxPermsPerPrecompile
public OptionMethodNameDisplayMode.Mode getMethodNameDisplayMode()
getMethodNameDisplayMode
in interface OptionMethodNameDisplayMode
public File getMissingDepsFile()
OptionMissingDepsFile
getMissingDepsFile
in interface OptionMissingDepsFile
public JsNamespaceOption getNamespace()
getNamespace
in interface OptionNamespace
public int getOptimizationLevel()
OptionOptimize
getOptimizationLevel
in interface OptionOptimize
public JsOutputOption getOutput()
OptionScriptStyle
getOutput
in interface OptionScriptStyle
public SourceLevel getSourceLevel()
getSourceLevel
in interface OptionSourceLevel
public String getSourceMapFilePrefix()
OptionSourceMapFilePrefix
getSourceMapFilePrefix
in interface OptionSourceMapFilePrefix
@Deprecated public boolean isAggressivelyOptimize()
OptionAggressivelyOptimize
isAggressivelyOptimize
in interface OptionAggressivelyOptimize
public boolean isCastCheckingDisabled()
isCastCheckingDisabled
in interface OptionDisableCastChecking
public boolean isClassMetadataDisabled()
isClassMetadataDisabled
in interface OptionDisableClassMetadata
public boolean isClosureCompilerEnabled()
isClosureCompilerEnabled
in interface OptionEnableClosureCompiler
public boolean isCompilerMetricsEnabled()
OptionCompilerMetricsEnabled
isCompilerMetricsEnabled
in interface OptionCompilerMetricsEnabled
public boolean isDraftCompile()
public boolean isEnableAssertions()
OptionEnableAssertions
isEnableAssertions
in interface OptionEnableAssertions
public boolean isEnabledGeneratingOnShards()
OptionEnableGeneratingOnShards
true
if generation is allowed to happen on shards.isEnabledGeneratingOnShards
in interface OptionEnableGeneratingOnShards
public boolean isJsonSoycEnabled()
OptionJsonSoycEnabled
isJsonSoycEnabled
in interface OptionJsonSoycEnabled
public boolean isOptimizePrecompile()
OptionOptimizePrecompile
isOptimizePrecompile
in interface OptionOptimizePrecompile
public boolean isRunAsyncEnabled()
OptionRunAsyncEnabled
isRunAsyncEnabled
in interface OptionRunAsyncEnabled
public boolean isSoycEnabled()
OptionSoycEnabled
isSoycEnabled
in interface OptionSoycEnabled
public boolean isSoycExtra()
OptionSoycDetailed
isSoycExtra
in interface OptionSoycDetailed
public boolean isSoycHtmlDisabled()
OptionSoycHtmlDisabled
isSoycHtmlDisabled
in interface OptionSoycHtmlDisabled
public boolean isStrict()
OptionStrict
isStrict
in interface OptionStrict
public boolean isUpdateCheckDisabled()
OptionDisableUpdateCheck
isUpdateCheckDisabled
in interface OptionDisableUpdateCheck
public boolean isValidateOnly()
OptionValidateOnly
isValidateOnly
in interface OptionValidateOnly
public void setAddRuntimeChecks(boolean enabled)
setAddRuntimeChecks
in interface OptionCheckedMode
@Deprecated public void setAggressivelyOptimize(boolean aggressivelyOptimize)
OptionAggressivelyOptimize
setAggressivelyOptimize
in interface OptionAggressivelyOptimize
public void setCastCheckingDisabled(boolean disabled)
setCastCheckingDisabled
in interface OptionDisableCastChecking
public void setClassMetadataDisabled(boolean disabled)
setClassMetadataDisabled
in interface OptionDisableClassMetadata
public void setClosureCompilerEnabled(boolean enabled)
setClosureCompilerEnabled
in interface OptionEnableClosureCompiler
public void setClusterSimilarFunctions(boolean enabled)
OptionClusterSimilarFunctions
setClusterSimilarFunctions
in interface OptionClusterSimilarFunctions
public void setIncrementalCompileEnabled(boolean enabled)
OptionIncrementalCompile
setIncrementalCompileEnabled
in interface OptionIncrementalCompile
public void setCompilerMetricsEnabled(boolean enabled)
OptionCompilerMetricsEnabled
setCompilerMetricsEnabled
in interface OptionCompilerMetricsEnabled
public void setDisableUpdateCheck(boolean disabled)
OptionDisableUpdateCheck
setDisableUpdateCheck
in interface OptionDisableUpdateCheck
public void setEnableAssertions(boolean enableAssertions)
OptionEnableAssertions
setEnableAssertions
in interface OptionEnableAssertions
public void setEnabledGeneratingOnShards(boolean enabled)
OptionEnableGeneratingOnShards
setEnabledGeneratingOnShards
in interface OptionEnableGeneratingOnShards
public void setEnforceStrictPublicResources(boolean strictPublicResources)
OptionStrictPublicResources
setEnforceStrictPublicResources
in interface OptionStrictPublicResources
public void setEnforceStrictSourceResources(boolean strictSourceResources)
OptionStrictSourceResources
setEnforceStrictSourceResources
in interface OptionStrictSourceResources
public void setFragmentCount(int numFragments)
setFragmentCount
in interface OptionFragmentCount
public void setFragmentsMerge(int numFragments)
setFragmentsMerge
in interface OptionFragmentsMerge
public void setGenDir(File genDir)
OptionGenDir
setGenDir
in interface OptionGenDir
public void setInlineLiteralParameters(boolean enabled)
OptionInlineLiteralParameters
setInlineLiteralParameters
in interface OptionInlineLiteralParameters
public void setJsonSoycEnabled(boolean enabled)
OptionJsonSoycEnabled
setJsonSoycEnabled
in interface OptionJsonSoycEnabled
public void setMaxPermsPerPrecompile(int maxPermsPerPrecompile)
OptionMaxPermsPerPrecompile
setMaxPermsPerPrecompile
in interface OptionMaxPermsPerPrecompile
public void setMethodNameDisplayMode(OptionMethodNameDisplayMode.Mode methodNameDisplayMode)
setMethodNameDisplayMode
in interface OptionMethodNameDisplayMode
public void setMissingDepsFile(File missingDepsFile)
OptionMissingDepsFile
setMissingDepsFile
in interface OptionMissingDepsFile
public void setNamespace(JsNamespaceOption newValue)
setNamespace
in interface OptionNamespace
public void setOptimizationLevel(int level)
OptionOptimize
setOptimizationLevel
in interface OptionOptimize
public void setOptimizeDataflow(boolean enabled)
OptionOptimizeDataflow
setOptimizeDataflow
in interface OptionOptimizeDataflow
public void setOptimizePrecompile(boolean optimize)
OptionOptimizePrecompile
setOptimizePrecompile
in interface OptionOptimizePrecompile
public void setOrdinalizeEnums(boolean enabled)
OptionOrdinalizeEnums
setOrdinalizeEnums
in interface OptionOrdinalizeEnums
public void setOutput(JsOutputOption output)
OptionScriptStyle
setOutput
in interface OptionScriptStyle
public void setRemoveDuplicateFunctions(boolean enabled)
OptionRemoveDuplicateFunctions
setRemoveDuplicateFunctions
in interface OptionRemoveDuplicateFunctions
public void setRunAsyncEnabled(boolean enabled)
OptionRunAsyncEnabled
setRunAsyncEnabled
in interface OptionRunAsyncEnabled
public void setSaveSource(boolean enabled)
OptionSaveSource
setSaveSource
in interface OptionSaveSource
public void setSourceLevel(SourceLevel sourceLevel)
setSourceLevel
in interface OptionSourceLevel
public void setSourceMapFilePrefix(String path)
OptionSourceMapFilePrefix
setSourceMapFilePrefix
in interface OptionSourceMapFilePrefix
public void setSoycEnabled(boolean enabled)
OptionSoycEnabled
setSoycEnabled
in interface OptionSoycEnabled
public void setSoycExtra(boolean soycExtra)
OptionSoycDetailed
setSoycExtra
in interface OptionSoycDetailed
public void setSoycHtmlDisabled(boolean disabled)
OptionSoycHtmlDisabled
setSoycHtmlDisabled
in interface OptionSoycHtmlDisabled
public void setStrict(boolean strict)
OptionStrict
setStrict
in interface OptionStrict
public void setUseDetailedTypeIds(boolean detailed)
OptionUseDetailedTypeIds
setUseDetailedTypeIds
in interface OptionUseDetailedTypeIds
public void setValidateOnly(boolean validateOnly)
OptionValidateOnly
setValidateOnly
in interface OptionValidateOnly
public void setWarnOverlappingSource(boolean warnOverlappingSource)
OptionWarnOverlappingSource
setWarnOverlappingSource
in interface OptionWarnOverlappingSource
public void setWarnMissingDeps(boolean showMissingDepsWarnings)
OptionWarnMissingDeps
setWarnMissingDeps
in interface OptionWarnMissingDeps
public boolean shouldAddRuntimeChecks()
shouldAddRuntimeChecks
in interface OptionCheckedMode
public boolean shouldClusterSimilarFunctions()
OptionClusterSimilarFunctions
shouldClusterSimilarFunctions
in interface OptionClusterSimilarFunctions
public boolean isIncrementalCompileEnabled()
OptionIncrementalCompile
isIncrementalCompileEnabled
in interface OptionIncrementalCompile
public boolean shouldInlineLiteralParameters()
OptionInlineLiteralParameters
shouldInlineLiteralParameters
in interface OptionInlineLiteralParameters
public boolean shouldJDTInlineCompileTimeConstants()
OptionAllowJDTConstantInlining
shouldJDTInlineCompileTimeConstants
in interface OptionAllowJDTConstantInlining
public boolean shouldOptimizeDataflow()
OptionOptimizeDataflow
shouldOptimizeDataflow
in interface OptionOptimizeDataflow
public boolean shouldOrdinalizeEnums()
OptionOrdinalizeEnums
shouldOrdinalizeEnums
in interface OptionOrdinalizeEnums
public boolean shouldRemoveDuplicateFunctions()
OptionRemoveDuplicateFunctions
shouldRemoveDuplicateFunctions
in interface OptionRemoveDuplicateFunctions
public boolean shouldSaveSource()
OptionSaveSource
shouldSaveSource
in interface OptionSaveSource
public boolean useDetailedTypeIds()
OptionUseDetailedTypeIds
useDetailedTypeIds
in interface OptionUseDetailedTypeIds
public boolean warnOverlappingSource()
OptionWarnOverlappingSource
warnOverlappingSource
in interface OptionWarnOverlappingSource
public boolean warnMissingDeps()
OptionWarnMissingDeps
warnMissingDeps
in interface OptionWarnMissingDeps
public OptionJsInteropMode.Mode getJsInteropMode()
getJsInteropMode
in interface OptionJsInteropMode
public void setJsInteropMode(OptionJsInteropMode.Mode mode)
setJsInteropMode
in interface OptionJsInteropMode
public void addModuleName(String moduleName)
OptionModuleName
addModuleName
in interface OptionModuleName
public void copyFrom(CompileTaskOptions other)
public Properties getFinalProperties()
OptionFinalProperties
getFinalProperties
in interface OptionFinalProperties
public List<String> getLibraryPaths()
OptionLibraryPaths
getLibraryPaths
in interface OptionLibraryPaths
public TreeLogger.Type getLogLevel()
OptionLogLevel
getLogLevel
in interface OptionLogLevel
public List<String> getModuleNames()
OptionModuleName
getModuleNames
in interface OptionModuleName
public String getOutputLibraryPath()
OptionOutputLibraryPath
getOutputLibraryPath
in interface OptionOutputLibraryPath
public File getWorkDir()
OptionWorkDir
getWorkDir
in interface OptionWorkDir
public void setFinalProperties(Properties finalProperties)
OptionFinalProperties
setFinalProperties
in interface OptionFinalProperties
public void setLibraryPaths(List<String> libraryPaths)
OptionLibraryPaths
setLibraryPaths
in interface OptionLibraryPaths
public void setLink(boolean link)
OptionLink
setLink
in interface OptionLink
public void setLogLevel(TreeLogger.Type logLevel)
OptionLogLevel
setLogLevel
in interface OptionLogLevel
public void setModuleNames(List<String> moduleNames)
OptionModuleName
setModuleNames
in interface OptionModuleName
public void setOutputLibraryPath(String outputLibraryPath)
OptionOutputLibraryPath
setOutputLibraryPath
in interface OptionOutputLibraryPath
public void setWorkDir(File workDir)
OptionWorkDir
setWorkDir
in interface OptionWorkDir
public boolean shouldLink()
OptionLink
shouldLink
in interface OptionLink
Copyright © 2018. All rights reserved.