|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.MatchingTask | +--com.lutris.ant.taskdefs.Xmlc
Invoke the XMLC compiler to read markup files and generate Java code for DOM
manipulation.
Typically made visible to an Ant build file with the following declaration:
<taskdef name="xmlc" classname="com.lutris.ant.taskdefs.Xmlc"/>Parameters
<xmlc srcdir="discRack/resources" sourceout="discRack/src" packagename="a.b" />A markup file located at "discRack/resources/c/d/discRack.ml" will be generated to "discRack/src/a/b/c/d/discRackML.java" and will start with a "package a.b.c.d" statement.
<xmlc source="." includes="*.html"> <arg value="-urlmapping" /> <arg value="Edit.html" /> <arg value="To.po" /> </xmlc>Caution: Do not be tempted to surround the URL's with single-quotes, as is common when calling XMLC from a shell command line, for example
<xmlc source="." includes="*.html"> <arg line="-urlmapping 'Edit.html' 'To.po'" /> </xmlc>The single-quotes will be taken as part of the URL to replace, and this is probably not what you intend. Required = No.
Inner Class Summary | |
static class |
Xmlc.BooleanAttribute
|
Field Summary | |
protected java.lang.String |
classPath
The classpath for XMLC to use. |
protected org.apache.tools.ant.types.Commandline |
cmdl
|
protected boolean |
compile
Set whether or not to have XMLC compile the generated Java file. |
protected java.io.File |
destDir
The destination directory into which the generated classes are written. |
protected boolean |
forceBuild
Force XMLC to always re-process the ML code (or not) |
protected boolean |
keep
Set whether or not to keep the generated Java file. |
protected static java.lang.String |
logHdr
|
protected int |
logLevel
|
protected java.lang.String |
ML
The kind of markup language being processed |
protected java.lang.String |
options
The name of options file to add parameters to the XMLC command |
protected java.lang.String |
packageDir
Expressed as a directory path, either '/' or '\' are accepted. |
protected java.lang.String |
packageName
Set the package prefix for generated classes |
protected java.lang.String |
performExec
|
protected boolean |
recompile
Generates support for automatic class recompilation |
protected boolean |
reloading
Specifies what XMLC generates |
protected java.io.File |
srcDir
The directory containing the HTML files |
protected java.lang.String |
srcDirName
The name of the directory containing the HTML files |
protected java.io.File |
srcOutDir
The destination directory into which the generated sources are written |
protected java.lang.String |
srcOutDirName
The destination directory into which the generated sources are written |
protected int |
upToDate
|
protected boolean |
verbose
Set "true" for -verbose |
protected java.lang.String |
xmlcArgs
|
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
fileset, useDefaultExcludes |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
Xmlc()
|
Method Summary | |
void |
copyFile(java.io.File sourceFile,
java.io.File destFile,
boolean overwrite)
copy file from source to destination |
org.apache.tools.ant.types.Commandline.Argument |
createArg()
Set nested arguments to the XMLC command to be executed. |
void |
execute()
Required by ant framework - implements execute() in Task. |
void |
setArgs(java.lang.String args)
Set nested arguments to the XMLC command to be executed |
void |
setClasspath(java.lang.String classpath)
Set the classpath for the XMLC compiler |
void |
setCompile(Xmlc.BooleanAttribute _compile)
Set whether or not to have XMLC compile the generated Java file. |
void |
setDestdir(java.lang.String destDirName)
Set the destination directory into which the generated classes are written. |
void |
setForce(java.lang.String force)
Force XMLC to always re-process the ML code (or not) |
void |
setKeep(Xmlc.BooleanAttribute _keep)
Set whether or not to keep the generated Java file. |
void |
setMarkup(java.lang.String markup)
The kind of markup language being processed. |
void |
setOptions(java.lang.String _options)
Set whether or not to have XMLC compile the generated Java file. |
void |
setPackagedir(java.lang.String packagedir)
Set the Package prefix for generated classes. |
void |
setPackagename(java.lang.String packagename)
Set the package prefix for generated classes, while preserving any source file directory paths. |
void |
setPerformexec(java.lang.String _performExec)
Set whether or not to invoke XMLC by using Runtime.exec() to create a seperate JVM. |
void |
setRecomp(Xmlc.BooleanAttribute recomp)
Generates support for automatic class recompilation; the information is stored in a file with an .xmlc suffix appended to the class name, as specified with the -class option. |
void |
setReload(Xmlc.BooleanAttribute reload)
Specifies what XMLC generates: class: XMLC generates a class that does not depend on an interface (default). interface: XMLC generates only an interface. both: XMLC generates both an interface and an implementation class. |
void |
setSourceout(java.lang.String sourceout)
Set the destination directory into which the generated source .java files are written, if -keep is used. |
void |
setSrcdir(java.lang.String srcdirname)
Set the source directory containing the HTML files. |
void |
setVerbose(Xmlc.BooleanAttribute _verbose)
Run XMLC in verbose mode (-verbose flag) |
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
addAnd, addContains, addCustom, addDate, addDepend, addDepth, addFilename, addMajority, addNone, addNot, addOr, addPresent, addSelector, addSize, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, markInvalid, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static java.lang.String logHdr
protected java.io.File srcDir
protected java.io.File destDir
protected java.io.File srcOutDir
protected java.lang.String classPath
protected java.lang.String packageDir
protected java.lang.String packageName
protected java.lang.String srcDirName
protected java.lang.String srcOutDirName
protected java.lang.String options
protected java.lang.String xmlcArgs
protected boolean verbose
protected boolean forceBuild
protected int logLevel
protected int upToDate
protected java.lang.String performExec
protected java.lang.String ML
protected boolean keep
protected boolean compile
protected org.apache.tools.ant.types.Commandline cmdl
protected boolean recompile
protected boolean reloading
Constructor Detail |
public Xmlc()
Method Detail |
public org.apache.tools.ant.types.Commandline.Argument createArg()
public void setArgs(java.lang.String args)
public void setClasspath(java.lang.String classpath)
public void setCompile(Xmlc.BooleanAttribute _compile)
public void setDestdir(java.lang.String destDirName)
public void setForce(java.lang.String force)
public void setKeep(Xmlc.BooleanAttribute _keep)
public void setMarkup(java.lang.String markup)
public void setOptions(java.lang.String _options)
public void setPackagedir(java.lang.String packagedir)
public void setPackagename(java.lang.String packagename)
public void setPerformexec(java.lang.String _performExec)
public void setSourceout(java.lang.String sourceout)
public void setSrcdir(java.lang.String srcdirname)
public void setVerbose(Xmlc.BooleanAttribute _verbose)
public void setRecomp(Xmlc.BooleanAttribute recomp)
public void setReload(Xmlc.BooleanAttribute reload)
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
public void copyFile(java.io.File sourceFile, java.io.File destFile, boolean overwrite) throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |