flex2.compiler.Logger
Tools like mxmlc and compc use configuration objects to store configuration options parsed from config files and command-line options. The configuration object is produced by flex2.tools.Mxmlc.processConfiguration(). This method can produce instances of various subclasses: Configuration ToolsConfiguration ASDocConfiguration (for asdoc command-line tool) CommandLineConfiguration (for mxmlc command-line tool) CompcConfiguration (for compc command-line tool) ApplicationCompilerConfiguration (for OEM ApplicationCompiler) LibraryCompilerConfiguration (for OEM LibraryCompiler) There are also "sub-configuration" classes such as CompilerConfiguration and MetadataConfiguration. Instances of these classes store dotted/nested config options. For example, the -compiler.library-path command line option (corresponding to ... in an XML config file) is stored in CompilerConfiguration, which is owned by Configuration. A configuration class does not have to extend Configuration or implement any interface. Instead, configuration objects get populated with configuration information via reflection. A configuration class declares that it support a particular option such as -library-path / simply by having the public methods getLibraryPathInfo() and cfgLibraryPath(). (Note the change in spelling from library-path to LibraryPath.) A method like getLibraryPathInfo() returns a ConfigurationInfo object which has metadata about the option, such as its description, whether it can have a single value or multiple values, etc. After the ConfigurationBuffer has accumulated all ConfigurationValue objects parsed from various source by "configurators" such as DefaultsConfigurator, SystemPropertyConfiguration, FileConfigurator, and CommandLineConfigurator, it pushes these ConfigurationValues into the configuration objects that accept them via methods like cfgLibraryPath(). The ConfigurationBuffer inspects the type of the second parameter of this method and can pass, for example, a String array in addition to the general ConfigurationValue. Typically a cfgXXX() method will simply store the option value, or some transformed version of it, in a private field such as libraryPath. A public method such as getLibraryPath() -- whose name doesn't matter because it doesn't get called through reflection -- then exposes the option to the tool. You can force one configuration option to be set before another, and avoid race conditions, by using the ConfigurationInfo.getSoftPrerequisites() method.
@author Roger Gonzalez
@author Gordon Smith (notes below)