org.apache.tools.ant.taskdefs.optional
Class Javah
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.Task
|
+--org.apache.tools.ant.taskdefs.optional.Javah
- public class Javah
- extends Task
Task to generate 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.
- Author:
- Rick Beton richard.beton@physics.org
Constructor Summary |
Javah()
|
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Javah
public Javah()
setClass
public void setClass(java.lang.String cls)
createClass
public Javah.ClassArgument createClass()
setDestdir
public void setDestdir(java.io.File destDir)
- Set the destination directory into which the Java source
files should be compiled.
setClasspath
public void setClasspath(Path src)
createClasspath
public Path createClasspath()
setClasspathRef
public void setClasspathRef(Reference r)
- Adds a reference to a CLASSPATH defined elsewhere.
setBootclasspath
public void setBootclasspath(Path src)
createBootclasspath
public Path createBootclasspath()
setBootClasspathRef
public void setBootClasspathRef(Reference r)
- Adds a reference to a CLASSPATH defined elsewhere.
setOutputFile
public void setOutputFile(java.io.File outputFile)
- Set the output file name.
setForce
public void setForce(boolean force)
- Set the force-write flag.
setOld
public void setOld(boolean old)
- Set the old flag.
setStubs
public void setStubs(boolean stubs)
- Set the stubs flag.
setVerbose
public void setVerbose(boolean verbose)
- Set the verbose flag.
execute
public void execute()
throws BuildException
- Executes the task.
- Overrides:
execute
in class Task
- Following copied from class:
org.apache.tools.ant.Task
- Throws:
BuildException
- if someting goes wrong with the build
logAndAddFilesToCompile
protected void logAndAddFilesToCompile(Commandline cmd)
- Logs the compilation parameters, adds the files to compile and logs the
&qout;niceSourceList"
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.