public class GlueGenTask
extends Task
An ANT org.apache.tools.ant.Task
for using GlueGen
.
Usage:
<gluegen src="[source C file]" outputrootdir="[optional output root dir]" includes="[optional directory pattern of include files to include]" excludes="[optional directory pattern of include files to exclude]" includeRefid="[optional FileSet or DirSet for include files]" literalInclude="[optional comma separated list of literal include directories, avoiding limitations of FileSet / DirSet issues]" emitter="[emitter class name]" config="[configuration file]" dumpCPP="[optional boolean]" debug="[optional boolean]" />
Constructor and Description |
---|
GlueGenTask()
Create and add the VM and classname to
org.apache.tools.ant.types.CommandlineJava . |
Modifier and Type | Method and Description |
---|---|
void |
addDirset(DirSet dirset)
Add a nested
org.apache.tools.ant.types.DirSet to specify
the files to include. |
Path |
createClasspath()
Add an optional classpath that defines the location of
GlueGen
and GlueGen 's dependencies. |
PatternSet.NameEntry |
createExclude()
Add an include file to the list that is to be exluded.
|
PatternSet.NameEntry |
createExcludesFile()
Add an exclude file to the list.
|
PatternSet.NameEntry |
createInclude()
Add an include file to the list.
|
PatternSet.NameEntry |
createIncludesFile()
Add an include file to the list.
|
void |
execute()
Run the task.
|
void |
setConfig(String configuration)
Set the configuration file name.
|
void |
setDebug(boolean debug)
Set the debug flag (optional).
|
void |
setDumpCPP(boolean dumpCPP)
Set the dumpCPP flag (optional).
|
void |
setEmitter(String emitter)
Set the emitter class name.
|
void |
setExcludes(String excludes)
Set the set of exclude patterns.
|
void |
setIncludeRefid(Reference reference)
Set a
org.apache.tools.ant.types.Reference to simplify adding
of complex sets of files to include. |
void |
setIncludes(String includes)
Set the set of include patterns.
|
void |
setLiteralInclude(String commaSeparatedIncludes)
Set a literal include directories, separated with a comma.
|
void |
setOutputRootDir(String outputRootDir)
Set the output root dir (optional).
|
void |
setSrc(String sourceFile)
Set the source C file that is to be parsed.
|
public GlueGenTask()
Create and add the VM and classname to org.apache.tools.ant.types.CommandlineJava
.
public void setDebug(boolean debug)
Set the debug flag (optional). This is called by ANT.
public void setDumpCPP(boolean dumpCPP)
Set the dumpCPP flag (optional). This is called by ANT.
public void setOutputRootDir(String outputRootDir)
Set the output root dir (optional). This is called by ANT.
outputRootDir
- the optional output root dirpublic void setEmitter(String emitter)
Set the emitter class name. This is called by ANT.
emitter
- the name of the emitter classpublic void setConfig(String configuration)
Set the configuration file name. This is called by ANT.
configuration
- the name of the configuration filepublic void setSrc(String sourceFile)
Set the source C file that is to be parsed. This is called by ANT.
sourceFile
- the name of the source filepublic void setLiteralInclude(String commaSeparatedIncludes)
Set a literal include directories, separated with a comma. See the literalInclude
javadoc for more information.
commaSeparatedIncludes
- the comma separated directories to includepublic PatternSet.NameEntry createInclude()
Add an include file to the list. This is called by ANT for a nested element.
org.apache.tools.ant.types.PatternSet.NameEntry
public PatternSet.NameEntry createIncludesFile()
Add an include file to the list. This is called by ANT for a nested element.
org.apache.tools.ant.types.PatternSet.NameEntry
public void setIncludes(String includes)
Set the set of include patterns. Patterns may be separated by a comma or a space. This is called by ANT.
includes
- the string containing the include patternspublic PatternSet.NameEntry createExclude()
Add an include file to the list that is to be exluded. This is called by ANT for a nested element.
org.apache.tools.ant.types.PatternSet.NameEntry
public PatternSet.NameEntry createExcludesFile()
Add an exclude file to the list. This is called by ANT for a nested element.
org.apache.tools.ant.types.PatternSet.NameEntry
public void setExcludes(String excludes)
Set the set of exclude patterns. Patterns may be separated by a comma or a space. This is called by ANT.
includes
- the string containing the exclude patternspublic void setIncludeRefid(Reference reference)
Set a org.apache.tools.ant.types.Reference
to simplify adding
of complex sets of files to include. This is called by ANT.
reference
- a Reference
to a org.apache.tools.ant.types.FileSet
or org.apache.tools.ant.types.DirSet
BuildException
- if the specified Reference
is not
either a FileSet
or DirSet
public void addDirset(DirSet dirset)
Add a nested org.apache.tools.ant.types.DirSet
to specify
the files to include. This is called by ANT.
dirset
- the DirSet
to be addedpublic Path createClasspath()
Add an optional classpath that defines the location of GlueGen
and GlueGen
's dependencies.
public void execute() throws BuildException
Run the task. This involves validating the set attributes, creating the command line to be executed and finally executing the command.
BuildException
org.apache.tools.ant.Task#execute()