diff options
author | Tristan Partin <tristan@partin.io> | 2022-11-17 15:48:48 -0600 |
---|---|---|
committer | Tristan Partin <tristan@partin.io> | 2022-12-11 14:50:26 -0600 |
commit | 2e600ef7104d89e1bee602c1cc56822b7f226f43 (patch) | |
tree | 8a6e324429fad3f4edf118b7a00812b9a8c463b5 /docs/markdown/Java-module.md | |
parent | b746e92f624a96bc7511a6e48a285ef480ddc6bf (diff) | |
download | meson-2e600ef7104d89e1bee602c1cc56822b7f226f43.zip meson-2e600ef7104d89e1bee602c1cc56822b7f226f43.tar.gz meson-2e600ef7104d89e1bee602c1cc56822b7f226f43.tar.bz2 |
Rename java.generate_native_headers to java.native_headers
This follows the Meson naming scheme which typically leaves off a verb
like generate.
Diffstat (limited to 'docs/markdown/Java-module.md')
-rw-r--r-- | docs/markdown/Java-module.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/markdown/Java-module.md b/docs/markdown/Java-module.md index 54438e2..aa95f78 100644 --- a/docs/markdown/Java-module.md +++ b/docs/markdown/Java-module.md @@ -20,6 +20,50 @@ file. If left empty, Meson will assume that there is no package. ### `generate_native_headers()` *(added in 0.62.0)* +*(deprecated in 1.0.0, use `native_headers()`)* + +This function will generate native header files for use in Java native module +development by reading the supplied Java files for `native` method declarations. + +Keyword arguments: + +- `classes`: The list of class names relative to the `package`, if it exists, +which contain `native` method declarations. Use `.` separated class names. + +- `package`: The [package](https://en.wikipedia.org/wiki/Java_package) of the +file. If left empty, Meson will assume that there is no package. + +Example: + +```java +// Outer.java + +package com.mesonbuild; + +public class Outer { + private static native void outer(); + + public static class Inner { + private static native void inner(); + } +} +``` + +With the above file, an invocation would look like the following: + +```meson +java = import('java') + +native_headers = java.generate_native_headers( + 'Outer.java', + package: 'com.mesonbuild', + classes: ['Outer', 'Outer.Inner'] +) +``` + +### `native_headers()` + +*(added in 1.0.0)* This function will generate native header files for use in Java native module development by reading the supplied Java files for `native` method declarations. |