flex2.tools.oem.Configuration Maven / Gradle / Ivy
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package flex2.tools.oem; import java.io.File; import java.util.List; import java.util.Locale; import java.util.Map; import macromedia.asc.embedding.WarningConstants; /** * The
. * * @param url An instance ofConfiguration
interface allows clients to set compiler options for Application and Library. * The client can not instantiate aConfiguration
object. It can be obtained by invoking the *getDefaultConfiguration()
method inApplication
andLibrary
. * ** Application app = new Application(new File("HelloWorld.mxml")); * Configuration c1 = app.getDefaultConfiguration(); * * Library lib = new Library(); * Configuration c2 = lib.getDefaultConfiguration(); ** * The compiler populates the defaultConfiguration
object with the values inroyale-config.xml
. * If a local configuration file is also available (for example,HelloWorld-config.xml
), the compiler also uses * values in that file to populate theConfiguration
object. The local configuration file's values take precedence * over options set in theroyale-config.xml
file. If you add a configuration file using theaddConfiguration()
* method, that configuration file's options take precedence over those set in royale-config.xml or in a local configuration file; they * do not take precedence over configuration options set using theConfiguration
interface's methods such assetExterns()
. * ** The order of configuration option precedence is as follows (highest first): *
* 1. Methods of the* * @version 2.0.1 * @author Clement Wong */ public interface Configuration { /** * Enables accessibility in the application. * This is equivalent to using theConfiguration
interface such assetExterns()
. * 2. Configuration file loaded with theaddConfiguration()
method. * 3. Local configuration file (such as app_name-config.xml). * 4. The royale-config.xml file. * 5. Default compiler settings. *accessible
option of the mxmlc or compc compilers. * ** The default value is
false
. * * @param b Boolean value that enables or disables accessibility. */ void enableAccessibility(boolean b); /** * Sets the ActionScript file encoding. The compiler uses this encoding to read * the ActionScript source files. * This is equivalent to using theactionscript-file-encoding
option of the mxmlc or compc compilers. * ** The default encoding is
UTF-8
. * * @param encoding The character encoding; for exampleUTF-8
orBig5
. */ void setActionScriptFileEncoding(String encoding); /** * Allows some source path directories to be subdirectories of the other. * This is equivalent to using thecompiler.allow-source-path-overlap
option of the mxmlc or compc compilers. * ** In some J2EE settings, directory overlapping should be allowed; for example: * *
* wwwroot/MyAppRoot * wwwroot/WEB-INF/flex/source_path1 ** ** The default value is
false
. * * @param b Boolean value that allows directory overlapping. */ void allowSourcePathOverlap(boolean b); /** * Uses the ActionScript 3 class-based object model for greater performance and better error reporting. * In the class-based object model, most built-in functions are implemented as fixed methods of classes. * This is equivalent to using thecompiler.as3
option of the mxmlc or compc compilers. * ** The default value is
false
. * * @param b Boolean value that determines whether to use the AS3 class-based object model. */ void useActionScript3(boolean b); /** * Sets the context root path so that the compiler can replace{context.root}
tokens for * service channel endpoints. This is equivalent to using thecompiler.context-root
option * for the mxmlc or compc compilers. * ** By default, this value is undefined. * * @param path An instance of String. */ void setContextRoot(String path); /** * Enables debugging in the application. * This is equivalent to using the
compiler.debug
and-debug-password=true|false
options * for the mxmlc or compc compilers. * ** The default value
debug
isfalse
. The default debug password is "". * * @param b Boolean value that enables or disables debugging. * @param debugPassword A password that is embedded in the application. */ void enableDebugging(boolean b, String debugPassword); /** * Sets the location of the default CSS file. * This is equivalent to using thecompiler.defaults-css-url
option of the mxmlc or compc compilersjava.io.File
. */ void setDefaultCSS(File url); /** * Uses the ECMAScript edition 3 prototype-based object model to allow dynamic overriding * of prototype properties. In the prototype-based object model, built-in functions are * implemented as dynamic properties of prototype objects. * This is equivalent to using thecompiler.es
option for the mxmlc or compc compilers. * ** The default value is
false
. * * @param b Boolean value that enables or disables the use of the ECMAScript edition 3 prototype-based object model. */ void useECMAScript(boolean b); /** * Sets the list of SWC files or directories to compile against, but to omit from linking. * This is equivalent to using thecompiler.external-library-path
option of the * mxmlc or compc compilers. * * @param paths A list of paths. TheFile.isDirectory()
method should return *true
;File
instances should represent SWC files. */ void setExternalLibraryPath(File[] paths); /** * Adds to the existing list of SWC files. * * @see #setExternalLibraryPath(File[]) * * @param paths A list of paths. TheFile.isDirectory()
method should return *true
;File
instances should represent SWC files. */ void addExternalLibraryPath(File[] paths); /** * Sets a range to restrict the number of font glyphs embedded into the application. * This is equivalent to using thecompiler.fonts.languages.language-range
option * for the mxmlc or compc compilers. * ** For example: * *
* setFontLanguageRange("englishRange", "U+0020-U+007E"); ** * @param language Represents the language name. * @param range Defines range of glyphs. */ void setFontLanguageRange(String language, String range); /** * Sets the location of the local font snapshot file. The file contains system font data produced by the *flex2.tools.FontSnapshot
tool. This is equivalent to using thecompiler.fonts.local-fonts-snapshot
* option for the mxmlc or compc compilers. * * @param file Local font snapshot file. */ void setLocalFontSnapshot(File file); /** * Sets the local font file paths to be searched by the compiler. * This is equivalent to usingmxmlc/compc --compiler.fonts.local-font-paths
. * * @param paths an array of file paths. */ void setLocalFontPaths(String[] paths); /** * Adds local font paths to the existing local font path list. * * @see #setLocalFontPaths(String[]) * @param paths an array of local font file paths. */ void addLocalFontPaths(String[] paths); /** * Sets the font managers used by the compiler. Replaces the existing list of font managers. * The default isflash.fonts.JREFontManager
. * This is equivalent to using thecompiler.fonts.managers
option for the mxmlc or compc compilers. * ** For example: * *
* setFontManagers("flash.fonts.BatikFontManager"); ** * @param classNames An array of Java class names. */ void setFontManagers(String[] classNames); /** * Adds font managers to the existing font manager list. * * @see #setFontManagers(String[]) * @param classNames An array of Java class names. */ void addFontManagers(String[] classNames); /** * Sets the maximum number of embedded font faces that can be cached. * This is equivalent to using thecompiler.fonts.max-cached-fonts
option for the * mxmlc or compc compilers. * ** The default value is 20. * * @param size An integer representing the maximum number of embedded font faces. */ void setMaximumCachedFonts(int size); /** * Sets the maximum number of character glyph outlines to cache for each font face. * This is equivalent to using the
compiler.fonts.max-glyphs-per-face
option * for the mxmlc or compc compilers. * ** The default value is 1000. * * @param size An integer representing the maximum number of character glyph outlines to cache for each font face. */ void setMaximumGlyphsPerFace(int size); /** * Sets the compiler when it runs on a server without a display. * This is equivalent to using the
compiler.headless-server
option of the mxmlc or compc compilers. * * @param b Boolean value that determines if the compiler is running on a server without a display. */ void useHeadlessServer(boolean b); /** * Sets the ActionScript metadata that the compiler keeps in the SWF. * This is equivalent to using thecompiler.keep-actionscript-metadata
option of the mxmlc or compc compilers. * ** The default value is
{Bindable, Managed, ChangeEvent, NonCommittingChangeEvent, Transient}
. * * @param md An array of ActionScript metadata names. */ void setActionScriptMetadata(String[] md); /** * Adds the list of ActionScript metadata names to the existing list of ActionScript metadata * that the compiler keeps in the SWF. * * @see #setActionScriptMetadata(String[]) * * @param md An array of ActionScript metadata names. */ void addActionScriptMetadata(String[] md); /** * Instructs the compiler to keep a style sheet's type selector in a SWF file, even if that type * (the class) is not used in the application. * This is equivalent to using thecompiler.keep-all-type-selectors
option of the mxmlc or compc compilers. * ** The default value is
false
. * * @param b Boolean value. */ void keepAllTypeSelectors(boolean b); /** * Saves temporary source files that are generated during MXML compilation. * This is equivalent to using thecompiler.keep-generated-actionscript
option of the * mxmlc and compc compilers. * ** The default value is
false
. * * @param b Boolean value. */ void keepCompilerGeneratedActionScript(boolean b); /** * Instructs the linker to keep a report of the content that is included in the application. * You can use theReport.writeLinkReport()
method to retrieve the linker report. * * @param b Boolean value. */ void keepLinkReport(boolean b); /** * Instructs the linker to keep a SWF size summary. * You can use theReport.writeSizeReport()
method to retrieve the linker report. * * @param b Boolean value. */ void keepSizeReport(boolean b); /** * Instructs the compiler to keep a report of the compiler configuration settings. * You can use theReport.writeConfigurationReport()
method to retrieve the configuration report. * * @param b Boolean value. */ void keepConfigurationReport(boolean b); /** * Includes a list of SWC files to completely include in the application. * This is equivalent to using thecompiler.include-libraries
option of the mxmlc and compc compilers. * * @see #setIncludes(String[]) * @see #setExterns(File[]) * @see #setExterns(String[]) * @see #setExternalLibraryPath(File[]) * * @param libraries An array ofFile
objects. TheFile.isDirectory()
method should return *true
; or instances must represent SWC files. */ void includeLibraries(File[] libraries); /** * Sets a list of SWC files or directories that contain SWC files. * This is equivalent to using thecompiler.library-path
option of the mxmlc or compc compilers. * * @param paths An array ofFile
objects. TheFile.isDirectory()
method should return *true
; instances must represent SWC files. */ void setLibraryPath(File[] paths); /** * Adds a list of SWC files or directories to the default library path. * * @see #setLibraryPath(File[]) * * @param paths An array ofFile
objects. TheFile.isDirectory()
method should return *true
; instances must represent SWC files. */ void addLibraryPath(File[] paths); /** * Sets the locales that the compiler uses to replace{locale}
tokens that appear in some configuration values. * This is equivalent to using thecompiler.locale
option of the mxmlc or compc compilers. * ** For example: * *
* addSourcePath(new File[] { "locale/{locale}" }); * setLocales(new String[] { "en_US" }); ** ** The compiler adds the
locale/en_US
directory to the source path. * * @param locales An array of Strings specifying locales. * * @since 3.0 */ void setLocale(String[] locales); /** * Sets the locale that the compiler uses to replace{locale}
tokens that appear in some configuration values. * This is equivalent to using thecompiler.locale
option of the mxmlc or compc compilers * to set a single locale. * ** For example: * *
* addSourcePath(new File[] { "locale/{locale}" }); * setLocale(Locale.US); ** ** The compiler adds the
locale/en_US
directory to the source path. * * @param locale Ajava.util.Locale
. * * @deprecated As of 3.0, use setLocale(String[]) */ void setLocale(Locale locale); /** * Specifies a URI to associate with a manifest of components for use as MXML elements. * This is equivalent to using thecompiler.namespaces.namespace
option of the mxmlc or compc compilers. * * @param namespaceURI A namespace URI. * @param manifest A component manifest file (XML). */ void setComponentManifest(String namespaceURI, File manifest); /** * Enables post-link optimization. This is equivalent to using thecompiler.optimize
option of the * mxmlc or compc compilers. Application sizes are usually smaller with this option enabled. * ** The default value is
true
. * * @param b Boolean value. */ void optimize(boolean b); /** * Enables ZLIB compression on SWF file. This is equivalent to using thecompiler.compress
option of the * mxmlc or compc compilers. Application sizes are usually smaller with this option enabled. * * @param b Boolean value. */ void compress(boolean b); /** * Sets the location of the Flex Data Services service configuration file. * This is equivalent to using thecompiler.services
option of the mxmlc and compc compilers. * * @param file Instance of theFile
class. */ void setServiceConfiguration(File file); /** * Runs the ActionScript compiler in a mode that detects legal but potentially incorrect code. * This is equivalent to using thecompiler.show-actionscript-warnings
option of the * mxmlc or compc compilers. * ** The default value is
true
. * * @see #checkActionScriptWarning(int, boolean) * * @param b Boolean value. */ void showActionScriptWarnings(boolean b); /** * Toggles whether warnings generated from data binding code are displayed. * This is equivalent to using thecompiler.show-binding-warnings
option of the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. */ void showBindingWarnings(boolean b); /** * Toggles whether the use of deprecated APIs generates a warning. * This is equivalent to using thecompiler.show-deprecation-warnings
option of the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. */ void showDeprecationWarnings(boolean b); /** * Toggles whether warnings are displayed when an embedded font name shadows * a device font name. * This is equivalent to using thecompiler.show-shadowed-device-font-warnings
option of the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. */ void showShadowedDeviceFontWarnings(boolean b); /** * Toggles whether warnings generated from unused type selectors are displayed. * This is equivalent to using thecompiler.show-unused-type-selector-warnings
option of the mxmlc or compc * compilers. * ** The default value is
true
. * * @param b Boolean value. */ void showUnusedTypeSelectorWarnings(boolean b); /** * Sets a list of path elements that form the roots of ActionScript class hierarchies. * This is equivalent to using thecompiler.source-path
option of the mxmlc or compc compilers. * * @param paths An array ofjava.io.File
objects. TheFile.isDirectory()
method * must returntrue
. */ void setSourcePath(File[] paths); /** * Adds a list of path elements to the existing source path list. * * @param paths An array ofjava.io.File
objects. TheFile.isDirectory()
method must returntrue
. * @see #setSourcePath(File[]) */ void addSourcePath(File[] paths); /** * Runs the ActionScript compiler in strict error checking mode. * This is equivalent to using thecompiler.strict
option of the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. */ void enableStrictChecking(boolean b); /** * Sets a list of CSS or SWC files to apply as a theme. * This is equivalent to using thecompiler.theme
option of the mxmlc or compc compilers. * * @param files An array ofjava.io.File
objects. */ void setTheme(File[] files); /** * Adds a list of CSS or SWC files to the existing list of theme files. * * @param files An array ofjava.io.File
objects. * @see #setTheme(File[]) */ void addTheme(File[] files); /** * Determines whether resources bundles are included in the application. * This is equivalent to using thecompiler.use-resource-bundle-metadata
option of the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. */ void useResourceBundleMetaData(boolean b); /** * Generates bytecodes that include line numbers. When a run-time error occurs, * the stacktrace shows these line numbers. Enabling this option generates larger SWF files. * This is equivalent to using thecompiler.verbose-stacktraces
option of the mxmlc or compc compilers. * ** The default value is
false
. * * @param b Boolean value. */ void enableVerboseStacktraces(boolean b); /** * Enables FlashType for embedded fonts, which provides greater clarity for small fonts. * This is equilvalent to using thecompiler.fonts.flash-type
option for the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. * @deprecated */ void enableFlashType(boolean b); /** * Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small fonts. * This is equilvalent to using thecompiler.fonts.advanced-anti-aliasing
option for the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. * @since 3.0 */ void enableAdvancedAntiAliasing(boolean b); /** *Array.toString()
format has changed. */ int WARN_ARRAY_TOSTRING_CHANGES = WarningConstants.kWarning_ArrayToStringChanges; /** * Assignment within conditional. */ int WARN_ASSIGNMENT_WITHIN_CONDITIONAL = WarningConstants.kWarning_AssignmentWithinConditional; /** * Possibly invalid Array cast operation. */ int WARN_BAD_ARRAY_CAST = WarningConstants.kWarning_BadArrayCast; /** * Non-Boolean value used where aBoolean
value was expected. */ int WARN_BAD_BOOLEAN_ASSIGNMENT = WarningConstants.kWarning_BadBoolAssignment; /** * InvalidDate
cast operation. */ int WARN_BAD_DATE_CAST = WarningConstants.kWarning_BadDateCast; /** * Unknown method. */ int WARN_BAD_ES3_TYPE_METHOD = WarningConstants.kWarning_BadES3TypeMethod; /** * Unknown property. */ int WARN_BAD_ES3_TYPE_PROP = WarningConstants.kWarning_BadES3TypeProp; /** * Illogical comparison withNaN
. Any comparison operation involvingNaN
will evaluate tofalse
becauseNaN != NaN
. */ int WARN_BAD_NAN_COMPARISON = WarningConstants.kWarning_BadNaNComparision; /** * Impossible assignment tonull
. */ int WARN_BAD_NULL_ASSIGNMENT = WarningConstants.kWarning_BadNullAssignment; /** * Illogical comparison withnull
. */ int WARN_BAD_NULL_COMPARISON = WarningConstants.kWarning_BadNullComparision; /** * Illogical comparison withundefined
. Only untyped variables (or variables of type*
) can beundefined
. */ int WARN_BAD_UNDEFINED_COMPARISON = WarningConstants.kWarning_BadUndefinedComparision; /** *Boolean()
with no arguments returnsfalse
in ActionScript 3.0. *Boolean()
returnedundefined
in ActionScript 2.0. */ int WARN_BOOLEAN_CONSTRUCTOR_WITH_NO_ARGS = WarningConstants.kWarning_BooleanConstructorWithNoArgs; /** *__resolve
is deprecated. */ int WARN_CHANGES_IN_RESOLVE = WarningConstants.kWarning_ChangesInResolve; /** *Class
is sealed. It cannot have members added to it dynamically. */ int WARN_CLASS_IS_SEALED = WarningConstants.kWarning_ClassIsSealed; /** * Constant not initialized. */ int WARN_CONST_NOT_INITIALIZED = WarningConstants.kWarning_ConstNotInitialized; /** * Function used in new expression returns a value. Result will be what the function returns, rather than a new instance of that function. */ int WARN_CONSTRUCTOR_RETURNS_VALUE = WarningConstants.kWarning_ConstructorReturnsValue; /** * EventHandler was not added as a listener. */ int WARN_DEPRECATED_EVENT_HANDLER_ERROR = WarningConstants.kWarning_DepricatedEventHandlerError; /** * Unsupported ActionScript 2.0 function. */ int WARN_DEPRECATED_FUNCTION_ERROR = WarningConstants.kWarning_DepricatedFunctionError; /** * Unsupported ActionScript 2.0 property. */ int WARN_DEPRECATED_PROPERTY_ERROR = WarningConstants.kWarning_DepricatedPropertyError; /** * More than one argument by the same name. */ int WARN_DUPLICATE_ARGUMENT_NAMES = WarningConstants.kWarning_DuplicateArgumentNames; /** * Duplicate variable definition */ int WARN_DUPLICATE_VARIABLE_DEF = WarningConstants.kWarning_DuplicateVariableDef; /** * ActionScript 3.0 iterates over an object's properties within a "for x in target
" statement in random order. */ int WARN_FOR_VAR_IN_CHANGES = WarningConstants.kWarning_ForVarInChanges; /** * Importing a package by the same name as the current class will hide that class identifier in this scope. */ int WARN_IMPORT_HIDES_CLASS = WarningConstants.kWarning_ImportHidesClass; /** * Use of theinstanceof
operator. */ int WARN_INSTANCEOF_CHANGES = WarningConstants.kWarning_InstanceOfChanges; /** * Internal error in compiler. */ int WARN_INTERNAL_ERROR = WarningConstants.kWarning_InternalError; /** *_level
is no longer supported. For more information, see theflash.display
package. */ int WARN_LEVEL_NOT_SUPPORTED = WarningConstants.kWarning_LevelNotSupported; /** * Missing namespace declaration (e.g. variable is not defined to bepublic
,private
, etc.). */ int WARN_MISSING_NAMESPACE_DECL = WarningConstants.kWarning_MissingNamespaceDecl; /** * Negative value will become a large positive value when assigned to auint
data type. */ int WARN_NEGATIVE_UINT_LITERAL = WarningConstants.kWarning_NegativeUintLiteral; /** * Missing constructor. */ int WARN_NO_CONSTRUCTOR = WarningConstants.kWarning_NoConstructor; /** * Thesuper()
statement was not called within the constructor. */ int WARN_NO_EXPLICIT_SUPER_CALL_IN_CONSTRUCTOR = WarningConstants.kWarning_NoExplicitSuperCallInConstructor; /** * Missing type declaration. */ int WARN_NO_TYPE_DECL = WarningConstants.kWarning_NoTypeDecl; /** * In ActionScript 3.0, white space is ignored and''
returns0
. *Number()
returnsNaN
in ActionScript 2.0 when the parameter is''
or contains white space. */ int WARN_NUMBER_FROM_STRING_CHANGES = WarningConstants.kWarning_NumberFromStringChanges; /** * Change in scoping for thethis
keyword. * Class methods extracted from an instance of a class will always resolvethis
back to that instance. * In ActionScript 2.0,this
is looked up dynamically based on where the method is invoked from. */ int WARN_SCOPING_CHANGE_IN_THIS = WarningConstants.kWarning_ScopingChangeInThis; /** * Inefficient use of+=
on aTextField
. */ int WARN_SLOW_TEXTFIELD_ADDITION = WarningConstants.kWarning_SlowTextFieldAddition; /** * Possible missing parentheses. */ int WARN_UNLIKELY_FUNCTION_VALUE = WarningConstants.kWarning_UnlikelyFunctionValue; /** * Possible usage of the ActionScript 2.0XML
class. */ int WARN_XML_CLASS_HAS_CHANGED = WarningConstants.kWarning_XML_ClassHasChanged; /** * Enables checking of the following ActionScript warnings: * ** --compiler.warn-array-tostring-changes * --compiler.warn-assignment-within-conditional * --compiler.warn-bad-array-cast * --compiler.warn-bad-bool-assignment * --compiler.warn-bad-date-cast * --compiler.warn-bad-es3-type-method * --compiler.warn-bad-es3-type-prop * --compiler.warn-bad-nan-comparison * --compiler.warn-bad-null-assignment * --compiler.warn-bad-null-comparison * --compiler.warn-bad-undefined-comparison * --compiler.warn-boolean-constructor-with-no-args * --compiler.warn-changes-in-resolve * --compiler.warn-class-is-sealed * --compiler.warn-const-not-initialized * --compiler.warn-constructor-returns-value * --compiler.warn-deprecated-event-handler-error * --compiler.warn-deprecated-function-error * --compiler.warn-deprecated-property-error * --compiler.warn-duplicate-argument-names * --compiler.warn-duplicate-variable-def * --compiler.warn-for-var-in-changes * --compiler.warn-import-hides-class * --compiler.warn-instance-of-changes * --compiler.warn-internal-error * --compiler.warn-level-not-supported * --compiler.warn-missing-namespace-decl * --compiler.warn-negative-uint-literal * --compiler.warn-no-constructor * --compiler.warn-no-explicit-super-call-in-constructor * --compiler.warn-no-type-decl * --compiler.warn-number-from-string-changes * --compiler.warn-scoping-change-in-this * --compiler.warn-slow-text-field-addition * --compiler.warn-unlikely-function-value * --compiler.warn-xml-class-has-changed ** * @param warningCode Warning code. * @param b Boolean value. * * @see #WARN_ARRAY_TOSTRING_CHANGES * @see #WARN_ASSIGNMENT_WITHIN_CONDITIONAL * @see #WARN_BAD_ARRAY_CAST * @see #WARN_BAD_BOOLEAN_ASSIGNMENT * @see #WARN_BAD_DATE_CAST * @see #WARN_BAD_ES3_TYPE_METHOD * @see #WARN_BAD_ES3_TYPE_PROP * @see #WARN_BAD_NAN_COMPARISON * @see #WARN_BAD_NULL_ASSIGNMENT * @see #WARN_BAD_NULL_COMPARISON * @see #WARN_BAD_UNDEFINED_COMPARISON * @see #WARN_BOOLEAN_CONSTRUCTOR_WITH_NO_ARGS * @see #WARN_CHANGES_IN_RESOLVE * @see #WARN_CLASS_IS_SEALED * @see #WARN_CONST_NOT_INITIALIZED * @see #WARN_CONSTRUCTOR_RETURNS_VALUE * @see #WARN_DEPRECATED_EVENT_HANDLER_ERROR * @see #WARN_DEPRECATED_FUNCTION_ERROR * @see #WARN_DEPRECATED_PROPERTY_ERROR * @see #WARN_DUPLICATE_ARGUMENT_NAMES * @see #WARN_DUPLICATE_VARIABLE_DEF * @see #WARN_FOR_VAR_IN_CHANGES * @see #WARN_IMPORT_HIDES_CLASS * @see #WARN_INSTANCEOF_CHANGES * @see #WARN_INTERNAL_ERROR * @see #WARN_LEVEL_NOT_SUPPORTED * @see #WARN_MISSING_NAMESPACE_DECL * @see #WARN_NEGATIVE_UINT_LITERAL * @see #WARN_NO_CONSTRUCTOR * @see #WARN_NO_EXPLICIT_SUPER_CALL_IN_CONSTRUCTOR * @see #WARN_NO_TYPE_DECL * @see #WARN_NUMBER_FROM_STRING_CHANGES * @see #WARN_SCOPING_CHANGE_IN_THIS * @see #WARN_SLOW_TEXTFIELD_ADDITION * @see #WARN_UNLIKELY_FUNCTION_VALUE * @see #WARN_XML_CLASS_HAS_CHANGED */ void checkActionScriptWarning(int warningCode, boolean b); /** * Sets the default background color. You can override this by using the application code. * This is the equivalent of thedefault-background-color
option of the mxmlc or compc compilers. * ** The default value is
0x869CA7
. * * @param color An RGB value. */ void setDefaultBackgroundColor(int color); /** * Sets the default frame rate to be used in the application. * This is the equivalent of thedefault-frame-rate
option of the mxmlc or compc compilers. * ** The default value is
24
. * * @param rate Number of frames per second. */ void setDefaultFrameRate(int rate); /** * Sets the default script execution limits (which can be overridden by root attributes). * This is equivalent to using thedefault-script-limits
option of the mxmlc or compc compilers. * ** The default maximum recursion depth is
1000
. * The default maximum execution time is60
. * * @param maxRecursionDepth Recursion depth. * @param maxExecutionTime Execution time, in seconds. */ void setDefaultScriptLimits(int maxRecursionDepth, int maxExecutionTime); /** * Sets the default application size. * This is equivalent to using thedefault-size
option of the mxmlc or compc compilers. * ** The default width is
500
. * The default height is375
. * * @param width The width of the application, in pixels. * @param height The height of the application, in pixels. */ void setDefaultSize(int width, int height); /** * Sets a list of definitions to omit from linking when building an application. * This is equivalent to using theexterns
option of the mxmlc and compc compilers. * * @param definitions An array of definitions (for example, classes, functions, variables, or namespaces). */ void setExterns(String[] definitions); /** * Adds a list of definitions to the existing list of definitions. * * @see #setExterns(File[]) * @see #setExterns(String[]) * @param definitions An array of definitions (for example, classes, functions, variables, namespaces). */ void addExterns(String[] definitions); /** * Loads a file containing configuration options. The file format follows the format of theroyale-config.xml
file. * This is equivalent to using theload-config
option of the mxmlc or compc compilers. * * @param file An instance of thejava.io.File
class. */ void setConfiguration(File file); /** * Adds a file to the existing list of configuration files. * * @see #setConfiguration(File) * @param file An instance of thejava.io.File
class. */ void addConfiguration(File file); /** * Sets the configuration parameters. The input should be validmxmlc/compc
command-line arguments.* * @param args
mxmlc/compc
command-line arguments */ void setConfiguration(String[] args); /** * Sets a list of definitions to omit from linking when building an application. * This is equivalent to using theload-externs
option of the mxmlc or compc compilers. * This option is similar to thesetExterns(String[])
method. The following is an example of * the file format: * ** <script> * <!-- use 'dep', 'pre' or 'dep' to specify a definition to be omitted from linking. --> * <def id="mx.skins:ProgrammaticSkin"/> * <pre id="mx.core:IFlexDisplayObject"/> * <dep id="String"/> * </script> ** * @see #setExterns(String[]) * @param files An array ofjava.io.File
objects. */ void setExterns(File[] files); /** * Adds a list of files to the existing list of definitions to be omitted from linking. * * @see #setExterns(File[]) * @see #setExterns(String[]) * @param files An array ofjava.io.File
objects. */ void addExterns(File[] files); /** * Sets a SWF frame label with a sequence of class names that are linked onto the frame. * This is equivalent to using theframes.frame
option of the mxmlc or compc compilers. * * @param label A string. * @param classNames An array of class names. */ void setFrameLabel(String label, String[] classNames); /** * Sets a list of definitions to always link in when building an application. * This is equivalent to using theincludes
option of the mxmlc or compc compilers. * * @param definitions An array of definitions (for example, classes, functions, variables, or namespaces). */ void setIncludes(String[] definitions); /** * Adds a list of definitions to the existing list of definitions. * * @see #setIncludes(String[]) * @param definitions An array of definitions (for example, classes, functions, variables, or namespaces). */ void addIncludes(String[] definitions); /** * Specifies the licenses that the compiler validates before compiling. * This is equivalent to using thelicenses.license
option of the mxmlc or compc compilers. * * @param productName A string representing the product name; for example "flexbuilder3". * @param serialNumber A serial number. */ void setLicense(String productName, String serialNumber); /** * A contributor's name to store in the SWF metadata. */ int CONTRIBUTOR = 1; /** * A creator's name to store in the SWF metadata. */ int CREATOR = 2; /** * The creation date to store in the SWF metadata. */ int DATE = 4; /** * The default and localized RDF/XMP description to store in the SWF metadata. */ int DESCRIPTION = 8; /** * The default and localized RDF/XMP title to store in the SWF metadata. */ int TITLE = 16; /** * The language to store in the SWF metadata (i.e. EN, FR). */ int LANGUAGE = 32; /** * A publisher's name to store in the SWF metadata. */ int PUBLISHER = 64; /** * Sets the metadata section of the application SWF. This option is equivalent to using the following options of * the mxmlc and compc compilers: * ** metadata.contributor * metadata.creator * metadata.date * metadata.description * metadata.language * metadata.localized-description * metadata.localized-title * metadata.publisher * metadata.title ** ** The valid fields and types of value are specified below: * *
* CONTRIBUTOR java.lang.String * CREATOR java.lang.String * DATE java.util.Date * DESCRIPTION java.util.Map* * For example: * ** TITLE java.util.Map * LANGUAGE java.lang.String * PUBLISHER java.lang.String * * Map titles = new HashMap(); * titles.put("EN", "Adobe Flex 2 Application"); * * Map descriptions = new HashMap(); * descriptions.put("EN", "http://www.adobe.com/products/flex"); * * setSWFMetaData(Configuration.LANGUAGE, "EN"); * setSWFMetaData(Configuration.TITLE, titles); * setSWFMetaData(Configuration.DESCRIPTION, descriptions); ** * @param field One of:CONTRIBUTOR
,CREATOR
, *DATE
,DESCRIPTION
,TITLE
, *LANGUAGE
, orPUBLISHER
. * @param value AString
,Date
, or *Map
object. * * @see #CONTRIBUTOR * @see #CREATOR * @see #DATE * @see #DESCRIPTION * @see #TITLE * @see #LANGUAGE * @see #PUBLISHER */ void setSWFMetaData(int field, Object value); /** * Sets the path to the Flash Player executable when building a projector; for example: * ** setProjector(new File("C:/.../SAFlashPlayer.exe")); ** * This is equivalent to theprojector
option of the mxlmc or compc compilers. * * @param file The Flash Player executable. */ // void setProjector(File file); /** * Sets the metadata section of the application SWF. * This is equivalent to theraw-metadata
option of the mxmlc or compc compilers. * This option overrides anything set by thesetSWFMetaData()
method. * * @see #setSWFMetaData(int, Object) * @param xml A well-formed XML fragment. */ void setSWFMetaData(String xml); /** * Sets a list of run-time shared library URLs to be loaded before the application starts. * This is equivalent to theruntime-shared-libraries
option of the mxmlc or compc compilers. * * @param libraries An array ofjava.lang.String
objects. */ void setRuntimeSharedLibraries(String[] libraries); /** * Adds a list of run-time shared library URLs to the existing list. * * @see #setRuntimeSharedLibraries(String[]) * @param libraries An array ofjava.lang.String
objects. */ void addRuntimeSharedLibraries(String[] libraries); /** * Toggles whether the application SWF is flagged for access to network resources. * This is equivalent to theuse-network
option of the mxmlc or compc compilers. * ** The default value is
true
. * * @param b Boolean value. */ void useNetwork(boolean b); /** * Set the default output directory for configuration settings. * */ String DEFAULT_OUTPUT_DIRECTORY_TOKEN = "com.adobe.flex.default.output.directory"; /** * Defines a token that can be used for token substitutions. On the command line, you use token substitution in * the following way: * ** mxmlc +flexlib=path1 +foo=bar -var=${foo} ** * Wherevar=bar
occurs after the substitution of${foo}
. * * @param name The name of the token. * @param value The value of the token. */ void setToken(String name, String value); /** * Sets the version of the Flash Player that is being targeted by the application. * Features requiring a later version of the Player will not be compiled into the application. * * The default Player targeted is 9.0.0. * * @param major The major version. Must be greater than or equal to nine. * @param minor The minor version. Must be greater than or equal to zero. * @param revision The revsion must be greater than or equal to zero. * * @since 3.0 */ void setTargetPlayer(int major, int minor, int revision); /** * Sets the SDK compatibility version. For this release, the only valid value is 2.0.1. * * @param major The major version. For this release, this value must be 2. * @param minor The minor version. For this release, this value must be 0. * @param revision For this release, this value must be 1. * * @since 3.0 */ void setCompatibilityVersion(int major, int minor, int revision); /** * Set the arguments required to use an RSL with optional failover RSLs. * The arguments specify a SWC library and a set of RSL URLs and * Policy File URLs. * * This method sets RSL information and removes any other RSL * that may be set. To set additional RSLs see the *addRuntimeSharedLibraryPath
method. * * This is equivalent to the-runtime-shared-library-path
* option of the mxmlc compiler. * * @param swc path to the swc. The classes in the swc will be excluded from * the compiled application. * @param rslUrls array of URLs. The first RSL URL in the list is the primary RSL. The * remaining RSL URLs will only be loaded if the primary RSL fails to load. * @param policyFileUrls array of policy file URLs. Each entry in the rslUrls array must * have a corresponding entry in this array. A policy file may be needed in * order to allow the player to read an RSL from another domain. If * a policy file is not required, then set it to an empty string. * @since 3.0 * @see #addRuntimeSharedLibraryPath(String, String[], String[]) * @throws IllegalArgumentException if the length of the rslUrls array is not equal to * the length of the policyFileUrls array. * @throws NullPointerException if any of the arguments are null. */ public void setRuntimeSharedLibraryPath(String swc, String[] rslUrls, String[] policyFileUrls); /** * This is equivalent to using more than oneruntime-shared-library-path
* option when using the mxmlc compiler. * * @param swc path to the swc. The classes in the swc will be excluded from * the compiled application. * @param rslUrls array of URLs. The first RSL URL in the list is the primary RSL. The * remaining RSL URLs will only be loaded if the primary RSL fails to load. * @param policyFileUrls array of policy file URLs. Each entry in the rslUrls array must * have a corresponding entry in this array. A policy file may be needed in * order to allow the player to read an RSL from another domain. If * a policy file is not required, then set it to an empty string. * @since 3.0 * @see #setRuntimeSharedLibraryPath(String, String[], String[]) * @throws IllegalArgumentException if the length of the rslUrls array is not equal to * the length of the policyFileUrls array. * @throws NullPointerException if any of the arguments is null. */ public void addRuntimeSharedLibraryPath(String swc, String[] rslUrls, String[] policyFileUrls); /** * Verifies the RSL loaded * has the same digest as the RSL specified when the application was compiled. * This is equivalent to using theverify-digests
* option in the mxmlc compiler. * * The default value istrue
* * @param verify set to true to verify * the digest of the loaded RSL matches the digest of the * expected RSL. Set to false to disable the checks during * the development process but it is highly recommend that * production applications be compiled withverify
* set to true. * * @since 3.0 */ void enableDigestVerification(boolean verify); /** * Enable or disable the computation of a digest for the created swf library. * This is equivalent to using thecompiler.computDigest
in the compc * compiler. * * The default value istrue
* * @param compute set totrue
to create a digest for the compiled library. * * @since 3.0 */ void enableDigestComputation(boolean compute); /** * Add a global AS3 compiler configuration value and preserve existing definitions. * * This is equivalent to a single-define
option. * * @param name The qualified name of the configuration constant, e.g. "CONFIG::debugging" or "APP::version" * @param value The value of the constant, e.g. "true" or "!CONFIG::release" or "3.0" * * @since 3.0 * * @see #setDefineDirective(String[], String[]) */ public void addDefineDirective(String name, String value); /** * Set global AS3 compiler configuration values and clear existing definitions. * * If either parameter is null, or the arrays of different lengths, this will only * clear existing definitions. * * @param names A list of qualified names/configuration constants, e.g. "CONFIG::debugging" or "APP::version" * @param values A list of values of the constants, e.g. "true" or "!CONFIG::release" or "3.0" * * @since 3.0 * * @see #addDefineDirective(String, String) */ public void setDefineDirective(String[] names, String[] values); /** * @param libraries */ public void setExtensionLibraries(Map> extensions); public void addExtensionLibraries(File extension, List parameters); /** * Enables the removal of RSLs associated with libraries * that are not used by an application. * This is equivalent to using the * remove-unused-rsls
option of the mxmlc compiler. * ** The default value is
false
. * * @param b Boolean value that enables or disables the removal. * * @since 4.5 */ void removeUnusedRuntimeSharedLibraryPaths(boolean b); /** * Sets the SWCs that will have their associated RSLs loaded at runtime. * The RSLs will be loaded whether they are used in the application or not. * This option can be used to override decisions made by the compiler when * using theremoved-used-rsls
option. * * This is equivalent to using the *runtime-shared-library-settings.force-rsls
option of the * mxmlc compiler. * * @param paths An array ofFile
objects. EachFile
* instance should represent a SWC file. May not be null. * * @since 4.5 * @throws NullPointerException if path is null. */ void setForceRuntimeSharedLibraryPaths(File[] paths); /** * Adds SWCs to the existing set of SWCs whose RSLs will be loaded at runtime. * * This is equivalent to using the *runtime-shared-library-settings.force-rsls
option of the * mxmlc compiler. * * @param paths An array ofFile
objects. EachFile
* instance should represent a SWC file. May not be null. * * @since 4.5 * @see #setForcedRuntimeSharedLibraryPaths(File[]) * @throws NullPointerException if path is null. */ void addForceRuntimeSharedLibraryPaths(File[] paths); /** * Set the application domain of a configured RSL to override the default * settings. The default value is 'default'. Other valid values are * "current", "parent", or "top-level". The actual application domain is * resolved at runtime by the Flex Framework. The default behavior is to * load an RSL into the topmost module factory's application domain that has * a placeholder RSL. If no placeholder is found the RSL is loaded into the * application domain of the loading module factory. The "current", * "parent", and "top-level" applications are resolved relative to the * module factory loading the RSL. * * This is equivalent to using the *runtime-shared-library-settings.application-domain
option of * the mxmlc compiler. * * @param path TheFile
instance represents a SWC file with RSL * linkage. The RSL associated with the SWC will have its * application domain modified as specified in the *applicationDomainTarget
parameter. Passing null * resets the application domain settings. * @param applicationDomainTarget The application domain an RSL will be loaded * into. May only be null when thepath
parameter is null. * * @since 4.5 * @throws NullPointerException if applicationDomain is null and path is * not null. */ void setApplicationDomainForRuntimeSharedLibraryPath(File path, String applicationDomainTarget); /** * Add application domain setting to the existing list of application domain * settings. * * This is equivalent to using the *runtime-shared-library-settings.application-domain
option of * the mxmlc compiler. * * @param path TheFile
instance represents a SWC file with RSL * linkage. The RSL associated with the SWC will have its * application domain modified as specified in the *applicationDomainTarget
parameter. May not be * null. * @param applicationDomainTarget The application domain an RSL will be * loaded into. May not be null. * * @since 4.5 * @see #setApplicationDomainForRuntimeSharedLibraryPath(File, String) * @throws NullPointerException if any of the arguments are null. */ void addApplicationDomainForRuntimeSharedLibraryPath(File path, String applicationDomainTarget); }