diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-12-12 01:12:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-12 01:12:23 +0200 |
commit | 248c1d9bd5a043ee4c0a28b895b064c758ac70ac (patch) | |
tree | 1d726def5f35312c69720e0f6e1b70781e83be2a /docs/markdown | |
parent | 9c1bf2bf4ca413b54a398964681f7eef0d104316 (diff) | |
parent | dfea023ced8b48b318826738f54328ea24ef63b3 (diff) | |
download | meson-248c1d9bd5a043ee4c0a28b895b064c758ac70ac.zip meson-248c1d9bd5a043ee4c0a28b895b064c758ac70ac.tar.gz meson-248c1d9bd5a043ee4c0a28b895b064c758ac70ac.tar.bz2 |
Merge pull request #11071 from tristan957/java-module
Java module 1.0.0 updates
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Java-module.md | 45 | ||||
-rw-r--r-- | docs/markdown/snippets/java_native_headers.md | 4 |
2 files changed, 49 insertions, 0 deletions
diff --git a/docs/markdown/Java-module.md b/docs/markdown/Java-module.md index 1665b7b..aa95f78 100644 --- a/docs/markdown/Java-module.md +++ b/docs/markdown/Java-module.md @@ -7,6 +7,7 @@ ### `generate_native_header()` *(deprecated in 0.62.0, use `generate_native_headers()`)* +*(removed in 1.0.0)* This function will generate a header file for use in Java native module development by reading the supplied Java file for `native` method declarations. @@ -19,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. diff --git a/docs/markdown/snippets/java_native_headers.md b/docs/markdown/snippets/java_native_headers.md new file mode 100644 index 0000000..0c5df09 --- /dev/null +++ b/docs/markdown/snippets/java_native_headers.md @@ -0,0 +1,4 @@ +## Deprecate `java.generate_native_headers`, rename to `java.native_headers` + +The functions operate in the exact same way. The new name matches more with +Meson function name styling. |