Class GlueGenTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- com.jogamp.gluegen.ant.GlueGenTask
-
- All Implemented Interfaces:
Cloneable
public class GlueGenTask extends org.apache.tools.ant.Task
An ANT
Task
for usingGlueGen
.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]" logLevel="[optional string]" />
- Author:
- Rob Grzywinski rgrzywinski@yahoo.com
-
-
Constructor Summary
Constructors Constructor Description GlueGenTask()
Create and add the VM and classname toCommandlineJava
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDirset(org.apache.tools.ant.types.DirSet dirset)
Add a nestedDirSet
to specify the files to include.org.apache.tools.ant.types.Path
createClasspath()
Add an optional classpath that defines the location ofGlueGen
andGlueGen
's dependencies.org.apache.tools.ant.types.PatternSet.NameEntry
createExclude()
Add an include file to the list that is to be exluded.org.apache.tools.ant.types.PatternSet.NameEntry
createExcludesFile()
Add an exclude file to the list.org.apache.tools.ant.types.PatternSet.NameEntry
createInclude()
Add an include file to the list.org.apache.tools.ant.types.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(org.apache.tools.ant.types.Reference reference)
Set aReference
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
setLogLevel(String logLevel)
Set the logLevel (optional).void
setOutputRootDir(String outputRootDir)
Set the output root dir (optional).void
setSrc(String sourceFile)
Set the source C file that is to be parsed.-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Method Detail
-
setDebug
public void setDebug(boolean debug)
Set the debug flag (optional). This is called by ANT.
-
setLogLevel
public void setLogLevel(String logLevel)
Set the logLevel (optional). This is called by ANT.
-
setDumpCPP
public void setDumpCPP(boolean dumpCPP)
Set the dumpCPP flag (optional). This is called by ANT.
-
setOutputRootDir
public void setOutputRootDir(String outputRootDir)
Set the output root dir (optional). This is called by ANT.
- Parameters:
outputRootDir
- the optional output root dir
-
setEmitter
public void setEmitter(String emitter)
Set the emitter class name. This is called by ANT.
- Parameters:
emitter
- the name of the emitter class
-
setConfig
public void setConfig(String configuration)
Set the configuration file name. This is called by ANT.
- Parameters:
configuration
- the name of the configuration file
-
setSrc
public void setSrc(String sourceFile)
Set the source C file that is to be parsed. This is called by ANT.
- Parameters:
sourceFile
- the name of the source file
-
setLiteralInclude
public void setLiteralInclude(String commaSeparatedIncludes)
Set a literal include directories, separated with a comma. See the
literalInclude
javadoc for more information.- Parameters:
commaSeparatedIncludes
- the comma separated directories to include
-
createInclude
public org.apache.tools.ant.types.PatternSet.NameEntry createInclude()
Add an include file to the list. This is called by ANT for a nested element.
- Returns:
PatternSet.NameEntry
-
createIncludesFile
public org.apache.tools.ant.types.PatternSet.NameEntry createIncludesFile()
Add an include file to the list. This is called by ANT for a nested element.
- Returns:
PatternSet.NameEntry
-
setIncludes
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.
- Parameters:
includes
- the string containing the include patterns
-
createExclude
public org.apache.tools.ant.types.PatternSet.NameEntry createExclude()
Add an include file to the list that is to be exluded. This is called by ANT for a nested element.
- Returns:
PatternSet.NameEntry
-
createExcludesFile
public org.apache.tools.ant.types.PatternSet.NameEntry createExcludesFile()
Add an exclude file to the list. This is called by ANT for a nested element.
- Returns:
PatternSet.NameEntry
-
setExcludes
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.
- Parameters:
includes
- the string containing the exclude patterns
-
setIncludeRefid
public void setIncludeRefid(org.apache.tools.ant.types.Reference reference)
Set a
?Reference
to simplify adding of complex sets of files to include. This is called by ANT.- Parameters:
reference
- aReference
to aFileSet
orDirSet
- Throws:
org.apache.tools.ant.BuildException
- if the specifiedReference
is not either aFileSet
orDirSet
-
addDirset
public void addDirset(org.apache.tools.ant.types.DirSet dirset)
Add a nested
DirSet
to specify the files to include. This is called by ANT.- Parameters:
dirset
- theDirSet
to be added
-
createClasspath
public org.apache.tools.ant.types.Path createClasspath()
Add an optional classpath that defines the location of
GlueGen
andGlueGen
's dependencies.
-
execute
public void execute() throws org.apache.tools.ant.BuildException
Run the task. This involves validating the set attributes, creating the command line to be executed and finally executing the command.
- Overrides:
execute
in classorg.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
- See Also:
Task.execute()
-
-