Save This Page
Home » apache-ant-1.7.1-src » org.apache.tools » ant » taskdefs » optional » [javadoc | source]
org.apache.tools.ant.taskdefs.optional
public class: Javah [javadoc | source]
java.lang.Object
   org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
         org.apache.tools.ant.taskdefs.optional.Javah

All Implemented Interfaces:
    Cloneable

Generates JNI header files using javah. This task can take the following arguments: 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.
Nested Class Summary:
public class  Javah.ClassArgument  A class corresponding the the nested "class" element. It contains a "name" attribute. 
Fields inherited from org.apache.tools.ant.Task:
target,  taskName,  taskType,  wrapper
Fields inherited from org.apache.tools.ant.ProjectComponent:
project,  location,  description
Constructor:
 public Javah() 
Method from org.apache.tools.ant.taskdefs.optional.Javah Summary:
createArg,   createBootclasspath,   createClass,   createClasspath,   execute,   getBootclasspath,   getClasses,   getClasspath,   getCurrentArgs,   getDestdir,   getForce,   getOld,   getOutputfile,   getStubs,   getVerbose,   logAndAddFiles,   logAndAddFilesToCompile,   setBootClasspathRef,   setBootclasspath,   setClass,   setClasspath,   setClasspathRef,   setDestdir,   setForce,   setImplementation,   setOld,   setOutputFile,   setStubs,   setVerbose
Methods from org.apache.tools.ant.Task:
bindToOwner,   execute,   getOwningTarget,   getRuntimeConfigurableWrapper,   getTaskName,   getTaskType,   getWrapper,   handleErrorFlush,   handleErrorOutput,   handleFlush,   handleInput,   handleOutput,   init,   isInvalid,   log,   log,   log,   log,   markInvalid,   maybeConfigure,   perform,   reconfigure,   setOwningTarget,   setRuntimeConfigurableWrapper,   setTaskName,   setTaskType
Methods from org.apache.tools.ant.ProjectComponent:
clone,   getDescription,   getLocation,   getProject,   log,   log,   setDescription,   setLocation,   setProject
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.optional.Javah Detail:
 public ImplementationSpecificArgument createArg() 
    Adds an implementation specific command-line argument.
 public Path createBootclasspath() 
    Adds path to bootstrap class files.
 public Javah.ClassArgument createClass() 
    Adds class to process.
 public Path createClasspath() 
    Path to use for classpath.
 public  void execute() throws BuildException 
    Execute the task
 public Path getBootclasspath() 
    The bootclasspath to use.
 public String[] getClasses() 
    Names of the classes to process.
 public Path getClasspath() 
    The classpath to use.
 public String[] getCurrentArgs() 
    Returns the (implementation specific) settings given as nested arg elements.
 public File getDestdir() 
    The destination directory, if any.
 public boolean getForce() 
    Whether output files should always be written.
 public boolean getOld() 
    Whether old JDK1.0-style header files should be generated.
 public File getOutputfile() 
    The destination file, if any.
 public boolean getStubs() 
    Whether C declarations from the Java object file should be generated.
 public boolean getVerbose() 
    Whether verbose output should get generated.
 public  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"
 public  void setBootClasspathRef(Reference r) 
    To the bootstrap path, this adds a reference to a classpath defined elsewhere.
 public  void setBootclasspath(Path src) 
    location of bootstrap class files.
 public  void setClass(String cls) 
    the fully-qualified name of the class (or classes, separated by commas).
 public  void setClasspath(Path src) 
    the classpath to use.
 public  void setClasspathRef(Reference r) 
    Adds a reference to a classpath defined elsewhere.
 public  void setDestdir(File destDir) 
    Set the destination directory into which the Java source files should be compiled.
 public  void setForce(boolean force) 
    If true, output files should always be written (JDK1.2 only).
 public  void setImplementation(String impl) 
    Choose the implementation for this particular task.
 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).
 public  void setOutputFile(File outputFile) 
    Concatenates the resulting header or source files for all the classes listed into this file.
 public  void setStubs(boolean stubs) 
    If true, generate C declarations from the Java object file (used with old).
 public  void setVerbose(boolean verbose) 
    If true, causes Javah to print a message concerning the status of the generated files.