Modifier and Type | Class and Description |
---|---|
static class |
MXMLC.ExitCode
Exit code enumerations.
|
Modifier and Type | Field and Description |
---|---|
Configuration |
config |
ConfigurationBuffer |
configBuffer |
protected ICompilationUnit |
mainCU |
ProblemQuery |
problems |
protected FlexProject |
project |
protected Configurator |
projectConfigurator |
protected long |
startTime |
protected SWFTarget |
target |
protected ITargetSettings |
targetSettings |
protected Workspace |
workspace |
Constructor and Description |
---|
MXMLC() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildArtifact()
Build target artifact.
|
protected void |
close()
Force terminate the compilation process.
|
protected boolean |
compile()
Main body of this program.
|
boolean |
configure(String[] args)
Load configurations from all the sources.
|
protected Configurator |
createConfigurator()
Create a new Configurator.
|
int |
execute(String[] args) |
protected String |
getConfigurationDefaultVariable()
Get the default variable for this configuration.
|
String |
getMainSource() |
String |
getName() |
ProblemQuery |
getProblems() |
protected String |
getProgramName()
Get my program name.
|
List<String> |
getSourceList() |
protected String |
getStartMessage()
Get the start up message that contains the program name
with the copyright notice.
|
ISWF |
getSWFTarget() |
protected ITarget.TargetType |
getTargetType()
Virtual method that returns the type of target we are building.
|
protected boolean |
isCompc()
"compc" subclass will override this method.
|
static boolean |
isFatalFailure(int code)
Determines whether an exit code should be considered
a fatal failure, such as for an Ant task.
|
static void |
main(String[] args)
Entry point for the
mxmlc tool. |
int |
mainCompileOnly(String[] args,
OutputStream err)
Entry point for when you already have an MXML instance and just want to
compile and not link.
|
int |
mainNoExit(String[] args)
Entry point for when you already have an MXMLC instance.
|
int |
mainNoExit(String[] args,
OutputStream err)
Entry point for when you already have an MXML instance and want
to redirect
System.err . |
void |
println(String msg)
Print a message.
|
protected void |
reportTargetCompletion()
Reports the size and location of the target that was created.
|
protected void |
setupLocaleSettings()
Setups the locale related settings.
|
protected boolean |
setupTargetFile()
MXMLC uses target file as the main compilation unit and derive the output
SWF file name from this file.
|
protected void |
setupThemeFiles()
Setup theme files.
|
static int |
staticMainNoExit(String[] args)
Entry point for the
<mxmlc> Ant task. |
static List<File> |
toFiles(List<String> paths)
Convert file path strings to
File objects. |
static List<IFileSpecification> |
toFileSpecifications(List<String> paths,
Workspace workspace)
Resolve a list of normalized paths to
IFileSpecification objects
from the given workspace . |
protected void |
validateTargetFile()
Validate target file.
|
protected void |
waitAndClose()
Wait till the workspace to finish compilation and close.
|
int |
writeSWF(OutputStream outputStream) |
protected Workspace workspace
protected FlexProject project
public Configuration config
public ProblemQuery problems
public ConfigurationBuffer configBuffer
protected Configurator projectConfigurator
protected ICompilationUnit mainCU
protected SWFTarget target
protected long startTime
protected ITargetSettings targetSettings
public static void main(String[] args)
mxmlc
tool.args
- Command line arguments.public static int staticMainNoExit(String[] args)
<mxmlc>
Ant task.args
- Command line arguments.public static boolean isFatalFailure(int code)
code
- A numeric exit code.true
if the Ant task failed.public String getName()
getName
in interface org.apache.flex.tools.FlexTool
public int execute(String[] args)
execute
in interface org.apache.flex.tools.FlexTool
public int mainNoExit(String[] args)
args
- Command line arguments.public int mainNoExit(String[] args, OutputStream err)
System.err
. This is for unit testing.args
- Command line arguments.err
- An OutputStream
to use instead of System.err
.public int mainCompileOnly(String[] args, OutputStream err)
args
- Command line arguments.err
- An OutputStream
to use instead of System.err
.public void println(String msg)
msg
- Message text.protected void waitAndClose()
protected void close()
protected Configurator createConfigurator()
Configurator
.public boolean configure(String[] args)
args
- command line argumentsprotected String getConfigurationDefaultVariable()
protected void validateTargetFile() throws ConfigurationException
ConfigurationException
protected boolean compile()
protected void setupThemeFiles()
protected void reportTargetCompletion() throws InterruptedException
InterruptedException
protected void buildArtifact() throws InterruptedException, IOException
InterruptedException
- threading errorIOException
- IO errorprotected ITarget.TargetType getTargetType()
ITarget.TargetType
of the target we are building.protected boolean setupTargetFile() throws InterruptedException
InterruptedException
protected void setupLocaleSettings()
public static List<File> toFiles(List<String> paths)
File
objects. Null values are
discarded.paths
- list of paths.public static List<IFileSpecification> toFileSpecifications(List<String> paths, Workspace workspace)
IFileSpecification
objects
from the given workspace
.paths
- A list of normalized paths.workspace
- Workspace.protected String getProgramName()
protected String getStartMessage()
protected boolean isCompc()
public ProblemQuery getProblems()
public String getMainSource()
public ISWF getSWFTarget()
public int writeSWF(OutputStream outputStream)
Copyright © 2016 The Apache Software Foundation. All rights reserved.