@@ -22,16 +22,19 @@ import kotlin.jvm.JvmStatic
2222 * The JavaClassWrapper singleton provides a way for the Godot application to send and receive data
2323 * through the [url=https://developer.android.com/training/articles/perf-jni]Java Native
2424 * Interface[/url] (JNI).
25+ *
2526 * **Note:** This singleton is only available in Android builds.
26- * [codeblock]
27+ *
28+ * ```
2729 * var LocalDateTime = JavaClassWrapper.wrap("java.time.LocalDateTime")
2830 * var DateTimeFormatter = JavaClassWrapper.wrap("java.time.format.DateTimeFormatter")
2931 *
3032 * var datetime = LocalDateTime.now()
3133 * var formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss")
3234 *
3335 * print(datetime.format(formatter))
34- * [/codeblock]
36+ * ```
37+ *
3538 * **Warning:** When calling Java methods, be sure to check [JavaClassWrapper.getException] to check
3639 * if the method threw an exception.
3740 */
@@ -44,9 +47,11 @@ public object JavaClassWrapper : Object() {
4447 /* *
4548 * Wraps a class defined in Java, and returns it as a [JavaClass] [Object] type that Godot can
4649 * interact with.
50+ *
4751 * When wrapping inner (nested) classes, use `$` instead of `.` to separate them. For example,
4852 * `JavaClassWrapper.wrap("android.view.WindowManager$LayoutParams")` wraps the
4953 * **WindowManager.LayoutParams** class.
54+ *
5055 * **Note:** This method only works on Android. On every other platform, this method does nothing
5156 * and returns an empty [JavaClass].
5257 */
@@ -60,6 +65,7 @@ public object JavaClassWrapper : Object() {
6065 /* *
6166 * Returns the Java exception from the last call into a Java class. If there was no exception, it
6267 * will return `null`.
68+ *
6369 * **Note:** This method only works on Android. On every other platform, this method will always
6470 * return `null`.
6571 */
0 commit comments