org.apache.tools.ant.taskdefs.optional
public class Javah extends Task
<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.
Nested Class Summary | |
---|---|
class | Javah.ClassArgument
A class corresponding the the nested "class" element.
|
Constructor Summary | |
---|---|
Javah()
No arg constructor. |
Method Summary | |
---|---|
void | add(JavahAdapter adapter)
Set the adapter explicitly. |
void | addFileSet(FileSet fs)
Add a fileset. |
ImplementationSpecificArgument | createArg()
Adds an implementation specific command-line argument. |
Path | createBootclasspath()
Adds path to bootstrap class files. |
Javah.ClassArgument | createClass()
Adds class to process. |
Path | createClasspath()
Path to use for classpath. |
Path | createImplementationClasspath()
The classpath to use when loading the javah implementation
if it is not a built-in one.
|
void | execute()
Execute the task
|
Path | getBootclasspath()
The bootclasspath to use. |
String[] | getClasses()
Names of the classes to process. |
Path | getClasspath()
The classpath to use. |
String[] | getCurrentArgs()
Returns the (implementation specific) settings given as nested
arg elements. |
File | getDestdir()
The destination directory, if any. |
boolean | getForce()
Whether output files should always be written. |
boolean | getOld()
Whether old JDK1.0-style header files should be generated. |
File | getOutputfile()
The destination file, if any. |
boolean | getStubs()
Whether C declarations from the Java object file should be generated. |
boolean | getVerbose()
Whether verbose output should get generated. |
void | logAndAddFiles(Commandline cmd)
Logs the compilation parameters, adds the files to compile and logs the
"niceSourceList" |
protected void | logAndAddFilesToCompile(Commandline cmd)
Logs the compilation parameters, adds the files to compile and logs the
"niceSourceList" |
void | setBootclasspath(Path src)
location of bootstrap class files. |
void | setBootClasspathRef(Reference r)
To the bootstrap path, this adds a reference to a classpath defined elsewhere. |
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 | setImplementation(String impl)
Choose the implementation for this particular task. |
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). |
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. |
Since: Ant 1.8.0
Parameters: fs the fileset to add.
Returns: a ImplementationSpecificArgument to be configured.
Since: Ant 1.6.3
Returns: a path to be configured.
Returns: a ClassArgument
to be configured.
Returns: a path to be configured.
Since: Ant 1.8.0
Throws: BuildException is there is a problem in the task execution.
Returns: the bootclass path.
Since: Ant 1.6.3
Returns: the array of classes.
Since: Ant 1.6.3
Returns: the classpath.
Since: Ant 1.6.3
Returns: the arguments.
Since: Ant 1.6.3
Returns: the destination directory.
Since: Ant 1.6.3
Returns: the force attribute.
Since: Ant 1.6.3
Returns: the old attribute.
Since: Ant 1.6.3
Returns: the destination file.
Since: Ant 1.6.3
Returns: the stubs attribute.
Since: Ant 1.6.3
Returns: the verbose attribute.
Since: Ant 1.6.3
Parameters: cmd the command line.
Parameters: cmd the command line to add parameters to.
Parameters: src the bootstrap classpath.
Parameters: r a reference to a classpath
UNKNOWN: this needs to be documented in the HTML.
Parameters: cls the classname (or classnames).
Parameters: src the classpath.
Parameters: r a reference to a classpath.
UNKNOWN: this needs to be documented in the HTML docs.
Parameters: destDir the destination directory.
Parameters: force the value to use.
Parameters: impl the name of the implemenation.
Since: Ant 1.6.3
Parameters: old if true use old 1.0 style header files.
Parameters: outputFile the output file.
Parameters: stubs if true, generated C declarations.
Parameters: verbose if true, do verbose printing.