public class JJSOptionsImpl extends Object implements JJSOptions, Serializable
OptionMethodNameDisplayMode.Mode
OPTIMIZE_LEVEL_DEFAULT, OPTIMIZE_LEVEL_DRAFT, OPTIMIZE_LEVEL_MAX
Constructor and Description |
---|
JJSOptionsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(JJSOptions other) |
int |
getFragmentCount() |
int |
getFragmentsMerge() |
WhitelistRegexFilter |
getJsInteropExportFilter() |
OptionMethodNameDisplayMode.Mode |
getMethodNameDisplayMode() |
JsNamespaceOption |
getNamespace() |
int |
getOptimizationLevel()
Returns the compiler's requested optimization level.
|
JsOutputOption |
getOutput()
Returns the compiler output style.
|
SourceLevel |
getSourceLevel() |
boolean |
isClassMetadataDisabled() |
boolean |
isClosureCompilerFormatEnabled() |
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 |
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 |
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.
|
void |
setAddRuntimeChecks(boolean enabled) |
void |
setClassMetadataDisabled(boolean disabled) |
void |
setClosureCompilerFormatEnabled(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 |
setEnableAssertions(boolean enabled)
Sets whether or not the compiler should generate code to check assertions.
|
void |
setFragmentCount(int numFragments) |
void |
setFragmentsMerge(int numFragments) |
void |
setGenerateJsInteropExports(boolean generateExports) |
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 |
setJsonSoycEnabled(boolean enabled)
Sets whether or not the compiler should record and emit Compile Report information in json
format.
|
void |
setMethodNameDisplayMode(OptionMethodNameDisplayMode.Mode methodNameDisplayMode) |
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 |
setOrdinalizeEnums(boolean enabled)
Sets whether or not the compiler should ordinalize enums.
|
void |
setOutput(JsOutputOption output)
Sets the compiler output style.
|
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 |
setSourceLevel(SourceLevel sourceLevel) |
void |
setSoycEnabled(boolean enabled)
Sets whether or not the compiler should gather Story Of Your Compile data.
|
void |
setSoycExtra(boolean enabled)
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 enabled)
Sets whether or not the compiler should strictly fail when any input file has compilation
errors.
|
void |
setUseDetailedTypeIds(boolean enabled)
Sets whether or not type ids should be detailed.
|
boolean |
shouldAddRuntimeChecks() |
boolean |
shouldClusterSimilarFunctions()
Returns true if the compiler should cluster similar functions.
|
boolean |
shouldGenerateJsInteropExports() |
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 |
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 |
useDetailedTypeIds()
Whether type ids in the compilation output should be detailed.
|
public void copyFrom(JJSOptions other)
public int getFragmentCount()
getFragmentCount
in interface OptionFragmentCount
public int getFragmentsMerge()
getFragmentsMerge
in interface OptionFragmentsMerge
public OptionMethodNameDisplayMode.Mode getMethodNameDisplayMode()
getMethodNameDisplayMode
in interface OptionMethodNameDisplayMode
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 boolean isClassMetadataDisabled()
isClassMetadataDisabled
in interface OptionDisableClassMetadata
public boolean isCompilerMetricsEnabled()
OptionCompilerMetricsEnabled
isCompilerMetricsEnabled
in interface OptionCompilerMetricsEnabled
public boolean isDraftCompile()
public boolean isEnableAssertions()
OptionEnableAssertions
isEnableAssertions
in interface OptionEnableAssertions
public boolean isJsonSoycEnabled()
OptionJsonSoycEnabled
isJsonSoycEnabled
in interface OptionJsonSoycEnabled
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 void setAddRuntimeChecks(boolean enabled)
setAddRuntimeChecks
in interface OptionCheckedMode
public void setClassMetadataDisabled(boolean disabled)
setClassMetadataDisabled
in interface OptionDisableClassMetadata
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 setEnableAssertions(boolean enabled)
OptionEnableAssertions
setEnableAssertions
in interface OptionEnableAssertions
public void setFragmentCount(int numFragments)
setFragmentCount
in interface OptionFragmentCount
public void setFragmentsMerge(int numFragments)
setFragmentsMerge
in interface OptionFragmentsMerge
public void setInlineLiteralParameters(boolean enabled)
OptionInlineLiteralParameters
setInlineLiteralParameters
in interface OptionInlineLiteralParameters
public void setJsonSoycEnabled(boolean enabled)
OptionJsonSoycEnabled
setJsonSoycEnabled
in interface OptionJsonSoycEnabled
public void setMethodNameDisplayMode(OptionMethodNameDisplayMode.Mode methodNameDisplayMode)
setMethodNameDisplayMode
in interface OptionMethodNameDisplayMode
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 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 setSourceLevel(SourceLevel sourceLevel)
setSourceLevel
in interface OptionSourceLevel
public void setSoycEnabled(boolean enabled)
OptionSoycEnabled
setSoycEnabled
in interface OptionSoycEnabled
public void setSoycExtra(boolean enabled)
OptionSoycDetailed
setSoycExtra
in interface OptionSoycDetailed
public void setSoycHtmlDisabled(boolean disabled)
OptionSoycHtmlDisabled
setSoycHtmlDisabled
in interface OptionSoycHtmlDisabled
public void setStrict(boolean enabled)
OptionStrict
setStrict
in interface OptionStrict
public void setUseDetailedTypeIds(boolean enabled)
OptionUseDetailedTypeIds
setUseDetailedTypeIds
in interface OptionUseDetailedTypeIds
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 shouldGenerateJsInteropExports()
shouldGenerateJsInteropExports
in interface OptionGenerateJsInteropExports
public void setGenerateJsInteropExports(boolean generateExports)
setGenerateJsInteropExports
in interface OptionGenerateJsInteropExports
public WhitelistRegexFilter getJsInteropExportFilter()
getJsInteropExportFilter
in interface OptionGenerateJsInteropExports
public boolean useDetailedTypeIds()
OptionUseDetailedTypeIds
useDetailedTypeIds
in interface OptionUseDetailedTypeIds
public boolean isClosureCompilerFormatEnabled()
isClosureCompilerFormatEnabled
in interface OptionClosureFormattedOutput
public void setClosureCompilerFormatEnabled(boolean enabled)
setClosureCompilerFormatEnabled
in interface OptionClosureFormattedOutput
Copyright © 2018. All rights reserved.