From 753a6c60f47f3ac4f270005b65e9d6481de8eb68 Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Fri, 23 Oct 2015 10:00:02 -0700 Subject: Adding maven and ant source trees Change-Id: I0a39b9add833a31b9c3f98d193983ae2f3a5a445 Signed-off-by: Ashlee Young --- .../ant/apache-ant-1.9.6/manual/Tasks/javah.html | 243 +++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 framework/src/ant/apache-ant-1.9.6/manual/Tasks/javah.html (limited to 'framework/src/ant/apache-ant-1.9.6/manual/Tasks/javah.html') diff --git a/framework/src/ant/apache-ant-1.9.6/manual/Tasks/javah.html b/framework/src/ant/apache-ant-1.9.6/manual/Tasks/javah.html new file mode 100644 index 00000000..34a7b875 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/manual/Tasks/javah.html @@ -0,0 +1,243 @@ + + + + + + +Javah Task + + + + +

Javah

+

Description

+

Generates JNI headers from a Java class.

+

When this task executes, it will generate the C header and source files that +are needed to implement native methods. JNI operates differently depending on +whether JDK1.2+ +or pre-JDK1.2 +systems are used.

+ +

It is possible to use different compilers. This can be selected +with the implementation attribute or a nested element. Here are the choices of the attribute:

+ + +

Note: if you are using this task to work on multiple files + the command line may become too long on some operating systems. + Unfortunately the javah command doesn't support command argument + files the way javac (for example) does, so all that can be done is + breaking the amount of classes to compile into smaller chunks.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
classthe fully-qualified name of the class (or classes, + separated by commas)Yes
outputFileconcatenates the resulting header or source files for all the classes listed into this fileYes
destdirsets the directory where javah saves the header files or the + stub files.
forcespecifies that output files should always be written (JDK1.2 only)No
oldspecifies that old JDK1.0-style header files should be generated + (otherwise output file contain JNI-style native method function prototypes) (JDK1.2 only)No
stubsgenerate C declarations from the Java object file (used with old)No
verbosecauses Javah to print a message concerning the status of the generated filesNo
classpaththe classpath to use.No
bootclasspathlocation of bootstrap class files.No
extdirs location of installed extensions.No
implementationThe compiler implementation to use. If this + attribute is not set, the default compiler for the current VM + will be used. (See the above list of valid compilers.)No
+

Either outputFile or destdir must be supplied, but not both. 

+ +

Parameters specified as nested elements

+ +

arg

+ +

You can specify additional command line arguments for the compiler +with nested <arg> elements. These elements are +specified like Command-line Arguments +but have an additional attribute that can be used to enable arguments +only if a given compiler implementation will be used.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionRequired
valueSee + Command-line Arguments.Exactly one of these.
line
file
path
prefixSee + Command-line Arguments. + Since Ant 1.8.No
suffixNo
implementationOnly pass the specified argument if the chosen compiler + implementation matches the value of this attribute. Legal values + are the same as those in the above list of valid compilers.)No
+ +

implementationclasspath since Ant 1.8.0

+ +

A PATH like structure holding the + classpath to use when loading the compiler implementation if a + custom class has been specified. Doesn't have any effect when + using one of the built-in compilers.

+ +

Any nested element of a type that implements JavahAdapter + since Ant 1.8.0

+ +

If a defined type implements the JavahAdapter + interface a nested element of that type can be used as an + alternative to the implementation attribute.

+ +

Examples

+
  <javah destdir="c" class="org.foo.bar.Wibble"/>
+

makes a JNI header of the named class, using the JDK1.2 JNI model. Assuming +the directory 'c' already exists, the file org_foo_bar_Wibble.h +is created there. If this file already exists, it is left unchanged.

+
  <javah outputFile="wibble.h">
+    <class name="org.foo.bar.Wibble,org.foo.bar.Bobble"/>
+  </javah>
+

is similar to the previous example, except the output is written to a file +called wibble.h +in the current directory.

+
  <javah destdir="c" force="yes">
+    <class name="org.foo.bar.Wibble"/>
+    <class name="org.foo.bar.Bobble"/>
+    <class name="org.foo.bar.Tribble"/>
+  </javah>
+

writes three header files, one for each of the classes named. Because the +force option is set, these header files are always written when the Javah task +is invoked, even if they already exist.

+
  <javah destdir="c" verbose="yes" old="yes" force="yes">
+    <class name="org.foo.bar.Wibble"/>
+    <class name="org.foo.bar.Bobble"/>
+    <class name="org.foo.bar.Tribble"/>
+  </javah>
+  <javah destdir="c" verbose="yes" stubs="yes" old="yes" force="yes">
+    <class name="org.foo.bar.Wibble"/>
+    <class name="org.foo.bar.Bobble"/>
+    <class name="org.foo.bar.Tribble"/>
+  </javah>
+

writes the headers for the three classes using the 'old' JNI format, then +writes the corresponding .c stubs. The verbose option will cause Javah to +describe its progress.

+ +

If you want to use a custom + JavahAdapter org.example.MyAdapter you can either + use the implementation attribute:

+
+<javah destdir="c" class="org.foo.bar.Wibble"
+       implementation="org.example.MyAdapter"/>
+
+

or a define a type and nest this into the task like in:

+
+<componentdef classname="org.example.MyAdapter"
+              name="myadapter"/>
+<javah destdir="c" class="org.foo.bar.Wibble">
+  <myadapter/>
+</javah>
+
+

in which case your javah adapter can support attributes and + nested elements of its own.

+ + + + -- cgit 1.2.3-korg