org.apache.tools.ant.taskdefs.optional
Class Javah
Generates JNI header files using javah.
This task can take the following arguments:
- classname - the fully-qualified name of a class
- outputFile - Concatenates the resulting header or source files for all
the classes listed into this file
- destdir - Sets the directory where javah saves the header files or the
stub files
- classpath
- bootclasspath
- force - Specifies that output files should always be written
(JDK1.2 only)
- old - Specifies that old JDK1.0-style header files should be generated
(otherwise output file contain JNI-style native method
function prototypes) (JDK1.2 only)
- stubs - generate C declarations from the Java object file (used with old)
- verbose - causes javah to print a message to stdout concerning the status
of the generated files
- extdirs - Override location of installed extensions
Of these arguments, either
outputFile or
destdir is required,
but not both. More than one classname may be specified, using a comma-separated
list or by using
<class name="xxx">
elements within the task.
When this task executes, it will generate C header and source files that
are needed to implement native methods.
Path | createBootclasspath() - Adds path to bootstrap class files.
|
Javah.ClassArgument | createClass() - Adds class to process.
|
Path | createClasspath() - Path to use for classpath.
|
void | execute() - Execute the task
|
protected void | logAndAddFilesToCompile(Commandline cmd) - Logs the compilation parameters, adds the files to compile and logs the
"niceSourceList"
|
void | setBootClasspathRef(Reference r) - Adds a reference to a classpath defined elsewhere.
|
void | setBootclasspath(Path src) - location of bootstrap class files.
|
void | setClass(String cls) - the fully-qualified name of the class (or classes, separated by commas).
|
void | setClasspath(Path src) - the classpath to use.
|
void | setClasspathRef(Reference r) - Adds a reference to a classpath defined elsewhere.
|
void | setDestdir(File destDir) - Set the destination directory into which the Java source
files should be compiled.
|
void | setForce(boolean force) - If true, output files should always be written (JDK1.2 only).
|
void | setOld(boolean old) - If true, specifies that old JDK1.0-style header files should be
generated.
|
void | setOutputFile(File outputFile) - Concatenates the resulting header or source files for all
the classes listed into this file.
|
void | setStubs(boolean stubs) - If true, generate C declarations from the Java object file (used with old).
|
void | setVerbose(boolean verbose) - If true, causes Javah to print a message concerning
the status of the generated files.
|
execute , getDescription , getLocation , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , maybeConfigure , perform , reconfigure , setDescription , setLocation , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
createBootclasspath
public Path createBootclasspath()
Adds path to bootstrap class files.
createClasspath
public Path createClasspath()
Path to use for classpath.
logAndAddFilesToCompile
protected void logAndAddFilesToCompile(Commandline cmd)
Logs the compilation parameters, adds the files to compile and logs the
"niceSourceList"
setBootClasspathRef
public void setBootClasspathRef(Reference r)
Adds a reference to a classpath defined elsewhere.
- this needs to be documented in the HTML
setBootclasspath
public void setBootclasspath(Path src)
location of bootstrap class files.
setClass
public void setClass(String cls)
the fully-qualified name of the class (or classes, separated by commas).
setClasspath
public void setClasspath(Path src)
the classpath to use.
setClasspathRef
public void setClasspathRef(Reference r)
Adds a reference to a classpath defined elsewhere.
- this needs to be documented in the HTML docs
setDestdir
public void setDestdir(File destDir)
Set the destination directory into which the Java source
files should be compiled.
setForce
public void setForce(boolean force)
If true, output files should always be written (JDK1.2 only).
setOld
public void setOld(boolean old)
If true, specifies that old JDK1.0-style header files should be
generated.
(otherwise output file contain JNI-style native method function prototypes) (JDK1.2 only)
setOutputFile
public void setOutputFile(File outputFile)
Concatenates the resulting header or source files for all
the classes listed into this file.
setStubs
public void setStubs(boolean stubs)
If true, generate C declarations from the Java object file (used with old).
setVerbose
public void setVerbose(boolean verbose)
If true, causes Javah to print a message concerning
the status of the generated files.
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.