public class JSConfiguration extends Configuration
JSConfiguration class holds all compiler arguments needed for
compiling ActionScript to JavaScript.
Specific flags are implemented here for the configuration to be loaded by the
configure() method of MXMLJSC.
This class inherits all compiler arguments from the MXMLC compiler.
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
targets |
AIR_HOME_TOKEN, AS3, date, dateFormat, DEFAULT_OUTPUT_DIRECTORY_TOKEN, ES, FLEX_VERSION_TOKEN, includeFilesNamePath, langs, locales, MXML_CURRENT_VERSION, MXML_EARLIEST_MAJOR_VERSION, MXML_LATEST_MAJOR_VERSION, MXML_LATEST_MINOR_VERSION, MXML_VERSION_2_0, MXML_VERSION_2_0_1, MXML_VERSION_3_0, MXML_VERSION_4_0, MXML_VERSION_4_5, MXML_VERSION_4_6, MXML_VERSION_4_7, PLAYERGLOBAL_HOME_TOKEN, reportMissingCompilerLibraries, reportMissingCompilerSwfLibraries, STRICT, SWC_AIRGLOBAL, TARGET_PLAYER_MAJOR_VERSION_MIN, TARGET_PLAYER_MINOR_VERSION_MIN| Constructor and Description |
|---|
JSConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getCompilerJsExternalLibraryPath() |
List<String> |
getCompilerJsLibraryPath() |
List<MXMLNamespaceMapping> |
getCompilerJsNamespacesManifestMappings() |
List<String> |
getCompilerTargets() |
Map<String,String> |
getJsCompilerDefine() |
boolean |
getJsComplexImplicitCoercions() |
boolean |
getJsDefaultInitializers() |
boolean |
getJsDynamicAccessUnknownMembers() |
String |
getJsLoadConfig() |
boolean |
getJsResolveUncertain() |
String |
getJsVectorEmulationClass() |
boolean |
getJsVectorIndexChecks() |
String |
getJsxFactory() |
String |
getModuleOutput()
if used, the js-debug and js-release folders are calculated by removing
the folders specified from the output folder.
|
String |
getOutput() |
boolean |
getSourceMap() |
void |
setCompilerJsExternalLibraryPath(ConfigurationValue cv,
String[] pathlist) |
void |
setCompilerJsLibraryPath(ConfigurationValue cv,
String[] pathlist)
Links SWC files to the resulting application SWF file.
|
void |
setCompilerJsNamespacesNamespace(ConfigurationValue cfgval,
List<String> args)
Configures a list of many manifests mapped to a single namespace URI.
|
void |
setCompilerTargets(ConfigurationValue cv,
String[] targetlist)
The list of compiler outputs to generate
|
void |
setJsCompilerDefine(ConfigurationValue cv,
String name,
String value) |
void |
setJsComplexImplicitCoercions(ConfigurationValue cv,
boolean value)
Support for including/avoiding more complex implicit assignment coercions
example
var array:Array = [new MyClass()];
var myOtherClass:MyOtherClass = array[0];
In the above example, the compiler will (by default) output an implicit coercion
that is equivalent in actionscript to:
var myOtherClass:MyOtherClass = MyOtherClass(array[0]);
By setting this configuration option to false, the implicit coercion code in situations similar to the above
is not generated (other primitive implicit coercions, such as int/uint/Number/String and Boolean coercions remain)
This is a global setting for the current source code being compiled, it is possible to leave it on and specifically avoid it via doc
settings.
|
void |
setJsDefaultInitializers(ConfigurationValue cv,
boolean value) |
void |
setJsDynamicAccessUnknownMembers(ConfigurationValue cv,
boolean value)
If the definition of a member cannot be resolved, emit dynamic access
instead of normal member access.
|
void |
setJsLoadConfig(ConfigurationValue cv,
String filename)
Placeholder.
|
void |
setJsOutput(ConfigurationValue val,
String output) |
void |
setJSOutputType(ConfigurationValue cv,
String value) |
void |
setJsResolveUncertain(ConfigurationValue cv,
boolean value)
Support for avoiding more overhead of resolving instantiations from
unknown constructors
example
var myClass:Class = String;
var myString:* = new myClass("test");
In the above example, the compiler will (by default) output
a call to a Language.resolveUncertain method which wraps the 'new myClass("test")'
This normalizes the return value for some primitive constructors, so that (for example)
strict equality and inequality operators provide the same results between compiler
targets.
|
void |
setJsVectorEmulationClass(ConfigurationValue cv,
String b)
The class to use instead of default Vector implementation for handling Vector.
|
void |
setJsVectorIndexChecks(ConfigurationValue cv,
boolean value)
Support for avoiding more overhead of adding checks into
assignments via Vector index access
example
var myVector:Vector.
|
void |
setJsxFactory(ConfigurationValue cv,
String value)
Customize the factory to use for JSX.
|
void |
setModuleOutput(ConfigurationValue val,
String output) |
void |
setSourceMap(ConfigurationValue cv,
boolean value) |
addThemeCssFiles, assertThatAllPathsAreDirectories, csetCompilerWarnDuplicateVariableDef, debug, expandTokens, expandTokens, getAdjustOpDebugLine, getAliases, getAllowSourcePathOverlap, getApiReport, getApplicationDomain, getBindingEventHandlerClass, getBindingEventHandlerEvent, getBindingEventHandlerInterface, getBindingValueChangeEvent, getBindingValueChangeEventKind, getBindingValueChangeEventType, getByteArrayEmbedClass, getCompilerAccessible, getCompilerActionscriptFileEncoding, getCompilerAllowAbstractClasses, getCompilerAllowImportAliases, getCompilerAllowPrivateConstructors, getCompilerAllowPrivateNameConflicts, getCompilerAllowSubclassOverrides, getCompilerCompatibilityVersion, getCompilerCompatibilityVersionString, getCompilerContextRoot, getCompilerDefaultsCssUrl, getCompilerDefine, getCompilerDoc, getCompilerExternalLibraryPath, getCompilerGenerateAbstractSyntaxTree, getCompilerGeneratedDirectory, getCompilerIncludeLibraries, getCompilerInfoFlex, getCompilerIsolateStyles, getCompilerKeepAs3Metadata, getCompilerLibraryPath, getCompilerLocales, getCompilerMinimumSupportedVersion, getCompilerMinimumSupportedVersionString, getCompilerMxmlChildrenAsData, getCompilerMxmlCompatibilityVersion, getCompilerMxmlCompatibilityVersionString, getCompilerMxmlImplicitImports, getCompilerMxmlMajorCompatibilityVersion, getCompilerMxmlMinimumSupportedVersion, getCompilerMxmlMinimumSupportedVersionString, getCompilerMxmlMinorCompatibilityVersion, getCompilerMxmlRevisionCompatibilityVersion, getCompilerNamespacesManifestMappings, getCompilerOptimize, getCompilerPreloader, getCompilerResourceBundlePathForLocale, getCompilerServices, getCompilerSourcePath, getCompilerSourcePathInfo, getCompilerStrictIdentifierNames, getCompilerSwfExternalLibraryPath, getCompilerSwfLibraryPath, getCompilerThemeCssFiles, getCompilerThemeFiles, getCompilingForAIR, getComponentFactoryClass, getComponentFactoryInterface, getConfigurationProblems, getCreateTargetWithErrors, getDebugPassword, getDefaultBackgroundColor, getDefaultFrameRate, getDefaultHeight, getDefaultsCSSFiles, getDefaultWidth, getDependencyGraphOutput, getDiagnosticsLevel, getDumpConfig, getEnableRuntimeDesignLayers, getEnableSwcVersionFiltering, getErrorProblems, getExcludeDefaultsCSSFiles, getExterns, getFileSpecs, getForceRsls, getFrameList, getFxgBaseClass, getIgnoreProblems, getIncludeClasses, getIncludeFiles, getIncludeInheritanceDependenciesOnly, getIncludeLookupOnly, getIncludeNamespaces, getIncludeResourceBundles, getIncludes, getIncludeSources, getIncludeStyleSheets, getLinkReport, getLoadConfig, getLocaleDependentSources, getMainDefinition, getMetadataDate, getMetadataDateFormat, getMobile, getOutputPath, getOutputSwcAsDirectory, getPreloader, getProxyBaseClass, getRawMetadata, getRemoveDeadCode, getRemoveUnusedRsls, getReportInvalidStylesAsWarnings, getResourceBundleList, getRslExcludedLibraries, getRslPathInfo, getRuntimeSharedLibraries, getScriptRecursionLimit, getScriptTimeLimit, getShowInvalidCSSPropertyWarnings, getSizeReport, getStatesClass, getStatesEventOverrideClass, getStatesInstanceOverrideClass, getStatesPropertyOverrideClass, getStatesStyleOverrideClass, getStaticLinkRsl, getSwfDebugfileAlias, getSwfVersion, getTargetFile, getTargetFileDirectory, getTargetPlayerMajorVersion, getTargetPlayerMinorVersion, getTargetPlayerRevision, getToolsLocale, getUseDirectBlit, getUseFlashBuilderProjectFiles, getUseGpu, getUseNetwork, getVerifyDigests, getWarningProblems, getWarnings, getWarnOnRoyaleOnlyOptionUsage, isCompilerMxmlMinimumSupportedVersionConfigured, isDebuggingEnabled, isDumpAst, isEnableTelemetry, isExcludeNativeJSLibraries, isHeadlessServer, isInliningEnabled, isRoyale, isStrictXML, isVerbose, keepAllTypeSelectors, metadataExport, omitTraceStatements, optimize, release, reportMissingRequiredSkinPartsAsWarnings, resolvePathStrict, scriptLimitsSet, setApiReport, setApplicationDomain, setAS3, setBenchmark, setCompilerAccessible, setCompilerActionscriptFileEncoding, setCompilerAdjustOpdebugline, setCompilerAllowAbstractClasses, setCompilerAllowImportAliases, setCompilerAllowPrivateConstructors, setCompilerAllowPrivateNameConflicts, setCompilerAllowSourcePathOverlap, setCompilerAllowSubclassOverrides, setCompilerBindingEventHandlerClass, setCompilerBindingEventHandlerEvent, setCompilerBindingEventHandlerInterface, setCompilerBindingValueChangeEvent, setCompilerBindingValueChangeEventKind, setCompilerBindingValueChangeEventType, setCompilerByteArrayEmbedClass, setCompilerComponentFactoryClass, setCompilerComponentFactoryInterface, setCompilerConservative, setCompilerContextRoot, setCompilerDebug, setCompilerDefaultsCssUrl, setCompilerDefine, setCompilerDoc, setCompilerEnableRuntimeDesignLayers, setCompilerEnableSwcVersionFiltering, setCompilerExternalLibraryPath, setCompilerFontsAdvancedAntiAliasing, setCompilerFontsLanguagesLanguageRange, setCompilerFontsLocalFontPaths, setCompilerFontsLocalFontsSnapshot, setCompilerFontsManagers, setCompilerFontsMaxCachedFonts, setCompilerFontsMaxGlyphsPerFace, setCompilerFxgBaseClass, setCompilerGenerateAbstractSyntaxTree, setCompilerGeneratedDirectory, setCompilerHeadlessServer, setCompilerIncludeLibraries, setCompilerIncremental, setCompilerInfoFlex, setCompilerIsolateStyles, setCompilerKeepAllTypeSelectors, setCompilerKeepAs3Metadata, setCompilerKeepGeneratedActionscript, setCompilerKeepGeneratedSignatures, setCompilerLibraryPath, setCompilerLocale, setCompilerMetadataExport, setCompilerMinimumSupportedVersion, setCompilerMxmlChildrenAsData, setCompilerMxmlCompatibilityVersion, setCompilerMxmlImplicitImports, setCompilerMxmlMinimumSupportedVersion, setCompilerMxmlMinimumSupportedVersion, setCompilerMxmlQualifiedTypeSelectors, setCompilerNamespacesNamespace, setCompilerOmitTraceStatements, setCompilerOptimize, setCompilerPreloader, setCompilerProxyBaseClass, setCompilerReportInvalidStylesAsWarnings, setCompilerReportMissingRequiredSkinPartsAsWarnings, setCompilerServices, setCompilerShowActionscriptWarnings, setCompilerShowBindingWarnings, setCompilerShowDependencyWarnings, setCompilerShowDeprecationWarnings, setCompilerShowMultipleDefinitionWarnings, setCompilerShowShadowedDeviceFontWarnings, setCompilerShowUnusedTypeSelectorWarnings, setCompilerSourcePath, setCompilerStatesClass, setCompilerStatesEventOverrideClass, setCompilerStatesInstanceOverrideClass, setCompilerStatesPropertyOverrideClass, setCompilerStatesStyleOverrideClass, setCompilerStrict, setCompilerStrictIdentifierNames, setCompilerSuppressWarningsInIncremental, setCompilerSwfExternalLibraryPath, setCompilerSwfLibraryPath, setCompilerTheme, setCompilerUseResourceBundleMetadata, setCompilerVerboseStacktraces, setCompilerWarnArrayTostringChanges, setCompilerWarnAssignmentWithinConditional, setCompilerWarnBadArrayCast, setCompilerWarnBadBoolAssignment, setCompilerWarnBadDateCast, setCompilerWarnBadEs3TypeMethod, setCompilerWarnBadEs3TypeProp, setCompilerWarnBadNanComparison, setCompilerWarnBadNullAssignment, setCompilerWarnBadNullComparison, setCompilerWarnBadUndefinedComparison, setCompilerWarnBooleanConstructorWithNoArgs, setCompilerWarnChangesInResolve, setCompilerWarnClassIsSealed, setCompilerWarnConstNotInitialized, setCompilerWarnConstructorReturnsValue, setCompilerWarnDeprecatedEventHandlerError, setCompilerWarnDeprecatedFunctionError, setCompilerWarnDeprecatedPropertyError, setCompilerWarnDuplicateArgumentNames, setCompilerWarnForVarInChanges, setCompilerWarnImportHidesClass, setCompilerWarnInstanceOfChanges, setCompilerWarnInternalError, setCompilerWarnLevelNotSupported, setCompilerWarnMissingNamespaceDecl, setCompilerWarnNegativeUintLiteral, setCompilerWarnNoConstructor, setCompilerWarnNoExplicitSuperCallInConstructor, setCompilerWarnNoTypeDecl, setCompilerWarnNumberFromStringChanges, setCompilerWarnScopingChangeInThis, setCompilerWarnSlowTextFieldAddition, setCompilerWarnThisWithinClosure, setCompilerWarnUnlikelyFunctionValue, setCompilerWarnXmlClassHasChanged, setCompress, setComputeDigest, setCreateTargetWithErrors, setDebug, setDebugPassword, setDefaultBackgroundColor, setDefaultFrameRate, setDefaultScriptLimits, setDefaultsCSSFiles, setDefaultSize, setDependencyGraphOutput, setDiagnostics, setDumpAst, setDumpConfig, setEnableInlining, setEnableTelemetry, setEnableTelemetry, setErrorProblems, setES, setExcludeDefaultsCSSFiles, setExcludeNativeJSLibraries, setExtension, setExterns, setFileSpecs, setForceRsls, setFramesFrame, setFramework, setHelp, setIgnoreProblems, setIncludeClasses, setIncludeFiles, setIncludeInheritanceDependenciesOnly, setIncludeLookupOnly, setIncludeNamespaces, setIncludeResourceBundles, setIncludes, setIncludeSources, setIncludeStyleSheets, setLegacyMessageFormat, setLicensesLicense, setLinkReport, setLoadConfig, setLoadExterns, setMainDefinition, setMetadataContributor, setMetadataCreator, setMetadataDate, setMetadataDateFormat, setMetadataDescription, setMetadataLanguage, setMetadataLocalizedDescription, setMetadataLocalizedTitle, setMetadataPublisher, setMetadataTitle, setMobile, setOutput, setOutputSwcAsDirectory, setOverrideStaticLinkRsl, setPathResolver, setRawMetadata, setRemoveDeadCode, setRemoveUnusedRsls, setReportMissingCompilerLibraries, setReportMissingCompilerSwfLibraries, setResourceBundleList, setRoyale, setRuntimeSharedLibraries, setRuntimeSharedLibraryPath, setShowInvalidCssPropertyWarnings, setSizeReport, setStaticLinkRuntimeSharedLibraries, setStrictXML, setStrictXML, setSwfDebugfileAlias, setSwfVersion, setTargetFile, setTargetPlayer, setToolsLocale, setUseDirectBlit, setUseFlashBuilderProjectFiles, setUseGpu, setUseNetwork, setVerbose, setVerifyDigests, setVersion, setWarningProblems, setWarnings, setWarnOnRoyaleOnlyOptionUsage, showBindingWarnings, showDependencyWarnings, showDeprecationWarnings, showMultipleDefinitionWarnings, showUnusedTypeSelectorWarnings, strict, suppressWarningsInIncremental, useCompression, useConservativeAlgorithm, useLegacyMessageFormat, validate, validateNoCompcOnlyOptions, warn_array_tostring_changes, warn_assignment_within_conditional, warn_bad_array_cast, warn_bad_bool_assignment, warn_bad_date_cast, warn_bad_es3_type_method, warn_bad_es3_type_prop, warn_bad_nan_comparison, warn_bad_null_assignment, warn_bad_null_comparison, warn_bad_undefined_comparison, warn_boolean_constructor_with_no_args, warn_changes_in_resolve, warn_class_is_sealed, warn_const_not_initialized, warn_constructor_returns_value, warn_deprecated_event_handler_error, warn_deprecated_function_error, warn_deprecated_property_error, warn_duplicate_argument_names, warn_duplicate_variable_def, warn_for_var_in_changes, warn_import_hides_class, warn_instance_of_changes, warn_internal_error, warn_level_not_supported, warn_missing_namespace_decl, warn_negative_uint_literal, warn_no_constructor, warn_no_explicit_super_call_in_constructor, warn_no_type_decl, warn_number_from_string_changes, warn_scoping_change_in_this, warn_slow_text_field_addition, warn_this_within_closure, warn_unlikely_function_value, warn_xml_class_has_changed, warningspublic void setCompilerTargets(ConfigurationValue cv, String[] targetlist)
public void setJSOutputType(ConfigurationValue cv, String value) throws ConfigurationException
ConfigurationExceptionpublic boolean getSourceMap()
public void setSourceMap(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationExceptionpublic boolean getJsDefaultInitializers()
public void setJsDefaultInitializers(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationExceptionpublic boolean getJsDynamicAccessUnknownMembers()
public void setJsDynamicAccessUnknownMembers(ConfigurationValue cv, boolean value) throws ConfigurationException
myObject.memberAccess becomes myObject["memberAccess"]ConfigurationExceptionpublic void setCompilerJsExternalLibraryPath(ConfigurationValue cv, String[] pathlist) throws ConfigurationException
ConfigurationExceptionpublic void setCompilerJsLibraryPath(ConfigurationValue cv, String[] pathlist) throws ConfigurationException.CannotOpen
public void setJsCompilerDefine(ConfigurationValue cv, String name, String value) throws ConfigurationException
ConfigurationExceptionpublic String getOutput()
getOutput in class Configurationpublic void setJsOutput(ConfigurationValue val, String output) throws ConfigurationException
ConfigurationExceptionpublic String getJsLoadConfig()
public String getModuleOutput()
public void setModuleOutput(ConfigurationValue val, String output) throws ConfigurationException
ConfigurationExceptionpublic void setJsLoadConfig(ConfigurationValue cv, String filename) throws ConfigurationException
ConfigurationExceptionpublic List<MXMLNamespaceMapping> getCompilerJsNamespacesManifestMappings()
public void setCompilerJsNamespacesNamespace(ConfigurationValue cfgval, List<String> args) throws ConfigurationException
cfgval - The configuration value context.args - A List of values for the namespace element, with the first item expected to be the uri and the
remaining are manifest paths.ConfigurationExceptionpublic String getJsVectorEmulationClass()
public void setJsVectorEmulationClass(ConfigurationValue cv, String b)
public boolean getJsComplexImplicitCoercions()
public void setJsComplexImplicitCoercions(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationExceptionpublic boolean getJsResolveUncertain()
public void setJsResolveUncertain(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationExceptionpublic boolean getJsVectorIndexChecks()
public void setJsVectorIndexChecks(ConfigurationValue cv, boolean value) throws ConfigurationException
ConfigurationExceptionpublic String getJsxFactory()
public void setJsxFactory(ConfigurationValue cv, String value) throws ConfigurationException
ConfigurationExceptionCopyright © 2020 The Apache Software Foundation. All rights reserved.