[jnigen] Few improvements in generated C code including exception support. (https://github.com/dart-lang/jnigen/issues/87)

* C bindings no longer use fully qualified names. Instead, it uses number-renamed simple names. The classes are sorted in the summarizer to ensure the order is deterministic. This enables shorter symbol names and less verbose bindings.

* C bindings are formatted using same style as Dart SDK, using clang-format. If clang-format is not available, jnigen will issue a warning.
Closes: https://github.com/dart-lang/jnigen/issues/84

* C bindings return `JniResult`. The older `Jni.checkException` stopgap is removed. It reduces one line per function binding in dart. Lastly exceptions will work properly on android
Closes: https://github.com/dart-lang/jnigen/issues/56
diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml
index e583083..104a802 100644
--- a/.github/workflows/test-package.yml
+++ b/.github/workflows/test-package.yml
@@ -79,6 +79,12 @@
           distribution: 'zulu'
           java-version: '11'
           cache: maven
+      ## Committed bindings are formatted with clang-format.
+      ## So this is required to format generated bindings identically
+      - name: install clang tools
+        run: |
+          sudo apt-get update -y
+          sudo apt-get install -y clang-format
       - name: Install dependencies
         run: dart pub get
       - name: Run VM tests
@@ -126,7 +132,7 @@
         with:
           distribution: 'zulu'
           java-version: '11'
-      - name: install clang tools
+      - name: install clang tools & CMake
         run: |
           sudo apt-get update -y
           sudo apt-get install -y clang-format build-essential cmake
@@ -143,6 +149,7 @@
           dart run tool/generate_ide_files.dart
           ls src/compile_commands.json
 
+
   test_jni:
     runs-on: ubuntu-latest
     needs: [analyze_jni]
@@ -220,6 +227,11 @@
         working-directory: ./pkgs/jnigen
     steps:
       - uses: actions/checkout@v3
+      - name: Setup clang
+        uses: egor-tensin/setup-clang@v1
+        with:
+          version: latest
+          platform: x64
       - uses: subosito/flutter-action@v2
         with:
           channel: 'stable'
@@ -341,6 +353,10 @@
           channel: 'stable'
           cache: true
           cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
+      - name: install clang tools
+        run: |
+          sudo apt-get update -y
+          sudo apt-get install -y clang-format
       - run: flutter pub get
       - run: flutter analyze
       - run: flutter build apk
@@ -369,7 +385,7 @@
           java-version: '11'
       - run: |
           sudo apt-get update -y
-          sudo apt-get install -y ninja-build libgtk-3-dev
+          sudo apt-get install -y ninja-build libgtk-3-dev clang-format
       - run: flutter config --enable-linux-desktop
       - run: dart pub get
       - name: Generate bindings
@@ -378,7 +394,7 @@
       - name: Compare generated bindings
         run: |
           diff -qr _c src/
-          diff -qr _dart lib/third_party
+          diff -qr _dart lib/src/third_party
       - name: Generate full bindings
         run: dart run jnigen --config jnigen.yaml --override classes="org.apache.pdfbox.pdmodel;org.apache.pdfbox.text"
       - name: Analyze generated bindings
diff --git a/pkgs/jni/lib/jni.dart b/pkgs/jni/lib/jni.dart
index 7306fd8..49485a5 100644
--- a/pkgs/jni/lib/jni.dart
+++ b/pkgs/jni/lib/jni.dart
@@ -60,11 +60,9 @@
 library jni;
 
 export 'src/third_party/jni_bindings_generated.dart'
-    hide JniBindings, JniEnv, JniEnv1;
+    hide JniBindings, JniEnv, JniEnv1, JniExceptionDetails;
 export 'src/jni.dart' hide ProtectedJniExtensions;
 export 'src/jvalues.dart' hide JValueArgs, toJValues;
-export 'src/env_extensions.dart'
-    show StringMethodsForJni, CharPtrMethodsForJni, AdditionalEnvMethods;
 export 'src/jni_exceptions.dart';
 export 'src/jni_object.dart' hide JniReference;
 
diff --git a/pkgs/jni/lib/src/accessors.dart b/pkgs/jni/lib/src/accessors.dart
index 030d87c..1d37907 100644
--- a/pkgs/jni/lib/src/accessors.dart
+++ b/pkgs/jni/lib/src/accessors.dart
@@ -9,13 +9,11 @@
 
 import 'third_party/jni_bindings_generated.dart';
 import 'jni.dart';
-import 'env_extensions.dart';
-
-Pointer<GlobalJniEnv> env = Jni.env;
+import 'jni_exceptions.dart';
 
 void _check(JThrowable exception) {
   if (exception != nullptr) {
-    env.throwException(exception);
+    Jni.accessors.throwException(exception);
   }
 }
 
@@ -88,6 +86,21 @@
 }
 
 extension JniAccessorWrappers on Pointer<JniAccessors> {
+  /// Rethrows Java exception in Dart as [JniException].
+  ///
+  /// The original exception object is deleted by this method. The message
+  /// and Java stack trace are included in the exception.
+  void throwException(JThrowable exception) {
+    final details = getExceptionDetails(exception);
+    final env = Jni.env;
+    final message = env.asDartString(details.message);
+    final stacktrace = env.asDartString(details.stacktrace);
+    env.DeleteGlobalRef(exception);
+    env.DeleteGlobalRef(details.message);
+    env.DeleteGlobalRef(details.stacktrace);
+    throw JniException(message, stacktrace);
+  }
+
   // TODO(PR): How to name these methods? These only wrap toNativeChars()
   // so that generated bindings are less verbose.
   JClass getClassOf(String internalName) =>
diff --git a/pkgs/jni/lib/src/env_extensions.dart b/pkgs/jni/lib/src/env_extensions.dart
deleted file mode 100644
index c9164ef..0000000
--- a/pkgs/jni/lib/src/env_extensions.dart
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:ffi';
-
-import 'package:ffi/ffi.dart';
-
-import 'third_party/jni_bindings_generated.dart';
-
-import 'jni_exceptions.dart';
-
-extension AdditionalEnvMethods on Pointer<GlobalJniEnv> {
-  /// Convenience method for converting a [JString]
-  /// to dart string.
-  /// if [deleteOriginal] is specified, jstring passed will be deleted using
-  /// DeleteLocalRef.
-  String asDartString(JString jstring, {bool deleteOriginal = false}) {
-    final chars = GetStringUTFChars(jstring, nullptr);
-    if (chars == nullptr) {
-      checkException();
-    }
-    final result = chars.cast<Utf8>().toDartString();
-    ReleaseStringUTFChars(jstring, chars);
-    if (deleteOriginal) {
-      DeleteGlobalRef(jstring);
-    }
-    return result;
-  }
-
-  /// Return a new [JString] from contents of [s].
-  JString asJString(String s) => using((arena) {
-        final utf = s.toNativeUtf8().cast<Char>();
-        final result = NewStringUTF(utf);
-        malloc.free(utf);
-        return result;
-      });
-
-  /// Deletes all references in [refs].
-  void deleteAllRefs(List<JObject> refs) {
-    for (final ref in refs) {
-      DeleteGlobalRef(ref);
-    }
-  }
-
-  /// If any exception is pending in JNI, throw it in Dart.
-  ///
-  /// If [describe] is true, a description is printed to screen.
-  /// To access actual exception object, use `ExceptionOccurred`.
-  ///
-  /// TODO(#64): Do not keep reference to exception, store stack trace & error.
-  void checkException({bool describe = false}) {
-    final exc = ExceptionOccurred();
-    throwException(exc);
-  }
-
-  /// Throw [exception] from JNI in Dart as a [JniException].
-  void throwException(JObject exception, {bool describe = false}) {
-    if (exception == nullptr) {
-      return;
-    }
-    final exceptionClass = GetObjectClass(exception);
-    final toStringMethod = GetMethodID(exceptionClass, _toString, _toStringSig);
-    final javaDescription = CallObjectMethod(exception, toStringMethod);
-    final dartDescription = asDartString(javaDescription);
-    DeleteGlobalRef(javaDescription);
-    DeleteGlobalRef(exceptionClass);
-    throw JniException(exception, dartDescription);
-  }
-
-  /// Calls the printStackTrace on exception object
-  /// obtained by java
-  void printStackTrace(JniException je) {
-    final ecls = GetObjectClass(je.err);
-    final printStackTrace =
-        GetMethodID(ecls, _printStackTrace, _printStackTraceSig);
-    CallVoidMethod(je.err, printStackTrace);
-    DeleteGlobalRef(ecls);
-  }
-}
-
-extension StringMethodsForJni on String {
-  /// Returns a Utf-8 encoded Pointer<Char> with contents same as this string.
-  Pointer<Char> toNativeChars([Allocator allocator = malloc]) {
-    return toNativeUtf8(allocator: allocator).cast<Char>();
-  }
-}
-
-extension CharPtrMethodsForJni on Pointer<Char> {
-  /// Same as calling `cast<Utf8>` followed by `toDartString`.
-  String toDartString() {
-    return cast<Utf8>().toDartString();
-  }
-}
-
-final _toString = "toString".toNativeChars();
-final _toStringSig = "()Ljava/lang/String;".toNativeChars();
-final _printStackTrace = "printStackTrace".toNativeChars();
-final _printStackTraceSig = "()V".toNativeChars();
diff --git a/pkgs/jni/lib/src/jni.dart b/pkgs/jni/lib/src/jni.dart
index 2b8d10f..36c5220 100644
--- a/pkgs/jni/lib/src/jni.dart
+++ b/pkgs/jni/lib/src/jni.dart
@@ -9,7 +9,6 @@
 import 'package:path/path.dart';
 
 import 'third_party/jni_bindings_generated.dart';
-import 'env_extensions.dart';
 import 'jvalues.dart';
 import 'jni_exceptions.dart';
 import 'jni_object.dart';
@@ -256,3 +255,54 @@
     return lookup;
   }
 }
+
+extension AdditionalEnvMethods on Pointer<GlobalJniEnv> {
+  /// Convenience method for converting a [JString]
+  /// to dart string.
+  /// if [deleteOriginal] is specified, jstring passed will be deleted using
+  /// DeleteLocalRef.
+  String asDartString(JString jstring, {bool deleteOriginal = false}) {
+    if (jstring == nullptr) {
+      throw NullJniStringException();
+    }
+    final chars = GetStringUTFChars(jstring, nullptr);
+    if (chars == nullptr) {
+      throw InvalidJniStringException(jstring);
+    }
+    final result = chars.cast<Utf8>().toDartString();
+    ReleaseStringUTFChars(jstring, chars);
+    if (deleteOriginal) {
+      DeleteGlobalRef(jstring);
+    }
+    return result;
+  }
+
+  /// Return a new [JString] from contents of [s].
+  JString asJString(String s) => using((arena) {
+        final utf = s.toNativeUtf8().cast<Char>();
+        final result = NewStringUTF(utf);
+        malloc.free(utf);
+        return result;
+      });
+
+  /// Deletes all references in [refs].
+  void deleteAllRefs(List<JObject> refs) {
+    for (final ref in refs) {
+      DeleteGlobalRef(ref);
+    }
+  }
+}
+
+extension StringMethodsForJni on String {
+  /// Returns a Utf-8 encoded Pointer<Char> with contents same as this string.
+  Pointer<Char> toNativeChars([Allocator allocator = malloc]) {
+    return toNativeUtf8(allocator: allocator).cast<Char>();
+  }
+}
+
+extension CharPtrMethodsForJni on Pointer<Char> {
+  /// Same as calling `cast<Utf8>` followed by `toDartString`.
+  String toDartString() {
+    return cast<Utf8>().toDartString();
+  }
+}
diff --git a/pkgs/jni/lib/src/jni_exceptions.dart b/pkgs/jni/lib/src/jni_exceptions.dart
index 939c465..073b4b2 100644
--- a/pkgs/jni/lib/src/jni_exceptions.dart
+++ b/pkgs/jni/lib/src/jni_exceptions.dart
@@ -22,6 +22,14 @@
   String toString() => 'toDartString called on null JniString reference';
 }
 
+class InvalidJniStringException implements Exception {
+  Pointer<Void> reference;
+  InvalidJniStringException(this.reference);
+  @override
+  String toString() => 'Not a valid Java String: '
+      '0x${reference.address.toRadixString(16)}';
+}
+
 class DoubleFreeException implements Exception {
   dynamic object;
   Pointer<Void> ptr;
@@ -69,15 +77,16 @@
 }
 
 class JniException implements Exception {
-  /// Exception object pointer from JNI.
-  final JObject err;
+  /// Error message from Java exception.
+  final String message;
 
-  /// brief description, usually initialized with error message from Java.
-  final String msg;
-  JniException(this.err, this.msg);
+  /// Stack trace from Java.
+  final String stackTrace;
+  JniException(this.message, this.stackTrace);
 
   @override
-  String toString() => msg;
+  String toString() => 'Exception in Java code called through JNI: '
+      '$message\n\n$stackTrace\n';
 }
 
 class HelperNotFoundException implements Exception {
diff --git a/pkgs/jni/lib/src/jni_object.dart b/pkgs/jni/lib/src/jni_object.dart
index 80cf707..92d5581 100644
--- a/pkgs/jni/lib/src/jni_object.dart
+++ b/pkgs/jni/lib/src/jni_object.dart
@@ -9,7 +9,6 @@
 import 'third_party/jni_bindings_generated.dart';
 import 'jni_exceptions.dart';
 import 'jni.dart';
-import 'env_extensions.dart';
 import 'accessors.dart';
 import 'jvalues.dart';
 
@@ -86,7 +85,7 @@
   final result = using(
       (arena) => f(ptr, name.toNativeChars(arena), sig.toNativeChars(arena)));
   if (result.exception != nullptr) {
-    env.throwException(result.exception);
+    _accessors.throwException(result.exception);
   }
   return result.id.cast<T>();
 }
@@ -213,7 +212,9 @@
   JniClass getClass() {
     _ensureNotDeleted();
     final classRef = _env.GetObjectClass(reference);
-    if (classRef == nullptr) _env.checkException();
+    if (classRef == nullptr) {
+      _accessors.throwException(_env.ExceptionOccurred());
+    }
     return JniClass.fromRef(classRef);
   }
 
@@ -425,7 +426,7 @@
         final chars = s.toNativeUtf8(allocator: arena).cast<Char>();
         final jstr = _env.NewStringUTF(chars);
         if (jstr == nullptr) {
-          _env.checkException();
+          throw 'Fatal: cannot convert string to Java string: $s';
         }
         return jstr;
       });
diff --git a/pkgs/jni/lib/src/jvalues.dart b/pkgs/jni/lib/src/jvalues.dart
index 33946b8..4d1a394 100644
--- a/pkgs/jni/lib/src/jvalues.dart
+++ b/pkgs/jni/lib/src/jvalues.dart
@@ -8,7 +8,6 @@
 import 'third_party/jni_bindings_generated.dart';
 import 'jni.dart';
 import 'jni_object.dart';
-import 'env_extensions.dart';
 
 void _fillJValue(Pointer<JValue> pos, dynamic arg) {
   if (arg is JniObject) {
diff --git a/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart b/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart
index a93b135..db16319 100644
--- a/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart
+++ b/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart
@@ -1447,6 +1447,14 @@
   external JThrowable exception;
 }
 
+/// JniExceptionDetails holds 2 jstring objects, one is the result of
+/// calling `toString` on exception object, other is stack trace;
+class JniExceptionDetails extends ffi.Struct {
+  external JString message;
+
+  external JString stacktrace;
+}
+
 /// This struct contains functions which wrap method call / field access conveniently along with
 /// exception checking.
 ///
@@ -1505,6 +1513,10 @@
   external ffi.Pointer<
           ffi.NativeFunction<JniResult Function(JClass, JFieldID, ffi.Int)>>
       getStaticField;
+
+  external ffi
+          .Pointer<ffi.NativeFunction<JniExceptionDetails Function(JThrowable)>>
+      getExceptionDetails;
 }
 
 extension JniAccessorsExtension on ffi.Pointer<JniAccessors> {
@@ -1573,6 +1585,11 @@
             .asFunction<JniResult Function(JClass, JFieldID, int)>()(
         cls, fieldID, callType);
   }
+
+  JniExceptionDetails getExceptionDetails(JThrowable exception) {
+    return ref.getExceptionDetails
+        .asFunction<JniExceptionDetails Function(JThrowable)>()(exception);
+  }
 }
 
 /// Wrapper over JNIEnv in the JNI API, which can be used from multiple Dart
diff --git a/pkgs/jni/src/dartjni.c b/pkgs/jni/src/dartjni.c
index 36af423..8ab9515 100644
--- a/pkgs/jni/src/dartjni.c
+++ b/pkgs/jni/src/dartjni.c
@@ -8,11 +8,37 @@
 
 #include "dartjni.h"
 
+/// Stores class and method references for obtaining exception details
+typedef struct JniExceptionMethods {
+  jclass objectClass, exceptionClass, printStreamClass;
+  jclass byteArrayOutputStreamClass;
+  jmethodID toStringMethod, printStackTraceMethod;
+  jmethodID byteArrayOutputStreamCtor, printStreamCtor;
+} JniExceptionMethods;
+
 // Context and shared global state. Initialized once or if thread-local, initialized once in a thread.
 JniContext jni = {NULL, NULL, NULL, NULL, NULL};
 
 thread_local JNIEnv* jniEnv = NULL;
 
+JniExceptionMethods exceptionMethods;
+
+void initializeExceptionMethods(JniExceptionMethods* methods) {
+  methods->objectClass = LoadClass("java/lang/Object");
+  methods->exceptionClass = LoadClass("java/lang/Exception");
+  methods->printStreamClass = LoadClass("java/io/PrintStream");
+  methods->byteArrayOutputStreamClass =
+      LoadClass("java/io/ByteArrayOutputStream");
+  load_method(methods->objectClass, &methods->toStringMethod, "toString",
+              "()Ljava/lang/String;");
+  load_method(methods->exceptionClass, &methods->printStackTraceMethod,
+              "printStackTrace", "(Ljava/io/PrintStream;)V");
+  load_method(methods->byteArrayOutputStreamClass,
+              &methods->byteArrayOutputStreamCtor, "<init>", "()V");
+  load_method(methods->printStreamClass, &methods->printStreamCtor, "<init>",
+              "(Ljava/io/OutputStream;)V");
+}
+
 /// Get JVM associated with current process.
 /// Returns NULL if no JVM is running.
 FFI_PLUGIN_EXPORT
@@ -76,6 +102,7 @@
   jni.loadClassMethod =
       (*env)->GetMethodID(env, classLoaderClass, "loadClass",
                           "(Ljava/lang/String;)Ljava/lang/Class;");
+  initializeExceptionMethods(&exceptionMethods);
 }
 
 JNIEXPORT void JNICALL
@@ -114,6 +141,7 @@
   if (flag == JNI_ERR) {
     return NULL;
   }
+  initializeExceptionMethods(&exceptionMethods);
   return jniEnv;
 }
 #endif
@@ -121,17 +149,10 @@
 // accessors - a bunch of functions which are directly called by jnigen generated bindings
 // and also package:jni reflective method access.
 
-jthrowable exceptionCheck() {
-  jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv);
-  if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv);
-  if (exception == NULL) return NULL;
-  return to_global_ref(exception);
-}
-
 JniClassLookupResult getClass(char* internalName) {
   JniClassLookupResult result = {NULL, NULL};
   result.classRef = LoadClass(internalName);
-  result.exception = exceptionCheck();
+  result.exception = check_exception();
   return result;
 }
 
@@ -143,7 +164,7 @@
   JniPointerResult result = {NULL, NULL};
   attach_thread();
   result.id = getter(jniEnv, cls, name, sig);
-  result.exception = exceptionCheck();
+  result.exception = check_exception();
   return result;
 }
 
@@ -203,7 +224,7 @@
       break;
   }
   JniResult jniResult = {.result = result, .exception = NULL};
-  jniResult.exception = exceptionCheck();
+  jniResult.exception = check_exception();
   return jniResult;
 }
 
@@ -250,7 +271,7 @@
       break;
   }
   JniResult jniResult = {.result = result, .exception = NULL};
-  jniResult.exception = exceptionCheck();
+  jniResult.exception = check_exception();
   return jniResult;
 }
 
@@ -290,7 +311,7 @@
       break;
   }
   JniResult jniResult = {.result = result, .exception = NULL};
-  jniResult.exception = exceptionCheck();
+  jniResult.exception = check_exception();
   return jniResult;
 }
 
@@ -334,7 +355,7 @@
       break;
   }
   JniResult jniResult = {.result = result, .exception = NULL};
-  jniResult.exception = exceptionCheck();
+  jniResult.exception = check_exception();
   return jniResult;
 }
 
@@ -343,10 +364,29 @@
   JniResult jniResult;
   jniResult.result.l =
       to_global_ref((*jniEnv)->NewObjectA(jniEnv, cls, ctor, args));
-  jniResult.exception = exceptionCheck();
+  jniResult.exception = check_exception();
   return jniResult;
 }
 
+JniExceptionDetails getExceptionDetails(jthrowable exception) {
+  JniExceptionDetails details;
+  details.message = (*jniEnv)->CallObjectMethod(
+      jniEnv, exception, exceptionMethods.toStringMethod);
+  jobject buffer =
+      (*jniEnv)->NewObject(jniEnv, exceptionMethods.byteArrayOutputStreamClass,
+                           exceptionMethods.byteArrayOutputStreamCtor);
+  jobject printStream =
+      (*jniEnv)->NewObject(jniEnv, exceptionMethods.printStreamClass,
+                           exceptionMethods.printStreamCtor, buffer);
+  (*jniEnv)->CallVoidMethod(
+      jniEnv, exception, exceptionMethods.printStackTraceMethod, printStream);
+  details.stacktrace = (*jniEnv)->CallObjectMethod(
+      jniEnv, buffer, exceptionMethods.toStringMethod);
+  details.message = to_global_ref(details.message);
+  details.stacktrace = to_global_ref(details.stacktrace);
+  return details;
+}
+
 JniAccessors accessors = {
     .getClass = getClass,
     .getFieldID = getFieldID,
@@ -358,6 +398,7 @@
     .callStaticMethod = callStaticMethod,
     .getField = getField,
     .getStaticField = getStaticField,
+    .getExceptionDetails = getExceptionDetails,
 };
 
 FFI_PLUGIN_EXPORT JniAccessors* GetAccessors() {
diff --git a/pkgs/jni/src/dartjni.h b/pkgs/jni/src/dartjni.h
index bc72baa..efb9079 100644
--- a/pkgs/jni/src/dartjni.h
+++ b/pkgs/jni/src/dartjni.h
@@ -89,6 +89,13 @@
   jthrowable exception;
 } JniPointerResult;
 
+/// JniExceptionDetails holds 2 jstring objects, one is the result of
+/// calling `toString` on exception object, other is stack trace;
+typedef struct JniExceptionDetails {
+  jstring message;
+  jstring stacktrace;
+} JniExceptionDetails;
+
 /// This struct contains functions which wrap method call / field access conveniently along with
 /// exception checking.
 ///
@@ -118,6 +125,7 @@
                                 jvalue* args);
   JniResult (*getField)(jobject obj, jfieldID fieldID, int callType);
   JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType);
+  JniExceptionDetails (*getExceptionDetails)(jthrowable exception);
 } JniAccessors;
 
 FFI_PLUGIN_EXPORT JniAccessors* GetAccessors();
@@ -240,3 +248,10 @@
     jniEnv = env_getter();
   }
 }
+
+static inline jthrowable check_exception() {
+  jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv);
+  if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv);
+  if (exception == NULL) return NULL;
+  return to_global_ref(exception);
+}
diff --git a/pkgs/jnigen/README.md b/pkgs/jnigen/README.md
index f8b6d44..e197af3 100644
--- a/pkgs/jnigen/README.md
+++ b/pkgs/jnigen/README.md
@@ -16,6 +16,8 @@
 
 Along with JDK, maven (`mvn` command) is required. On Windows, it can be installed using a package manager such as `chocolatey` or `scoop`.
 
+It's recommended to have `clang-format` installed as well, to format the generated bindings. On Windows, it's part of the standard Clang install. On Linux, it can be installed through the package manager.
+
 On windows, you need to append the path of `jvm.dll` in your JDK installation to PATH.
 
 For example, on Powershell:
diff --git a/pkgs/jnigen/example/in_app_java/jnigen.yaml b/pkgs/jnigen/example/in_app_java/jnigen.yaml
index 52b63cd..4d4280a 100644
--- a/pkgs/jnigen/example/in_app_java/jnigen.yaml
+++ b/pkgs/jnigen/example/in_app_java/jnigen.yaml
@@ -8,4 +8,4 @@
   - 'com.example.in_app_java.AndroidUtils'
 c_root: src/android_utils
 dart_root: lib/android_utils
-
+root_package: com.example
diff --git a/pkgs/jnigen/example/in_app_java/lib/android_utils/com/example/in_app_java.dart b/pkgs/jnigen/example/in_app_java/lib/android_utils/com/example/in_app_java.dart
index f638a75..1f119c6 100644
--- a/pkgs/jnigen/example/in_app_java/lib/android_utils/com/example/in_app_java.dart
+++ b/pkgs/jnigen/example/in_app_java/lib/android_utils/com/example/in_app_java.dart
@@ -8,6 +8,7 @@
 // ignore_for_file: unused_element
 
 import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
 import "package:jni/jni.dart" as jni;
 
 import "../../_init.dart" show jniLookup;
@@ -16,29 +17,23 @@
 class AndroidUtils extends jni.JniObject {
   AndroidUtils.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
 
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_example_in_app_java_AndroidUtils_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "AndroidUtils__ctor")
+      .asFunction<jni.JniResult Function()>();
 
   /// from: public void <init>()
-  AndroidUtils() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
+  AndroidUtils() : super.fromRef(_ctor().object);
 
   static final _showToast = jniLookup<
           ffi.NativeFunction<
-              ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-                  ffi.Int32)>>("com_example_in_app_java_AndroidUtils_showToast")
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>, ffi.Int32)>>("AndroidUtils__showToast")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
 
   /// from: static void showToast(android.app.Activity mainActivity, java.lang.CharSequence text, int duration)
   static void showToast(
-      jni.JniObject mainActivity, jni.JniObject text, int duration) {
-    final result__ =
-        _showToast(mainActivity.reference, text.reference, duration);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+          jni.JniObject mainActivity, jni.JniObject text, int duration) =>
+      _showToast(mainActivity.reference, text.reference, duration).check();
 }
diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/.clang-format b/pkgs/jnigen/example/in_app_java/src/android_utils/.clang-format
new file mode 100644
index 0000000..a256c2f
--- /dev/null
+++ b/pkgs/jnigen/example/in_app_java/src/android_utils/.clang-format
@@ -0,0 +1,15 @@
+# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format
+
+# Defines the Chromium style for automatic reformatting.
+# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+BasedOnStyle: Chromium
+
+# clang-format doesn't seem to do a good job of this for longer comments.
+ReflowComments: 'false'
+
+# We have lots of these. Though we need to put them all in curly braces,
+# clang-format can't do that.
+AllowShortIfStatementsOnASingleLine: 'true'
+
+# Put escaped newlines into the rightmost column.
+AlignEscapedNewlinesLeft: false
diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c b/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c
index 041a9d7..71e05c8 100644
--- a/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c
+++ b/pkgs/jnigen/example/in_app_java/src/android_utils/android_utils.c
@@ -1,44 +1,54 @@
 // Autogenerated by jnigen. DO NOT EDIT!
 
 #include <stdint.h>
-#include "jni.h"
 #include "dartjni.h"
+#include "jni.h"
 
-thread_local JNIEnv *jniEnv;
+thread_local JNIEnv* jniEnv;
 JniContext jni;
 
 JniContext (*context_getter)(void);
-JNIEnv *(*env_getter)(void);
+JNIEnv* (*env_getter)(void);
 
-void setJniGetters(JniContext (*cg)(void),
-        JNIEnv *(*eg)(void)) {
-    context_getter = cg;
-    env_getter = eg;
+void setJniGetters(JniContext (*cg)(void), JNIEnv* (*eg)(void)) {
+  context_getter = cg;
+  env_getter = eg;
 }
 
 // com.example.in_app_java.AndroidUtils
-jclass _c_com_example_in_app_java_AndroidUtils = NULL;
+jclass _c_AndroidUtils = NULL;
 
-jmethodID _m_com_example_in_app_java_AndroidUtils_ctor = NULL;
+jmethodID _m_AndroidUtils__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_example_in_app_java_AndroidUtils_ctor() {
-    load_env();
-    load_class_gr(&_c_com_example_in_app_java_AndroidUtils, "com/example/in_app_java/AndroidUtils");
-    if (_c_com_example_in_app_java_AndroidUtils == NULL) return (jobject)0;
-    load_method(_c_com_example_in_app_java_AndroidUtils, &_m_com_example_in_app_java_AndroidUtils_ctor, "<init>", "()V");
-    if (_m_com_example_in_app_java_AndroidUtils_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_example_in_app_java_AndroidUtils, _m_com_example_in_app_java_AndroidUtils_ctor);
-    return to_global_ref(_result);
+JniResult AndroidUtils__ctor() {
+  load_env();
+  load_class_gr(&_c_AndroidUtils, "com/example/in_app_java/AndroidUtils");
+  if (_c_AndroidUtils == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_AndroidUtils, &_m_AndroidUtils__ctor, "<init>", "()V");
+  if (_m_AndroidUtils__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_AndroidUtils, _m_AndroidUtils__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_example_in_app_java_AndroidUtils_showToast = NULL;
+jmethodID _m_AndroidUtils__showToast = NULL;
 FFI_PLUGIN_EXPORT
-void com_example_in_app_java_AndroidUtils_showToast(jobject mainActivity, jobject text, int32_t duration) {
-    load_env();
-    load_class_gr(&_c_com_example_in_app_java_AndroidUtils, "com/example/in_app_java/AndroidUtils");
-    if (_c_com_example_in_app_java_AndroidUtils == NULL) return (void)0;
-    load_static_method(_c_com_example_in_app_java_AndroidUtils, &_m_com_example_in_app_java_AndroidUtils_showToast, "showToast", "(Landroid/app/Activity;Ljava/lang/CharSequence;I)V");
-    if (_m_com_example_in_app_java_AndroidUtils_showToast == NULL) return (void)0;
-    (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_com_example_in_app_java_AndroidUtils, _m_com_example_in_app_java_AndroidUtils_showToast, mainActivity, text, duration);
+JniResult AndroidUtils__showToast(jobject mainActivity,
+                                  jobject text,
+                                  int32_t duration) {
+  load_env();
+  load_class_gr(&_c_AndroidUtils, "com/example/in_app_java/AndroidUtils");
+  if (_c_AndroidUtils == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_AndroidUtils, &_m_AndroidUtils__showToast, "showToast",
+                     "(Landroid/app/Activity;Ljava/lang/CharSequence;I)V");
+  if (_m_AndroidUtils__showToast == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_AndroidUtils,
+                                  _m_AndroidUtils__showToast, mainActivity,
+                                  text, duration);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
-
diff --git a/pkgs/jnigen/example/in_app_java/src/android_utils/dartjni.h b/pkgs/jnigen/example/in_app_java/src/android_utils/dartjni.h
index bc72baa..efb9079 100644
--- a/pkgs/jnigen/example/in_app_java/src/android_utils/dartjni.h
+++ b/pkgs/jnigen/example/in_app_java/src/android_utils/dartjni.h
@@ -89,6 +89,13 @@
   jthrowable exception;
 } JniPointerResult;
 
+/// JniExceptionDetails holds 2 jstring objects, one is the result of
+/// calling `toString` on exception object, other is stack trace;
+typedef struct JniExceptionDetails {
+  jstring message;
+  jstring stacktrace;
+} JniExceptionDetails;
+
 /// This struct contains functions which wrap method call / field access conveniently along with
 /// exception checking.
 ///
@@ -118,6 +125,7 @@
                                 jvalue* args);
   JniResult (*getField)(jobject obj, jfieldID fieldID, int callType);
   JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType);
+  JniExceptionDetails (*getExceptionDetails)(jthrowable exception);
 } JniAccessors;
 
 FFI_PLUGIN_EXPORT JniAccessors* GetAccessors();
@@ -240,3 +248,10 @@
     jniEnv = env_getter();
   }
 }
+
+static inline jthrowable check_exception() {
+  jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv);
+  if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv);
+  if (exception == NULL) return NULL;
+  return to_global_ref(exception);
+}
diff --git a/pkgs/jnigen/example/notification_plugin/jnigen.yaml b/pkgs/jnigen/example/notification_plugin/jnigen.yaml
index 16315f6..a2249ef 100644
--- a/pkgs/jnigen/example/notification_plugin/jnigen.yaml
+++ b/pkgs/jnigen/example/notification_plugin/jnigen.yaml
@@ -14,4 +14,3 @@
   - 'com.example.notification_plugin.Notifications'
 c_root: src/
 dart_root: lib/
-
diff --git a/pkgs/jnigen/example/notification_plugin/lib/com/example/notification_plugin.dart b/pkgs/jnigen/example/notification_plugin/lib/com/example/notification_plugin.dart
index d0b08fb..f2334b7 100644
--- a/pkgs/jnigen/example/notification_plugin/lib/com/example/notification_plugin.dart
+++ b/pkgs/jnigen/example/notification_plugin/lib/com/example/notification_plugin.dart
@@ -12,6 +12,7 @@
 // ignore_for_file: unused_element
 
 import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
 import "package:jni/jni.dart" as jni;
 
 import "../../_init.dart" show jniLookup;
@@ -20,31 +21,28 @@
 class Notifications extends jni.JniObject {
   Notifications.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
 
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_example_notification_plugin_Notifications_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "Notifications__ctor")
+      .asFunction<jni.JniResult Function()>();
 
   /// from: public void <init>()
-  Notifications() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
+  Notifications() : super.fromRef(_ctor().object);
 
   static final _showNotification = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_example_notification_plugin_Notifications_showNotification")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Int32,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("Notifications__showNotification")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, int, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, int,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: static public void showNotification(android.content.Context context, int notificationID, java.lang.String title, java.lang.String text)
   static void showNotification(jni.JniObject context, int notificationID,
-      jni.JniString title, jni.JniString text) {
-    final result__ = _showNotification(
-        context.reference, notificationID, title.reference, text.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+          jni.JniString title, jni.JniString text) =>
+      _showNotification(context.reference, notificationID, title.reference,
+              text.reference)
+          .check();
 }
diff --git a/pkgs/jnigen/example/notification_plugin/src/.clang-format b/pkgs/jnigen/example/notification_plugin/src/.clang-format
new file mode 100644
index 0000000..a256c2f
--- /dev/null
+++ b/pkgs/jnigen/example/notification_plugin/src/.clang-format
@@ -0,0 +1,15 @@
+# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format
+
+# Defines the Chromium style for automatic reformatting.
+# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+BasedOnStyle: Chromium
+
+# clang-format doesn't seem to do a good job of this for longer comments.
+ReflowComments: 'false'
+
+# We have lots of these. Though we need to put them all in curly braces,
+# clang-format can't do that.
+AllowShortIfStatementsOnASingleLine: 'true'
+
+# Put escaped newlines into the rightmost column.
+AlignEscapedNewlinesLeft: false
diff --git a/pkgs/jnigen/example/notification_plugin/src/dartjni.h b/pkgs/jnigen/example/notification_plugin/src/dartjni.h
index bc72baa..efb9079 100644
--- a/pkgs/jnigen/example/notification_plugin/src/dartjni.h
+++ b/pkgs/jnigen/example/notification_plugin/src/dartjni.h
@@ -89,6 +89,13 @@
   jthrowable exception;
 } JniPointerResult;
 
+/// JniExceptionDetails holds 2 jstring objects, one is the result of
+/// calling `toString` on exception object, other is stack trace;
+typedef struct JniExceptionDetails {
+  jstring message;
+  jstring stacktrace;
+} JniExceptionDetails;
+
 /// This struct contains functions which wrap method call / field access conveniently along with
 /// exception checking.
 ///
@@ -118,6 +125,7 @@
                                 jvalue* args);
   JniResult (*getField)(jobject obj, jfieldID fieldID, int callType);
   JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType);
+  JniExceptionDetails (*getExceptionDetails)(jthrowable exception);
 } JniAccessors;
 
 FFI_PLUGIN_EXPORT JniAccessors* GetAccessors();
@@ -240,3 +248,10 @@
     jniEnv = env_getter();
   }
 }
+
+static inline jthrowable check_exception() {
+  jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv);
+  if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv);
+  if (exception == NULL) return NULL;
+  return to_global_ref(exception);
+}
diff --git a/pkgs/jnigen/example/notification_plugin/src/notification_plugin.c b/pkgs/jnigen/example/notification_plugin/src/notification_plugin.c
index 021b839..f4b384e 100644
--- a/pkgs/jnigen/example/notification_plugin/src/notification_plugin.c
+++ b/pkgs/jnigen/example/notification_plugin/src/notification_plugin.c
@@ -5,44 +5,58 @@
 // Autogenerated by jnigen. DO NOT EDIT!
 
 #include <stdint.h>
-#include "jni.h"
 #include "dartjni.h"
+#include "jni.h"
 
-thread_local JNIEnv *jniEnv;
+thread_local JNIEnv* jniEnv;
 JniContext jni;
 
 JniContext (*context_getter)(void);
-JNIEnv *(*env_getter)(void);
+JNIEnv* (*env_getter)(void);
 
-void setJniGetters(JniContext (*cg)(void),
-        JNIEnv *(*eg)(void)) {
-    context_getter = cg;
-    env_getter = eg;
+void setJniGetters(JniContext (*cg)(void), JNIEnv* (*eg)(void)) {
+  context_getter = cg;
+  env_getter = eg;
 }
 
 // com.example.notification_plugin.Notifications
-jclass _c_com_example_notification_plugin_Notifications = NULL;
+jclass _c_Notifications = NULL;
 
-jmethodID _m_com_example_notification_plugin_Notifications_ctor = NULL;
+jmethodID _m_Notifications__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_example_notification_plugin_Notifications_ctor() {
-    load_env();
-    load_class_gr(&_c_com_example_notification_plugin_Notifications, "com/example/notification_plugin/Notifications");
-    if (_c_com_example_notification_plugin_Notifications == NULL) return (jobject)0;
-    load_method(_c_com_example_notification_plugin_Notifications, &_m_com_example_notification_plugin_Notifications_ctor, "<init>", "()V");
-    if (_m_com_example_notification_plugin_Notifications_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_example_notification_plugin_Notifications, _m_com_example_notification_plugin_Notifications_ctor);
-    return to_global_ref(_result);
+JniResult Notifications__ctor() {
+  load_env();
+  load_class_gr(&_c_Notifications,
+                "com/example/notification_plugin/Notifications");
+  if (_c_Notifications == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Notifications, &_m_Notifications__ctor, "<init>", "()V");
+  if (_m_Notifications__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_Notifications, _m_Notifications__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_example_notification_plugin_Notifications_showNotification = NULL;
+jmethodID _m_Notifications__showNotification = NULL;
 FFI_PLUGIN_EXPORT
-void com_example_notification_plugin_Notifications_showNotification(jobject context, int32_t notificationID, jobject title, jobject text) {
-    load_env();
-    load_class_gr(&_c_com_example_notification_plugin_Notifications, "com/example/notification_plugin/Notifications");
-    if (_c_com_example_notification_plugin_Notifications == NULL) return (void)0;
-    load_static_method(_c_com_example_notification_plugin_Notifications, &_m_com_example_notification_plugin_Notifications_showNotification, "showNotification", "(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)V");
-    if (_m_com_example_notification_plugin_Notifications_showNotification == NULL) return (void)0;
-    (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_com_example_notification_plugin_Notifications, _m_com_example_notification_plugin_Notifications_showNotification, context, notificationID, title, text);
+JniResult Notifications__showNotification(jobject context,
+                                          int32_t notificationID,
+                                          jobject title,
+                                          jobject text) {
+  load_env();
+  load_class_gr(&_c_Notifications,
+                "com/example/notification_plugin/Notifications");
+  if (_c_Notifications == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_Notifications, &_m_Notifications__showNotification, "showNotification",
+      "(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)V");
+  if (_m_Notifications__showNotification == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Notifications,
+                                  _m_Notifications__showNotification, context,
+                                  notificationID, title, text);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
-
diff --git a/pkgs/jnigen/example/pdfbox_plugin/dart_example/bin/pdf_info.dart b/pkgs/jnigen/example/pdfbox_plugin/dart_example/bin/pdf_info.dart
index b3affc5..2788dce 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/dart_example/bin/pdf_info.dart
+++ b/pkgs/jnigen/example/pdfbox_plugin/dart_example/bin/pdf_info.dart
@@ -7,7 +7,7 @@
 import 'package:path/path.dart';
 import 'package:jni/jni.dart';
 
-import 'package:pdfbox_plugin/third_party/org/apache/pdfbox/pdmodel.dart';
+import 'package:pdfbox_plugin/pdfbox_plugin.dart';
 
 void writeInfo(String file) {
   final inputFile = Jni.newInstance(
diff --git a/pkgs/jnigen/example/pdfbox_plugin/example/lib/main.dart b/pkgs/jnigen/example/pdfbox_plugin/example/lib/main.dart
index 6842ba0..adca8a0 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/example/lib/main.dart
+++ b/pkgs/jnigen/example/pdfbox_plugin/example/lib/main.dart
@@ -9,11 +9,7 @@
 import 'package:jni/jni.dart';
 import 'package:path/path.dart';
 
-// Import the generated bindings.
-// Note: the structure generated bindings corresponds to Java package's
-// structure. Therefore, `org.apache.pdfbox.pdmodel` package becomes
-// `org/apache/pdfbox/pdmodel.dart`
-import 'package:pdfbox_plugin/third_party/org/apache/pdfbox/pdmodel.dart';
+import 'package:pdfbox_plugin/pdfbox_plugin.dart';
 
 Stream<String> files(String dir) => Directory(dir).list().map((e) => e.path);
 
diff --git a/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml b/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml
index 1e98f4c..f586d6d 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml
+++ b/pkgs/jnigen/example/pdfbox_plugin/jnigen.yaml
@@ -33,7 +33,7 @@
 c_subdir: 'third_party/'
 
 ## Root for generated Dart bindings.
-dart_root: 'lib/third_party/'
+dart_root: 'lib/src/third_party/'
 
 ## Classes / packages for which bindings need to be generated.
 classes:
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/pdfbox_plugin.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/pdfbox_plugin.dart
new file mode 100644
index 0000000..edf3508
--- /dev/null
+++ b/pkgs/jnigen/example/pdfbox_plugin/lib/pdfbox_plugin.dart
@@ -0,0 +1,5 @@
+/// File merely exporting the generated bindings from lib/src/third_party
+library pdfbox_plugin;
+
+export 'src/third_party/org/apache/pdfbox/pdmodel.dart';
+export 'src/third_party/org/apache/pdfbox/text.dart';
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/third_party/_init.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart
similarity index 100%
rename from pkgs/jnigen/example/pdfbox_plugin/lib/third_party/_init.dart
rename to pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel.dart
new file mode 100644
index 0000000..304a95c
--- /dev/null
+++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel.dart
@@ -0,0 +1,2225 @@
+// Generated from Apache PDFBox library which is licensed under the Apache License 2.0.
+// The following copyright from the original authors applies.
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Autogenerated by jnigen. DO NOT EDIT!
+
+// ignore_for_file: camel_case_types
+// ignore_for_file: non_constant_identifier_names
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: annotate_overrides
+// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: unused_element
+
+import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
+import "package:jni/jni.dart" as jni;
+
+import "../../../_init.dart" show jniLookup;
+
+/// from: org.apache.pdfbox.pdmodel.PDDocument
+///
+/// This is the in-memory representation of the PDF document.
+/// The \#close() method must be called once the document is no longer needed.
+///@author Ben Litchfield
+class PDDocument extends jni.JniObject {
+  PDDocument.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+
+  static final _get_RESERVE_BYTE_RANGE =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_PDDocument__RESERVE_BYTE_RANGE")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: private static final int[] RESERVE_BYTE_RANGE
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// For signing: large reserve byte range used as placeholder in the saved PDF until the actual
+  /// length of the PDF is known. You'll need to fetch (with
+  /// PDSignature\#getByteRange() ) and reassign this yourself (with
+  /// PDSignature\#setByteRange(int[]) ) only if you call
+  /// \#saveIncrementalForExternalSigning(java.io.OutputStream) saveIncrementalForExternalSigning()
+  /// twice.
+  static jni.JniObject get RESERVE_BYTE_RANGE =>
+      jni.JniObject.fromRef(_get_RESERVE_BYTE_RANGE().object);
+
+  static final _get_LOG =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_PDDocument__LOG")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: private static final org.apache.commons.logging.Log LOG
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  static jni.JniObject get LOG => jni.JniObject.fromRef(_get_LOG().object);
+
+  static final _get_document = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__document")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private final org.apache.pdfbox.cos.COSDocument document
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get document =>
+      jni.JniObject.fromRef(_get_document(reference).object);
+
+  static final _get_documentInformation = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__documentInformation")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.PDDocumentInformation documentInformation
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  PDDocumentInformation get documentInformation =>
+      PDDocumentInformation.fromRef(_get_documentInformation(reference).object);
+  static final _set_documentInformation = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>>(
+          "set_PDDocument__documentInformation")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.PDDocumentInformation documentInformation
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set documentInformation(PDDocumentInformation value) =>
+      _set_documentInformation(reference, value.reference);
+
+  static final _get_documentCatalog = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__documentCatalog")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.PDDocumentCatalog documentCatalog
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get documentCatalog =>
+      jni.JniObject.fromRef(_get_documentCatalog(reference).object);
+  static final _set_documentCatalog = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDDocument__documentCatalog")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.PDDocumentCatalog documentCatalog
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set documentCatalog(jni.JniObject value) =>
+      _set_documentCatalog(reference, value.reference);
+
+  static final _get_encryption = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__encryption")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.encryption.PDEncryption encryption
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get encryption =>
+      jni.JniObject.fromRef(_get_encryption(reference).object);
+  static final _set_encryption = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDDocument__encryption")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.encryption.PDEncryption encryption
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set encryption(jni.JniObject value) =>
+      _set_encryption(reference, value.reference);
+
+  static final _get_allSecurityToBeRemoved = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__allSecurityToBeRemoved")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private boolean allSecurityToBeRemoved
+  bool get allSecurityToBeRemoved =>
+      _get_allSecurityToBeRemoved(reference).boolean;
+  static final _set_allSecurityToBeRemoved = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Uint8)>>("set_PDDocument__allSecurityToBeRemoved")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private boolean allSecurityToBeRemoved
+  set allSecurityToBeRemoved(bool value) =>
+      _set_allSecurityToBeRemoved(reference, value ? 1 : 0);
+
+  static final _get_documentId = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__documentId")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.Long documentId
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get documentId =>
+      jni.JniObject.fromRef(_get_documentId(reference).object);
+  static final _set_documentId = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDDocument__documentId")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.Long documentId
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set documentId(jni.JniObject value) =>
+      _set_documentId(reference, value.reference);
+
+  static final _get_pdfSource = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__pdfSource")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private final org.apache.pdfbox.io.RandomAccessRead pdfSource
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get pdfSource =>
+      jni.JniObject.fromRef(_get_pdfSource(reference).object);
+
+  static final _get_accessPermission = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__accessPermission")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.encryption.AccessPermission accessPermission
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get accessPermission =>
+      jni.JniObject.fromRef(_get_accessPermission(reference).object);
+  static final _set_accessPermission = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDDocument__accessPermission")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.encryption.AccessPermission accessPermission
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set accessPermission(jni.JniObject value) =>
+      _set_accessPermission(reference, value.reference);
+
+  static final _get_fontsToSubset = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__fontsToSubset")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private final java.util.Set<org.apache.pdfbox.pdmodel.font.PDFont> fontsToSubset
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get fontsToSubset =>
+      jni.JniObject.fromRef(_get_fontsToSubset(reference).object);
+
+  static final _get_fontsToClose = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__fontsToClose")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private final java.util.Set<org.apache.fontbox.ttf.TrueTypeFont> fontsToClose
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get fontsToClose =>
+      jni.JniObject.fromRef(_get_fontsToClose(reference).object);
+
+  static final _get_signInterface = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__signInterface")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signInterface
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get signInterface =>
+      jni.JniObject.fromRef(_get_signInterface(reference).object);
+  static final _set_signInterface = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDDocument__signInterface")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signInterface
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set signInterface(jni.JniObject value) =>
+      _set_signInterface(reference, value.reference);
+
+  static final _get_signingSupport = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__signingSupport")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SigningSupport signingSupport
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get signingSupport =>
+      jni.JniObject.fromRef(_get_signingSupport(reference).object);
+  static final _set_signingSupport = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDDocument__signingSupport")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SigningSupport signingSupport
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set signingSupport(jni.JniObject value) =>
+      _set_signingSupport(reference, value.reference);
+
+  static final _get_resourceCache = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__resourceCache")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.ResourceCache resourceCache
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get resourceCache =>
+      jni.JniObject.fromRef(_get_resourceCache(reference).object);
+  static final _set_resourceCache = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDDocument__resourceCache")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.ResourceCache resourceCache
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set resourceCache(jni.JniObject value) =>
+      _set_resourceCache(reference, value.reference);
+
+  static final _get_signatureAdded = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocument__signatureAdded")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private boolean signatureAdded
+  bool get signatureAdded => _get_signatureAdded(reference).boolean;
+  static final _set_signatureAdded = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(
+                  jni.JObject, ffi.Uint8)>>("set_PDDocument__signatureAdded")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private boolean signatureAdded
+  set signatureAdded(bool value) =>
+      _set_signatureAdded(reference, value ? 1 : 0);
+
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "PDDocument__ctor")
+      .asFunction<jni.JniResult Function()>();
+
+  /// from: public void <init>()
+  ///
+  /// Creates an empty PDF document.
+  /// You need to add at least one page for the document to be valid.
+  PDDocument() : super.fromRef(_ctor().object);
+
+  static final _ctor1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__ctor1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void <init>(org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  ///
+  /// Creates an empty PDF document.
+  /// You need to add at least one page for the document to be valid.
+  ///@param memUsageSetting defines how memory is used for buffering PDF streams
+  PDDocument.ctor1(jni.JniObject memUsageSetting)
+      : super.fromRef(_ctor1(memUsageSetting.reference).object);
+
+  static final _ctor2 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__ctor2")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void <init>(org.apache.pdfbox.cos.COSDocument doc)
+  ///
+  /// Constructor that uses an existing document. The COSDocument that is passed in must be valid.
+  ///@param doc The COSDocument that this document wraps.
+  PDDocument.ctor2(jni.JniObject doc)
+      : super.fromRef(_ctor2(doc.reference).object);
+
+  static final _ctor3 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__ctor3")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void <init>(org.apache.pdfbox.cos.COSDocument doc, org.apache.pdfbox.io.RandomAccessRead source)
+  ///
+  /// Constructor that uses an existing document. The COSDocument that is passed in must be valid.
+  ///@param doc The COSDocument that this document wraps.
+  ///@param source the parser which is used to read the pdf
+  PDDocument.ctor3(jni.JniObject doc, jni.JniObject source)
+      : super.fromRef(_ctor3(doc.reference, source.reference).object);
+
+  static final _ctor4 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__ctor4")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void <init>(org.apache.pdfbox.cos.COSDocument doc, org.apache.pdfbox.io.RandomAccessRead source, org.apache.pdfbox.pdmodel.encryption.AccessPermission permission)
+  ///
+  /// Constructor that uses an existing document. The COSDocument that is passed in must be valid.
+  ///@param doc The COSDocument that this document wraps.
+  ///@param source the parser which is used to read the pdf
+  ///@param permission he access permissions of the pdf
+  PDDocument.ctor4(
+      jni.JniObject doc, jni.JniObject source, jni.JniObject permission)
+      : super.fromRef(
+            _ctor4(doc.reference, source.reference, permission.reference)
+                .object);
+
+  static final _addPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__addPage")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void addPage(org.apache.pdfbox.pdmodel.PDPage page)
+  ///
+  /// This will add a page to the document. This is a convenience method, that will add the page to the root of the
+  /// hierarchy and set the parent of the page to the root.
+  ///@param page The page to add to the document.
+  void addPage(jni.JniObject page) =>
+      _addPage(reference, page.reference).check();
+
+  static final _addSignature = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__addSignature")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject)
+  ///
+  /// Add parameters of signature to be created externally using default signature options. See
+  /// \#saveIncrementalForExternalSigning(OutputStream) method description on external
+  /// signature creation scenario details.
+  ///
+  /// Only one signature may be added in a document. To sign several times,
+  /// load document, add signature, save incremental and close again.
+  ///@param sigObject is the PDSignatureField model
+  ///@throws IOException if there is an error creating required fields
+  ///@throws IllegalStateException if one attempts to add several signature
+  /// fields.
+  void addSignature(jni.JniObject sigObject) =>
+      _addSignature(reference, sigObject.reference).check();
+
+  static final _addSignature1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__addSignature1")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options)
+  ///
+  /// Add parameters of signature to be created externally. See
+  /// \#saveIncrementalForExternalSigning(OutputStream) method description on external
+  /// signature creation scenario details.
+  ///
+  /// Only one signature may be added in a document. To sign several times,
+  /// load document, add signature, save incremental and close again.
+  ///@param sigObject is the PDSignatureField model
+  ///@param options signature options
+  ///@throws IOException if there is an error creating required fields
+  ///@throws IllegalStateException if one attempts to add several signature
+  /// fields.
+  void addSignature1(jni.JniObject sigObject, jni.JniObject options) =>
+      _addSignature1(reference, sigObject.reference, options.reference).check();
+
+  static final _addSignature2 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__addSignature2")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface)
+  ///
+  /// Add a signature to be created using the instance of given interface.
+  ///
+  /// Only one signature may be added in a document. To sign several times,
+  /// load document, add signature, save incremental and close again.
+  ///@param sigObject is the PDSignatureField model
+  ///@param signatureInterface is an interface whose implementation provides
+  /// signing capabilities. Can be null if external signing if used.
+  ///@throws IOException if there is an error creating required fields
+  ///@throws IllegalStateException if one attempts to add several signature
+  /// fields.
+  void addSignature2(
+          jni.JniObject sigObject, jni.JniObject signatureInterface) =>
+      _addSignature2(
+              reference, sigObject.reference, signatureInterface.reference)
+          .check();
+
+  static final _addSignature3 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__addSignature3")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options)
+  ///
+  /// This will add a signature to the document. If the 0-based page number in the options
+  /// parameter is smaller than 0 or larger than max, the nearest valid page number will be used
+  /// (i.e. 0 or max) and no exception will be thrown.
+  ///
+  /// Only one signature may be added in a document. To sign several times,
+  /// load document, add signature, save incremental and close again.
+  ///@param sigObject is the PDSignatureField model
+  ///@param signatureInterface is an interface whose implementation provides
+  /// signing capabilities. Can be null if external signing if used.
+  ///@param options signature options
+  ///@throws IOException if there is an error creating required fields
+  ///@throws IllegalStateException if one attempts to add several signature
+  /// fields.
+  void addSignature3(jni.JniObject sigObject, jni.JniObject signatureInterface,
+          jni.JniObject options) =>
+      _addSignature3(reference, sigObject.reference,
+              signatureInterface.reference, options.reference)
+          .check();
+
+  static final _findSignatureField = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__findSignatureField")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField findSignatureField(java.util.Iterator<org.apache.pdfbox.pdmodel.interactive.form.PDField> fieldIterator, org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Search acroform fields for signature field with specific signature dictionary.
+  ///@param fieldIterator iterator on all fields.
+  ///@param sigObject signature object (the /V part).
+  ///@return a signature field if found, or null if none was found.
+  jni.JniObject findSignatureField(
+          jni.JniObject fieldIterator, jni.JniObject sigObject) =>
+      jni.JniObject.fromRef(_findSignatureField(
+              reference, fieldIterator.reference, sigObject.reference)
+          .object);
+
+  static final _checkSignatureField = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__checkSignatureField")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private boolean checkSignatureField(java.util.Iterator<org.apache.pdfbox.pdmodel.interactive.form.PDField> fieldIterator, org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField)
+  ///
+  /// Check if the field already exists in the field list.
+  ///@param fieldIterator iterator on all fields.
+  ///@param signatureField the signature field.
+  ///@return true if the field already existed in the field list, false if not.
+  bool checkSignatureField(
+          jni.JniObject fieldIterator, jni.JniObject signatureField) =>
+      _checkSignatureField(
+              reference, fieldIterator.reference, signatureField.reference)
+          .boolean;
+
+  static final _checkSignatureAnnotation = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__checkSignatureAnnotation")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private boolean checkSignatureAnnotation(java.util.List<org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation> annotations, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget widget)
+  ///
+  /// Check if the widget already exists in the annotation list
+  ///@param annotations the list of PDAnnotation fields.
+  ///@param widget the annotation widget.
+  ///@return true if the widget already existed in the annotation list, false if not.
+  bool checkSignatureAnnotation(
+          jni.JniObject annotations, jni.JniObject widget) =>
+      _checkSignatureAnnotation(
+              reference, annotations.reference, widget.reference)
+          .boolean;
+
+  static final _prepareVisibleSignature = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__prepareVisibleSignature")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void prepareVisibleSignature(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, org.apache.pdfbox.cos.COSDocument visualSignature)
+  void prepareVisibleSignature(jni.JniObject signatureField,
+          jni.JniObject acroForm, jni.JniObject visualSignature) =>
+      _prepareVisibleSignature(reference, signatureField.reference,
+              acroForm.reference, visualSignature.reference)
+          .check();
+
+  static final _assignSignatureRectangle = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__assignSignatureRectangle")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void assignSignatureRectangle(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField, org.apache.pdfbox.cos.COSDictionary annotDict)
+  void assignSignatureRectangle(
+          jni.JniObject signatureField, jni.JniObject annotDict) =>
+      _assignSignatureRectangle(
+              reference, signatureField.reference, annotDict.reference)
+          .check();
+
+  static final _assignAppearanceDictionary = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__assignAppearanceDictionary")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void assignAppearanceDictionary(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField, org.apache.pdfbox.cos.COSDictionary apDict)
+  void assignAppearanceDictionary(
+          jni.JniObject signatureField, jni.JniObject apDict) =>
+      _assignAppearanceDictionary(
+              reference, signatureField.reference, apDict.reference)
+          .check();
+
+  static final _assignAcroFormDefaultResource = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__assignAcroFormDefaultResource")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void assignAcroFormDefaultResource(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, org.apache.pdfbox.cos.COSDictionary newDict)
+  void assignAcroFormDefaultResource(
+          jni.JniObject acroForm, jni.JniObject newDict) =>
+      _assignAcroFormDefaultResource(
+              reference, acroForm.reference, newDict.reference)
+          .check();
+
+  static final _prepareNonVisibleSignature = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__prepareNonVisibleSignature")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void prepareNonVisibleSignature(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField)
+  void prepareNonVisibleSignature(jni.JniObject signatureField) =>
+      _prepareNonVisibleSignature(reference, signatureField.reference).check();
+
+  static final _addSignatureField = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__addSignatureField")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void addSignatureField(java.util.List<org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField> sigFields, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options)
+  ///
+  /// This will add a list of signature fields to the document.
+  ///@param sigFields are the PDSignatureFields that should be added to the document
+  ///@param signatureInterface is an interface whose implementation provides
+  /// signing capabilities. Can be null if external signing if used.
+  ///@param options signature options
+  ///@throws IOException if there is an error creating required fields
+  ///@deprecated The method is misleading, because only one signature may be
+  /// added in a document. The method will be removed in the future.
+  void addSignatureField(jni.JniObject sigFields,
+          jni.JniObject signatureInterface, jni.JniObject options) =>
+      _addSignatureField(reference, sigFields.reference,
+              signatureInterface.reference, options.reference)
+          .check();
+
+  static final _removePage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__removePage")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void removePage(org.apache.pdfbox.pdmodel.PDPage page)
+  ///
+  /// Remove the page from the document.
+  ///@param page The page to remove from the document.
+  void removePage(jni.JniObject page) =>
+      _removePage(reference, page.reference).check();
+
+  static final _removePage1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Int32)>>("PDDocument__removePage1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void removePage(int pageNumber)
+  ///
+  /// Remove the page from the document.
+  ///@param pageNumber 0 based index to page number.
+  void removePage1(int pageNumber) =>
+      _removePage1(reference, pageNumber).check();
+
+  static final _importPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__importPage")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.PDPage importPage(org.apache.pdfbox.pdmodel.PDPage page)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will import and copy the contents from another location. Currently the content stream is
+  /// stored in a scratch file. The scratch file is associated with the document. If you are adding
+  /// a page to this document from another document and want to copy the contents to this
+  /// document's scratch file then use this method otherwise just use the \#addPage addPage()
+  /// method.
+  ///
+  /// Unlike \#addPage addPage(), this method creates a new PDPage object. If your page has
+  /// annotations, and if these link to pages not in the target document, then the target document
+  /// might become huge. What you need to do is to delete page references of such annotations. See
+  /// <a href="http://stackoverflow.com/a/35477351/535646">here</a> for how to do this.
+  ///
+  /// Inherited (global) resources are ignored because these can contain resources not needed for
+  /// this page which could bloat your document, see
+  /// <a href="https://issues.apache.org/jira/browse/PDFBOX-28">PDFBOX-28</a> and related issues.
+  /// If you need them, call <code>importedPage.setResources(page.getResources());</code>
+  ///
+  /// This method should only be used to import a page from a loaded document, not from a generated
+  /// document because these can contain unfinished parts, e.g. font subsetting information.
+  ///@param page The page to import.
+  ///@return The page that was imported.
+  ///@throws IOException If there is an error copying the page.
+  jni.JniObject importPage(jni.JniObject page) =>
+      jni.JniObject.fromRef(_importPage(reference, page.reference).object);
+
+  static final _getDocument = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getDocument")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.cos.COSDocument getDocument()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the low level document.
+  ///@return The document that this layer sits on top of.
+  jni.JniObject getDocument() =>
+      jni.JniObject.fromRef(_getDocument(reference).object);
+
+  static final _getDocumentInformation = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getDocumentInformation")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.PDDocumentInformation getDocumentInformation()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the document info dictionary. If it doesn't exist, an empty document info
+  /// dictionary is created in the document trailer.
+  ///
+  /// In PDF 2.0 this is deprecated except for two entries, /CreationDate and /ModDate. For any other
+  /// document level metadata, a metadata stream should be used instead, see
+  /// PDDocumentCatalog\#getMetadata().
+  ///@return The documents /Info dictionary, never null.
+  PDDocumentInformation getDocumentInformation() =>
+      PDDocumentInformation.fromRef(_getDocumentInformation(reference).object);
+
+  static final _setDocumentInformation = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__setDocumentInformation")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setDocumentInformation(org.apache.pdfbox.pdmodel.PDDocumentInformation info)
+  ///
+  /// This will set the document information for this document.
+  ///
+  /// In PDF 2.0 this is deprecated except for two entries, /CreationDate and /ModDate. For any other
+  /// document level metadata, a metadata stream should be used instead, see
+  /// PDDocumentCatalog\#setMetadata(org.apache.pdfbox.pdmodel.common.PDMetadata) PDDocumentCatalog\#setMetadata(PDMetadata).
+  ///@param info The updated document information.
+  void setDocumentInformation(PDDocumentInformation info) =>
+      _setDocumentInformation(reference, info.reference).check();
+
+  static final _getDocumentCatalog = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getDocumentCatalog")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.PDDocumentCatalog getDocumentCatalog()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the document CATALOG. This is guaranteed to not return null.
+  ///@return The documents /Root dictionary
+  jni.JniObject getDocumentCatalog() =>
+      jni.JniObject.fromRef(_getDocumentCatalog(reference).object);
+
+  static final _isEncrypted = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__isEncrypted")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public boolean isEncrypted()
+  ///
+  /// This will tell if this document is encrypted or not.
+  ///@return true If this document is encrypted.
+  bool isEncrypted() => _isEncrypted(reference).boolean;
+
+  static final _getEncryption = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getEncryption")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.encryption.PDEncryption getEncryption()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the encryption dictionary for this document. This will still return the parameters if the document
+  /// was decrypted. As the encryption architecture in PDF documents is pluggable this returns an abstract class,
+  /// but the only supported subclass at this time is a
+  /// PDStandardEncryption object.
+  ///@return The encryption dictionary(most likely a PDStandardEncryption object)
+  jni.JniObject getEncryption() =>
+      jni.JniObject.fromRef(_getEncryption(reference).object);
+
+  static final _setEncryptionDictionary = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__setEncryptionDictionary")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setEncryptionDictionary(org.apache.pdfbox.pdmodel.encryption.PDEncryption encryption)
+  ///
+  /// This will set the encryption dictionary for this document.
+  ///@param encryption The encryption dictionary(most likely a PDStandardEncryption object)
+  ///@throws IOException If there is an error determining which security handler to use.
+  void setEncryptionDictionary(jni.JniObject encryption) =>
+      _setEncryptionDictionary(reference, encryption.reference).check();
+
+  static final _getLastSignatureDictionary = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__getLastSignatureDictionary")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature getLastSignatureDictionary()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will return the last signature from the field tree. Note that this may not be the
+  /// last in time when empty signature fields are created first but signed after other fields.
+  ///@return the last signature as <code>PDSignatureField</code>.
+  ///@throws IOException if no document catalog can be found.
+  jni.JniObject getLastSignatureDictionary() =>
+      jni.JniObject.fromRef(_getLastSignatureDictionary(reference).object);
+
+  static final _getSignatureFields = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getSignatureFields")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.util.List<org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField> getSignatureFields()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Retrieve all signature fields from the document.
+  ///@return a <code>List</code> of <code>PDSignatureField</code>s
+  ///@throws IOException if no document catalog can be found.
+  jni.JniObject getSignatureFields() =>
+      jni.JniObject.fromRef(_getSignatureFields(reference).object);
+
+  static final _getSignatureDictionaries = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__getSignatureDictionaries")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.util.List<org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature> getSignatureDictionaries()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Retrieve all signature dictionaries from the document.
+  ///@return a <code>List</code> of <code>PDSignatureField</code>s
+  ///@throws IOException if no document catalog can be found.
+  jni.JniObject getSignatureDictionaries() =>
+      jni.JniObject.fromRef(_getSignatureDictionaries(reference).object);
+
+  static final _registerTrueTypeFontForClosing = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__registerTrueTypeFontForClosing")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void registerTrueTypeFontForClosing(org.apache.fontbox.ttf.TrueTypeFont ttf)
+  ///
+  /// For internal PDFBox use when creating PDF documents: register a TrueTypeFont to make sure it
+  /// is closed when the PDDocument is closed to avoid memory leaks. Users don't have to call this
+  /// method, it is done by the appropriate PDFont classes.
+  ///@param ttf
+  void registerTrueTypeFontForClosing(jni.JniObject ttf) =>
+      _registerTrueTypeFontForClosing(reference, ttf.reference).check();
+
+  static final _getFontsToSubset = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getFontsToSubset")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: java.util.Set<org.apache.pdfbox.pdmodel.font.PDFont> getFontsToSubset()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the list of fonts which will be subset before the document is saved.
+  jni.JniObject getFontsToSubset() =>
+      jni.JniObject.fromRef(_getFontsToSubset(reference).object);
+
+  static final _load = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param file file to be loaded
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the file required a non-empty password.
+  ///@throws IOException in case of a file reading or parsing error
+  static PDDocument load(jni.JniObject file) =>
+      PDDocument.fromRef(_load(file.reference).object);
+
+  static final _load1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF.
+  ///@param file file to be loaded
+  ///@param memUsageSetting defines how memory is used for buffering PDF streams
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the file required a non-empty password.
+  ///@throws IOException in case of a file reading or parsing error
+  static PDDocument load1(jni.JniObject file, jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(
+          _load1(file.reference, memUsageSetting.reference).object);
+
+  static final _load2 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load2")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param file file to be loaded
+  ///@param password password to be used for decryption
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException in case of a file reading or parsing error
+  static PDDocument load2(jni.JniObject file, jni.JniString password) =>
+      PDDocument.fromRef(_load2(file.reference, password.reference).object);
+
+  static final _load3 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load3")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF.
+  ///@param file file to be loaded
+  ///@param password password to be used for decryption
+  ///@param memUsageSetting defines how memory is used for buffering PDF streams
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException in case of a file reading or parsing error
+  static PDDocument load3(jni.JniObject file, jni.JniString password,
+          jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(
+          _load3(file.reference, password.reference, memUsageSetting.reference)
+              .object);
+
+  static final _load4 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load4")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param file file to be loaded
+  ///@param password password to be used for decryption
+  ///@param keyStore key store to be used for decryption when using public key security
+  ///@param alias alias to be used for decryption when using public key security
+  ///@return loaded document
+  ///@throws IOException in case of a file reading or parsing error
+  static PDDocument load4(jni.JniObject file, jni.JniString password,
+          jni.JniObject keyStore, jni.JniString alias) =>
+      PDDocument.fromRef(_load4(file.reference, password.reference,
+              keyStore.reference, alias.reference)
+          .object);
+
+  static final _load5 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load5")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF.
+  ///@param file file to be loaded
+  ///@param password password to be used for decryption
+  ///@param keyStore key store to be used for decryption when using public key security
+  ///@param alias alias to be used for decryption when using public key security
+  ///@param memUsageSetting defines how memory is used for buffering PDF streams
+  ///@return loaded document
+  ///@throws IOException in case of a file reading or parsing error
+  static PDDocument load5(
+          jni.JniObject file,
+          jni.JniString password,
+          jni.JniObject keyStore,
+          jni.JniString alias,
+          jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(_load5(file.reference, password.reference,
+              keyStore.reference, alias.reference, memUsageSetting.reference)
+          .object);
+
+  static final _load6 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load6")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private static org.apache.pdfbox.pdmodel.PDDocument load(org.apache.pdfbox.io.RandomAccessBufferedFileInputStream raFile, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  static PDDocument load6(
+          jni.JniObject raFile,
+          jni.JniString password,
+          jni.JniObject keyStore,
+          jni.JniString alias,
+          jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(_load6(raFile.reference, password.reference,
+              keyStore.reference, alias.reference, memUsageSetting.reference)
+          .object);
+
+  static final _load7 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load7")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. The given input stream is copied to the memory to enable random access to the
+  /// pdf. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param input stream that contains the document. Don't forget to close it after loading.
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the PDF required a non-empty password.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load7(jni.JniObject input) =>
+      PDDocument.fromRef(_load7(input.reference).object);
+
+  static final _load8 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load8")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Depending on the memory settings parameter the given input stream is either
+  /// copied to main memory or to a temporary file to enable random access to the pdf.
+  ///@param input stream that contains the document. Don't forget to close it after loading.
+  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the PDF required a non-empty password.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load8(jni.JniObject input, jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(
+          _load8(input.reference, memUsageSetting.reference).object);
+
+  static final _load9 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load9")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. The given input stream is copied to the memory to enable random access to the
+  /// pdf. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param input stream that contains the document. Don't forget to close it after loading.
+  ///@param password password to be used for decryption
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load9(jni.JniObject input, jni.JniString password) =>
+      PDDocument.fromRef(_load9(input.reference, password.reference).object);
+
+  static final _load10 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load10")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. The given input stream is copied to the memory to enable random access to the
+  /// pdf. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param input stream that contains the document. Don't forget to close it after loading.
+  ///@param password password to be used for decryption
+  ///@param keyStore key store to be used for decryption when using public key security
+  ///@param alias alias to be used for decryption when using public key security
+  ///@return loaded document
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load10(jni.JniObject input, jni.JniString password,
+          jni.JniObject keyStore, jni.JniString alias) =>
+      PDDocument.fromRef(_load10(input.reference, password.reference,
+              keyStore.reference, alias.reference)
+          .object);
+
+  static final _load11 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load11")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Depending on the memory settings parameter the given input stream is either
+  /// copied to main memory or to a temporary file to enable random access to the pdf.
+  ///@param input stream that contains the document. Don't forget to close it after loading.
+  ///@param password password to be used for decryption
+  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load11(jni.JniObject input, jni.JniString password,
+          jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(_load11(
+              input.reference, password.reference, memUsageSetting.reference)
+          .object);
+
+  static final _load12 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load12")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Depending on the memory settings parameter the given input stream is either
+  /// copied to memory or to a temporary file to enable random access to the pdf.
+  ///@param input stream that contains the document. Don't forget to close it after loading.
+  ///@param password password to be used for decryption
+  ///@param keyStore key store to be used for decryption when using public key security
+  ///@param alias alias to be used for decryption when using public key security
+  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load12(
+          jni.JniObject input,
+          jni.JniString password,
+          jni.JniObject keyStore,
+          jni.JniString alias,
+          jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(_load12(input.reference, password.reference,
+              keyStore.reference, alias.reference, memUsageSetting.reference)
+          .object);
+
+  static final _load13 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load13")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param input byte array that contains the document.
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the PDF required a non-empty password.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load13(jni.JniObject input) =>
+      PDDocument.fromRef(_load13(input.reference).object);
+
+  static final _load14 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load14")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param input byte array that contains the document.
+  ///@param password password to be used for decryption
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load14(jni.JniObject input, jni.JniString password) =>
+      PDDocument.fromRef(_load14(input.reference, password.reference).object);
+
+  static final _load15 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load15")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
+  ///@param input byte array that contains the document.
+  ///@param password password to be used for decryption
+  ///@param keyStore key store to be used for decryption when using public key security
+  ///@param alias alias to be used for decryption when using public key security
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load15(jni.JniObject input, jni.JniString password,
+          jni.JniObject keyStore, jni.JniString alias) =>
+      PDDocument.fromRef(_load15(input.reference, password.reference,
+              keyStore.reference, alias.reference)
+          .object);
+
+  static final _load16 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__load16")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Parses a PDF.
+  ///@param input byte array that contains the document.
+  ///@param password password to be used for decryption
+  ///@param keyStore key store to be used for decryption when using public key security
+  ///@param alias alias to be used for decryption when using public key security
+  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
+  ///@return loaded document
+  ///@throws InvalidPasswordException If the password is incorrect.
+  ///@throws IOException In case of a reading or parsing error.
+  static PDDocument load16(
+          jni.JniObject input,
+          jni.JniString password,
+          jni.JniObject keyStore,
+          jni.JniString alias,
+          jni.JniObject memUsageSetting) =>
+      PDDocument.fromRef(_load16(input.reference, password.reference,
+              keyStore.reference, alias.reference, memUsageSetting.reference)
+          .object);
+
+  static final _save = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__save")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void save(java.lang.String fileName)
+  ///
+  /// Save the document to a file.
+  ///
+  /// If encryption has been activated (with
+  /// \#protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy) protect(ProtectionPolicy)),
+  /// do not use the document after saving because the contents are now encrypted.
+  ///@param fileName The file to save as.
+  ///@throws IOException if the output could not be written
+  void save(jni.JniString fileName) =>
+      _save(reference, fileName.reference).check();
+
+  static final _save1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__save1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void save(java.io.File file)
+  ///
+  /// Save the document to a file.
+  ///
+  /// If encryption has been activated (with
+  /// \#protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy) protect(ProtectionPolicy)),
+  /// do not use the document after saving because the contents are now encrypted.
+  ///@param file The file to save as.
+  ///@throws IOException if the output could not be written
+  void save1(jni.JniObject file) => _save1(reference, file.reference).check();
+
+  static final _save2 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__save2")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void save(java.io.OutputStream output)
+  ///
+  /// This will save the document to an output stream.
+  ///
+  /// If encryption has been activated (with
+  /// \#protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy) protect(ProtectionPolicy)),
+  /// do not use the document after saving because the contents are now encrypted.
+  ///@param output The stream to write to. It will be closed when done. It is recommended to wrap
+  /// it in a java.io.BufferedOutputStream, unless it is already buffered.
+  ///@throws IOException if the output could not be written
+  void save2(jni.JniObject output) =>
+      _save2(reference, output.reference).check();
+
+  static final _saveIncremental = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__saveIncremental")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void saveIncremental(java.io.OutputStream output)
+  ///
+  /// Save the PDF as an incremental update. This is only possible if the PDF was loaded from a
+  /// file or a stream, not if the document was created in PDFBox itself. There must be a path of
+  /// objects that have COSUpdateInfo\#isNeedToBeUpdated() set, starting from the document
+  /// catalog. For signatures this is taken care by PDFBox itself.
+  ///
+  /// Other usages of this method are for experienced users only. You will usually never need it.
+  /// It is useful only if you are required to keep the current revision and append the changes. A
+  /// typical use case is changing a signed file without invalidating the signature.
+  ///@param output stream to write to. It will be closed when done. It
+  /// <i>__must never__</i> point to the source file or that one will be
+  /// harmed!
+  ///@throws IOException if the output could not be written
+  ///@throws IllegalStateException if the document was not loaded from a file or a stream.
+  void saveIncremental(jni.JniObject output) =>
+      _saveIncremental(reference, output.reference).check();
+
+  static final _saveIncremental1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__saveIncremental1")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void saveIncremental(java.io.OutputStream output, java.util.Set<org.apache.pdfbox.cos.COSDictionary> objectsToWrite)
+  ///
+  /// Save the PDF as an incremental update. This is only possible if the PDF was loaded from a
+  /// file or a stream, not if the document was created in PDFBox itself. This allows to include
+  /// objects even if there is no path of objects that have
+  /// COSUpdateInfo\#isNeedToBeUpdated() set so the incremental update gets smaller. Only
+  /// dictionaries are supported; if you need to update other objects classes, then add their
+  /// parent dictionary.
+  ///
+  /// This method is for experienced users only. You will usually never need it. It is useful only
+  /// if you are required to keep the current revision and append the changes. A typical use case
+  /// is changing a signed file without invalidating the signature. To know which objects are
+  /// getting changed, you need to have some understanding of the PDF specification, and look at
+  /// the saved file with an editor to verify that you are updating the correct objects. You should
+  /// also inspect the page and document structures of the file with PDFDebugger.
+  ///@param output stream to write to. It will be closed when done. It
+  /// <i>__must never__</i> point to the source file or that one will be harmed!
+  ///@param objectsToWrite objects that __must__ be part of the incremental saving.
+  ///@throws IOException if the output could not be written
+  ///@throws IllegalStateException if the document was not loaded from a file or a stream.
+  void saveIncremental1(jni.JniObject output, jni.JniObject objectsToWrite) =>
+      _saveIncremental1(reference, output.reference, objectsToWrite.reference)
+          .check();
+
+  static final _saveIncrementalForExternalSigning = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__saveIncrementalForExternalSigning")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport saveIncrementalForExternalSigning(java.io.OutputStream output)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  ///
+  /// __(This is a new feature for 2.0.3. The API for external signing might change based on feedback after release!)__
+  ///
+  /// Save PDF incrementally without closing for external signature creation scenario. The general
+  /// sequence is:
+  /// <pre>
+  ///    PDDocument pdDocument = ...;
+  ///    OutputStream outputStream = ...;
+  ///    SignatureOptions signatureOptions = ...; // options to specify fine tuned signature options or null for defaults
+  ///    PDSignature pdSignature = ...;
+  ///
+  ///    // add signature parameters to be used when creating signature dictionary
+  ///    pdDocument.addSignature(pdSignature, signatureOptions);
+  ///    // prepare PDF for signing and obtain helper class to be used
+  ///    ExternalSigningSupport externalSigningSupport = pdDocument.saveIncrementalForExternalSigning(outputStream);
+  ///    // get data to be signed
+  ///    InputStream dataToBeSigned = externalSigningSupport.getContent();
+  ///    // invoke signature service
+  ///    byte[] signature = sign(dataToBeSigned);
+  ///    // set resulted CMS signature
+  ///    externalSigningSupport.setSignature(signature);
+  ///
+  ///    // last step is to close the document
+  ///    pdDocument.close();
+  /// </pre>
+  ///
+  /// Note that after calling this method, only {@code close()} method may invoked for
+  /// {@code PDDocument} instance and only AFTER ExternalSigningSupport instance is used.
+  ///
+  ///
+  ///@param output stream to write the final PDF. It will be closed when the
+  /// document is closed. It <i>__must never__</i> point to the source file
+  /// or that one will be harmed!
+  ///@return instance to be used for external signing and setting CMS signature
+  ///@throws IOException if the output could not be written
+  ///@throws IllegalStateException if the document was not loaded from a file or a stream or
+  /// signature options were not set.
+  jni.JniObject saveIncrementalForExternalSigning(jni.JniObject output) =>
+      jni.JniObject.fromRef(
+          _saveIncrementalForExternalSigning(reference, output.reference)
+              .object);
+
+  static final _getPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Int32)>>("PDDocument__getPage")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.PDPage getPage(int pageIndex)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the page at the given 0-based index.
+  ///
+  /// This method is too slow to get all the pages from a large PDF document
+  /// (1000 pages or more). For such documents, use the iterator of
+  /// PDDocument\#getPages() instead.
+  ///@param pageIndex the 0-based page index
+  ///@return the page at the given index.
+  jni.JniObject getPage(int pageIndex) =>
+      jni.JniObject.fromRef(_getPage(reference, pageIndex).object);
+
+  static final _getPages = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getPages")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.PDPageTree getPages()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the page tree.
+  ///@return the page tree
+  jni.JniObject getPages() =>
+      jni.JniObject.fromRef(_getPages(reference).object);
+
+  static final _getNumberOfPages = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getNumberOfPages")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public int getNumberOfPages()
+  ///
+  /// This will return the total page count of the PDF document.
+  ///@return The total number of pages in the PDF document.
+  int getNumberOfPages() => _getNumberOfPages(reference).integer;
+
+  static final _close = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__close")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void close()
+  ///
+  /// This will close the underlying COSDocument object.
+  ///@throws IOException If there is an error releasing resources.
+  void close() => _close(reference).check();
+
+  static final _protect = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__protect")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy policy)
+  ///
+  /// Protects the document with a protection policy. The document content will be really
+  /// encrypted when it will be saved. This method only marks the document for encryption. It also
+  /// calls \#setAllSecurityToBeRemoved(boolean) with a false argument if it was set to true
+  /// previously and logs a warning.
+  ///
+  /// Do not use the document after saving, because the structures are encrypted.
+  ///@see org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy
+  ///@see org.apache.pdfbox.pdmodel.encryption.PublicKeyProtectionPolicy
+  ///@param policy The protection policy.
+  ///@throws IOException if there isn't any suitable security handler.
+  void protect(jni.JniObject policy) =>
+      _protect(reference, policy.reference).check();
+
+  static final _getCurrentAccessPermission = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__getCurrentAccessPermission")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.encryption.AccessPermission getCurrentAccessPermission()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the access permissions granted when the document was decrypted. If the document was not decrypted this
+  /// method returns the access permission for a document owner (ie can do everything). The returned object is in read
+  /// only mode so that permissions cannot be changed. Methods providing access to content should rely on this object
+  /// to verify if the current user is allowed to proceed.
+  ///@return the access permissions for the current user on the document.
+  jni.JniObject getCurrentAccessPermission() =>
+      jni.JniObject.fromRef(_getCurrentAccessPermission(reference).object);
+
+  static final _isAllSecurityToBeRemoved = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocument__isAllSecurityToBeRemoved")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public boolean isAllSecurityToBeRemoved()
+  ///
+  /// Indicates if all security is removed or not when writing the pdf.
+  ///@return returns true if all security shall be removed otherwise false
+  bool isAllSecurityToBeRemoved() =>
+      _isAllSecurityToBeRemoved(reference).boolean;
+
+  static final _setAllSecurityToBeRemoved = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Uint8)>>("PDDocument__setAllSecurityToBeRemoved")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void setAllSecurityToBeRemoved(boolean removeAllSecurity)
+  ///
+  /// Activates/Deactivates the removal of all security when writing the pdf.
+  ///@param removeAllSecurity remove all security if set to true
+  void setAllSecurityToBeRemoved(bool removeAllSecurity) =>
+      _setAllSecurityToBeRemoved(reference, removeAllSecurity ? 1 : 0).check();
+
+  static final _getDocumentId = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getDocumentId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.Long getDocumentId()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Provides the document ID.
+  ///@return the document ID
+  jni.JniObject getDocumentId() =>
+      jni.JniObject.fromRef(_getDocumentId(reference).object);
+
+  static final _setDocumentId = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__setDocumentId")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setDocumentId(java.lang.Long docId)
+  ///
+  /// Sets the document ID to the given value.
+  ///@param docId the new document ID
+  void setDocumentId(jni.JniObject docId) =>
+      _setDocumentId(reference, docId.reference).check();
+
+  static final _getVersion = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getVersion")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public float getVersion()
+  ///
+  /// Returns the PDF specification version this document conforms to.
+  ///@return the PDF version (e.g. 1.4f)
+  double getVersion() => _getVersion(reference).float;
+
+  static final _setVersion = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Float)>>("PDDocument__setVersion")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, double)>();
+
+  /// from: public void setVersion(float newVersion)
+  ///
+  /// Sets the PDF specification version for this document.
+  ///@param newVersion the new PDF version (e.g. 1.4f)
+  void setVersion(double newVersion) =>
+      _setVersion(reference, newVersion).check();
+
+  static final _getResourceCache = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__getResourceCache")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.ResourceCache getResourceCache()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the resource cache associated with this document, or null if there is none.
+  ///@return the resource cache or null.
+  jni.JniObject getResourceCache() =>
+      jni.JniObject.fromRef(_getResourceCache(reference).object);
+
+  static final _setResourceCache = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocument__setResourceCache")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setResourceCache(org.apache.pdfbox.pdmodel.ResourceCache resourceCache)
+  ///
+  /// Sets the resource cache associated with this document.
+  ///@param resourceCache A resource cache, or null.
+  void setResourceCache(jni.JniObject resourceCache) =>
+      _setResourceCache(reference, resourceCache.reference).check();
+}
+
+/// from: org.apache.pdfbox.pdmodel.PDDocumentInformation
+///
+/// This is the document metadata.  Each getXXX method will return the entry if
+/// it exists or null if it does not exist.  If you pass in null for the setXXX
+/// method then it will clear the value.
+///@author Ben Litchfield
+///@author Gerardo Ortiz
+class PDDocumentInformation extends jni.JniObject {
+  PDDocumentInformation.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+
+  static final _get_info = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDDocumentInformation__info")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private final org.apache.pdfbox.cos.COSDictionary info
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get info => jni.JniObject.fromRef(_get_info(reference).object);
+
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "PDDocumentInformation__ctor")
+      .asFunction<jni.JniResult Function()>();
+
+  /// from: public void <init>()
+  ///
+  /// Default Constructor.
+  PDDocumentInformation() : super.fromRef(_ctor().object);
+
+  static final _ctor1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__ctor1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void <init>(org.apache.pdfbox.cos.COSDictionary dic)
+  ///
+  /// Constructor that is used for a preexisting dictionary.
+  ///@param dic The underlying dictionary.
+  PDDocumentInformation.ctor1(jni.JniObject dic)
+      : super.fromRef(_ctor1(dic.reference).object);
+
+  static final _getCOSObject = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__getCOSObject")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.cos.COSDictionary getCOSObject()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the underlying dictionary that this object wraps.
+  ///@return The underlying info dictionary.
+  jni.JniObject getCOSObject() =>
+      jni.JniObject.fromRef(_getCOSObject(reference).object);
+
+  static final _getPropertyStringValue = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__getPropertyStringValue")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.Object getPropertyStringValue(java.lang.String propertyKey)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Return the properties String value.
+  ///
+  /// Allows to retrieve the
+  /// low level date for validation purposes.
+  ///
+  ///
+  ///@param propertyKey the dictionaries key
+  ///@return the properties value
+  jni.JniObject getPropertyStringValue(jni.JniString propertyKey) =>
+      jni.JniObject.fromRef(
+          _getPropertyStringValue(reference, propertyKey.reference).object);
+
+  static final _getTitle = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__getTitle")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getTitle()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the title of the document.  This will return null if no title exists.
+  ///@return The title of the document.
+  jni.JniString getTitle() =>
+      jni.JniString.fromRef(_getTitle(reference).object);
+
+  static final _setTitle = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__setTitle")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setTitle(java.lang.String title)
+  ///
+  /// This will set the title of the document.
+  ///@param title The new title for the document.
+  void setTitle(jni.JniString title) =>
+      _setTitle(reference, title.reference).check();
+
+  static final _getAuthor = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__getAuthor")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getAuthor()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the author of the document.  This will return null if no author exists.
+  ///@return The author of the document.
+  jni.JniString getAuthor() =>
+      jni.JniString.fromRef(_getAuthor(reference).object);
+
+  static final _setAuthor = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__setAuthor")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setAuthor(java.lang.String author)
+  ///
+  /// This will set the author of the document.
+  ///@param author The new author for the document.
+  void setAuthor(jni.JniString author) =>
+      _setAuthor(reference, author.reference).check();
+
+  static final _getSubject = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__getSubject")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getSubject()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the subject of the document.  This will return null if no subject exists.
+  ///@return The subject of the document.
+  jni.JniString getSubject() =>
+      jni.JniString.fromRef(_getSubject(reference).object);
+
+  static final _setSubject = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__setSubject")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setSubject(java.lang.String subject)
+  ///
+  /// This will set the subject of the document.
+  ///@param subject The new subject for the document.
+  void setSubject(jni.JniString subject) =>
+      _setSubject(reference, subject.reference).check();
+
+  static final _getKeywords = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__getKeywords")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getKeywords()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the keywords of the document.  This will return null if no keywords exists.
+  ///@return The keywords of the document.
+  jni.JniString getKeywords() =>
+      jni.JniString.fromRef(_getKeywords(reference).object);
+
+  static final _setKeywords = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__setKeywords")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setKeywords(java.lang.String keywords)
+  ///
+  /// This will set the keywords of the document.
+  ///@param keywords The new keywords for the document.
+  void setKeywords(jni.JniString keywords) =>
+      _setKeywords(reference, keywords.reference).check();
+
+  static final _getCreator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__getCreator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getCreator()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the creator of the document.  This will return null if no creator exists.
+  ///@return The creator of the document.
+  jni.JniString getCreator() =>
+      jni.JniString.fromRef(_getCreator(reference).object);
+
+  static final _setCreator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__setCreator")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setCreator(java.lang.String creator)
+  ///
+  /// This will set the creator of the document.
+  ///@param creator The new creator for the document.
+  void setCreator(jni.JniString creator) =>
+      _setCreator(reference, creator.reference).check();
+
+  static final _getProducer = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__getProducer")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getProducer()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the producer of the document.  This will return null if no producer exists.
+  ///@return The producer of the document.
+  jni.JniString getProducer() =>
+      jni.JniString.fromRef(_getProducer(reference).object);
+
+  static final _setProducer = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__setProducer")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setProducer(java.lang.String producer)
+  ///
+  /// This will set the producer of the document.
+  ///@param producer The new producer for the document.
+  void setProducer(jni.JniString producer) =>
+      _setProducer(reference, producer.reference).check();
+
+  static final _getCreationDate = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__getCreationDate")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.util.Calendar getCreationDate()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the creation date of the document.  This will return null if no creation date exists.
+  ///@return The creation date of the document.
+  jni.JniObject getCreationDate() =>
+      jni.JniObject.fromRef(_getCreationDate(reference).object);
+
+  static final _setCreationDate = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__setCreationDate")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setCreationDate(java.util.Calendar date)
+  ///
+  /// This will set the creation date of the document.
+  ///@param date The new creation date for the document.
+  void setCreationDate(jni.JniObject date) =>
+      _setCreationDate(reference, date.reference).check();
+
+  static final _getModificationDate = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__getModificationDate")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.util.Calendar getModificationDate()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the modification date of the document.  This will return null if no modification date exists.
+  ///@return The modification date of the document.
+  jni.JniObject getModificationDate() =>
+      jni.JniObject.fromRef(_getModificationDate(reference).object);
+
+  static final _setModificationDate = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__setModificationDate")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setModificationDate(java.util.Calendar date)
+  ///
+  /// This will set the modification date of the document.
+  ///@param date The new modification date for the document.
+  void setModificationDate(jni.JniObject date) =>
+      _setModificationDate(reference, date.reference).check();
+
+  static final _getTrapped = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__getTrapped")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getTrapped()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the trapped value for the document.
+  /// This will return null if one is not found.
+  ///@return The trapped value for the document.
+  jni.JniString getTrapped() =>
+      jni.JniString.fromRef(_getTrapped(reference).object);
+
+  static final _getMetadataKeys = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__getMetadataKeys")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.util.Set<java.lang.String> getMetadataKeys()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the keys of all metadata information fields for the document.
+  ///@return all metadata key strings.
+  ///@since Apache PDFBox 1.3.0
+  jni.JniObject getMetadataKeys() =>
+      jni.JniObject.fromRef(_getMetadataKeys(reference).object);
+
+  static final _getCustomMetadataValue = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__getCustomMetadataValue")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getCustomMetadataValue(java.lang.String fieldName)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the value of a custom metadata information field for the document.
+  ///  This will return null if one is not found.
+  ///@param fieldName Name of custom metadata field from pdf document.
+  ///@return String Value of metadata field
+  jni.JniString getCustomMetadataValue(jni.JniString fieldName) =>
+      jni.JniString.fromRef(
+          _getCustomMetadataValue(reference, fieldName.reference).object);
+
+  static final _setCustomMetadataValue = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDDocumentInformation__setCustomMetadataValue")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setCustomMetadataValue(java.lang.String fieldName, java.lang.String fieldValue)
+  ///
+  /// Set the custom metadata value.
+  ///@param fieldName The name of the custom metadata field.
+  ///@param fieldValue The value to the custom metadata field.
+  void setCustomMetadataValue(
+          jni.JniString fieldName, jni.JniString fieldValue) =>
+      _setCustomMetadataValue(
+              reference, fieldName.reference, fieldValue.reference)
+          .check();
+
+  static final _setTrapped = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDDocumentInformation__setTrapped")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setTrapped(java.lang.String value)
+  ///
+  /// This will set the trapped of the document.  This will be
+  /// 'True', 'False', or 'Unknown'.
+  ///@param value The new trapped value for the document.
+  ///@throws IllegalArgumentException if the parameter is invalid.
+  void setTrapped(jni.JniString value) =>
+      _setTrapped(reference, value.reference).check();
+}
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text.dart
new file mode 100644
index 0000000..4adb7f1
--- /dev/null
+++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text.dart
@@ -0,0 +1,2246 @@
+// Generated from Apache PDFBox library which is licensed under the Apache License 2.0.
+// The following copyright from the original authors applies.
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Autogenerated by jnigen. DO NOT EDIT!
+
+// ignore_for_file: camel_case_types
+// ignore_for_file: non_constant_identifier_names
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: annotate_overrides
+// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: unused_element
+
+import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
+import "package:jni/jni.dart" as jni;
+
+import "pdmodel.dart" as pdmodel_;
+import "../../../_init.dart" show jniLookup;
+
+/// from: org.apache.pdfbox.text.PDFTextStripper
+///
+/// This class will take a pdf document and strip out all of the text and ignore the formatting and such. Please note; it
+/// is up to clients of this class to verify that a specific user has the correct permissions to extract text from the
+/// PDF document.
+///
+/// The basic flow of this process is that we get a document and use a series of processXXX() functions that work on
+/// smaller and smaller chunks of the page. Eventually, we fully process each page and then print it.
+///@author Ben Litchfield
+class PDFTextStripper extends jni.JniObject {
+  PDFTextStripper.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+
+  static final _get_defaultIndentThreshold =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_PDFTextStripper__defaultIndentThreshold")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: private static float defaultIndentThreshold
+  static double get defaultIndentThreshold =>
+      _get_defaultIndentThreshold().float;
+  static final _set_defaultIndentThreshold =
+      jniLookup<ffi.NativeFunction<jni.JThrowable Function(ffi.Float)>>(
+              "set_PDFTextStripper__defaultIndentThreshold")
+          .asFunction<jni.JThrowable Function(double)>();
+
+  /// from: private static float defaultIndentThreshold
+  static set defaultIndentThreshold(double value) =>
+      _set_defaultIndentThreshold(value);
+
+  static final _get_defaultDropThreshold =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_PDFTextStripper__defaultDropThreshold")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: private static float defaultDropThreshold
+  static double get defaultDropThreshold => _get_defaultDropThreshold().float;
+  static final _set_defaultDropThreshold =
+      jniLookup<ffi.NativeFunction<jni.JThrowable Function(ffi.Float)>>(
+              "set_PDFTextStripper__defaultDropThreshold")
+          .asFunction<jni.JThrowable Function(double)>();
+
+  /// from: private static float defaultDropThreshold
+  static set defaultDropThreshold(double value) =>
+      _set_defaultDropThreshold(value);
+
+  static final _get_LOG =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_PDFTextStripper__LOG")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: private static final org.apache.commons.logging.Log LOG
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  static jni.JniObject get LOG => jni.JniObject.fromRef(_get_LOG().object);
+
+  static final _get_LINE_SEPARATOR = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__LINE_SEPARATOR")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: protected final java.lang.String LINE_SEPARATOR
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// The platform's line separator.
+  jni.JniString get LINE_SEPARATOR =>
+      jni.JniString.fromRef(_get_LINE_SEPARATOR(reference).object);
+
+  static final _get_lineSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__lineSeparator")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String lineSeparator
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get lineSeparator =>
+      jni.JniString.fromRef(_get_lineSeparator(reference).object);
+  static final _set_lineSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__lineSeparator")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String lineSeparator
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set lineSeparator(jni.JniString value) =>
+      _set_lineSeparator(reference, value.reference);
+
+  static final _get_wordSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__wordSeparator")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String wordSeparator
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get wordSeparator =>
+      jni.JniString.fromRef(_get_wordSeparator(reference).object);
+  static final _set_wordSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__wordSeparator")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String wordSeparator
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set wordSeparator(jni.JniString value) =>
+      _set_wordSeparator(reference, value.reference);
+
+  static final _get_paragraphStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__paragraphStart")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String paragraphStart
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get paragraphStart =>
+      jni.JniString.fromRef(_get_paragraphStart(reference).object);
+  static final _set_paragraphStart = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>>(
+          "set_PDFTextStripper__paragraphStart")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String paragraphStart
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set paragraphStart(jni.JniString value) =>
+      _set_paragraphStart(reference, value.reference);
+
+  static final _get_paragraphEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__paragraphEnd")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String paragraphEnd
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get paragraphEnd =>
+      jni.JniString.fromRef(_get_paragraphEnd(reference).object);
+  static final _set_paragraphEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__paragraphEnd")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String paragraphEnd
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set paragraphEnd(jni.JniString value) =>
+      _set_paragraphEnd(reference, value.reference);
+
+  static final _get_pageStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__pageStart")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String pageStart
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get pageStart =>
+      jni.JniString.fromRef(_get_pageStart(reference).object);
+  static final _set_pageStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__pageStart")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String pageStart
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set pageStart(jni.JniString value) =>
+      _set_pageStart(reference, value.reference);
+
+  static final _get_pageEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__pageEnd")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String pageEnd
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get pageEnd =>
+      jni.JniString.fromRef(_get_pageEnd(reference).object);
+  static final _set_pageEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__pageEnd")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String pageEnd
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set pageEnd(jni.JniString value) => _set_pageEnd(reference, value.reference);
+
+  static final _get_articleStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__articleStart")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String articleStart
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get articleStart =>
+      jni.JniString.fromRef(_get_articleStart(reference).object);
+  static final _set_articleStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__articleStart")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String articleStart
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set articleStart(jni.JniString value) =>
+      _set_articleStart(reference, value.reference);
+
+  static final _get_articleEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__articleEnd")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.lang.String articleEnd
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniString get articleEnd =>
+      jni.JniString.fromRef(_get_articleEnd(reference).object);
+  static final _set_articleEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__articleEnd")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String articleEnd
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set articleEnd(jni.JniString value) =>
+      _set_articleEnd(reference, value.reference);
+
+  static final _get_currentPageNo = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__currentPageNo")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private int currentPageNo
+  int get currentPageNo => _get_currentPageNo(reference).integer;
+  static final _set_currentPageNo = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Int32)>>("set_PDFTextStripper__currentPageNo")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private int currentPageNo
+  set currentPageNo(int value) => _set_currentPageNo(reference, value);
+
+  static final _get_startPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__startPage")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private int startPage
+  int get startPage => _get_startPage(reference).integer;
+  static final _set_startPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(
+                  jni.JObject, ffi.Int32)>>("set_PDFTextStripper__startPage")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private int startPage
+  set startPage(int value) => _set_startPage(reference, value);
+
+  static final _get_endPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__endPage")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private int endPage
+  int get endPage => _get_endPage(reference).integer;
+  static final _set_endPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(
+                  jni.JObject, ffi.Int32)>>("set_PDFTextStripper__endPage")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private int endPage
+  set endPage(int value) => _set_endPage(reference, value);
+
+  static final _get_startBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__startBookmark")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem startBookmark
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get startBookmark =>
+      jni.JniObject.fromRef(_get_startBookmark(reference).object);
+  static final _set_startBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__startBookmark")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem startBookmark
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set startBookmark(jni.JniObject value) =>
+      _set_startBookmark(reference, value.reference);
+
+  static final _get_startBookmarkPageNumber = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__startBookmarkPageNumber")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private int startBookmarkPageNumber
+  int get startBookmarkPageNumber =>
+      _get_startBookmarkPageNumber(reference).integer;
+  static final _set_startBookmarkPageNumber = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Int32)>>("set_PDFTextStripper__startBookmarkPageNumber")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private int startBookmarkPageNumber
+  set startBookmarkPageNumber(int value) =>
+      _set_startBookmarkPageNumber(reference, value);
+
+  static final _get_endBookmarkPageNumber = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__endBookmarkPageNumber")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private int endBookmarkPageNumber
+  int get endBookmarkPageNumber =>
+      _get_endBookmarkPageNumber(reference).integer;
+  static final _set_endBookmarkPageNumber = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Int32)>>("set_PDFTextStripper__endBookmarkPageNumber")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private int endBookmarkPageNumber
+  set endBookmarkPageNumber(int value) =>
+      _set_endBookmarkPageNumber(reference, value);
+
+  static final _get_endBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__endBookmark")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem endBookmark
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get endBookmark =>
+      jni.JniObject.fromRef(_get_endBookmark(reference).object);
+  static final _set_endBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__endBookmark")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem endBookmark
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set endBookmark(jni.JniObject value) =>
+      _set_endBookmark(reference, value.reference);
+
+  static final _get_suppressDuplicateOverlappingText = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__suppressDuplicateOverlappingText")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private boolean suppressDuplicateOverlappingText
+  bool get suppressDuplicateOverlappingText =>
+      _get_suppressDuplicateOverlappingText(reference).boolean;
+  static final _set_suppressDuplicateOverlappingText = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(jni.JObject, ffi.Uint8)>>(
+          "set_PDFTextStripper__suppressDuplicateOverlappingText")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private boolean suppressDuplicateOverlappingText
+  set suppressDuplicateOverlappingText(bool value) =>
+      _set_suppressDuplicateOverlappingText(reference, value ? 1 : 0);
+
+  static final _get_shouldSeparateByBeads = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__shouldSeparateByBeads")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private boolean shouldSeparateByBeads
+  bool get shouldSeparateByBeads =>
+      _get_shouldSeparateByBeads(reference).boolean;
+  static final _set_shouldSeparateByBeads = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Uint8)>>("set_PDFTextStripper__shouldSeparateByBeads")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private boolean shouldSeparateByBeads
+  set shouldSeparateByBeads(bool value) =>
+      _set_shouldSeparateByBeads(reference, value ? 1 : 0);
+
+  static final _get_sortByPosition = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__sortByPosition")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private boolean sortByPosition
+  bool get sortByPosition => _get_sortByPosition(reference).boolean;
+  static final _set_sortByPosition = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Uint8)>>("set_PDFTextStripper__sortByPosition")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private boolean sortByPosition
+  set sortByPosition(bool value) =>
+      _set_sortByPosition(reference, value ? 1 : 0);
+
+  static final _get_addMoreFormatting = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__addMoreFormatting")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private boolean addMoreFormatting
+  bool get addMoreFormatting => _get_addMoreFormatting(reference).boolean;
+  static final _set_addMoreFormatting = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Uint8)>>("set_PDFTextStripper__addMoreFormatting")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private boolean addMoreFormatting
+  set addMoreFormatting(bool value) =>
+      _set_addMoreFormatting(reference, value ? 1 : 0);
+
+  static final _get_indentThreshold = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__indentThreshold")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private float indentThreshold
+  double get indentThreshold => _get_indentThreshold(reference).float;
+  static final _set_indentThreshold = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Float)>>("set_PDFTextStripper__indentThreshold")
+      .asFunction<jni.JThrowable Function(jni.JObject, double)>();
+
+  /// from: private float indentThreshold
+  set indentThreshold(double value) => _set_indentThreshold(reference, value);
+
+  static final _get_dropThreshold = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__dropThreshold")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private float dropThreshold
+  double get dropThreshold => _get_dropThreshold(reference).float;
+  static final _set_dropThreshold = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Float)>>("set_PDFTextStripper__dropThreshold")
+      .asFunction<jni.JThrowable Function(jni.JObject, double)>();
+
+  /// from: private float dropThreshold
+  set dropThreshold(double value) => _set_dropThreshold(reference, value);
+
+  static final _get_spacingTolerance = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__spacingTolerance")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private float spacingTolerance
+  double get spacingTolerance => _get_spacingTolerance(reference).float;
+  static final _set_spacingTolerance = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Float)>>("set_PDFTextStripper__spacingTolerance")
+      .asFunction<jni.JThrowable Function(jni.JObject, double)>();
+
+  /// from: private float spacingTolerance
+  set spacingTolerance(double value) => _set_spacingTolerance(reference, value);
+
+  static final _get_averageCharTolerance = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__averageCharTolerance")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private float averageCharTolerance
+  double get averageCharTolerance => _get_averageCharTolerance(reference).float;
+  static final _set_averageCharTolerance = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Float)>>("set_PDFTextStripper__averageCharTolerance")
+      .asFunction<jni.JThrowable Function(jni.JObject, double)>();
+
+  /// from: private float averageCharTolerance
+  set averageCharTolerance(double value) =>
+      _set_averageCharTolerance(reference, value);
+
+  static final _get_beadRectangles = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__beadRectangles")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.util.List<org.apache.pdfbox.pdmodel.common.PDRectangle> beadRectangles
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get beadRectangles =>
+      jni.JniObject.fromRef(_get_beadRectangles(reference).object);
+  static final _set_beadRectangles = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>>(
+          "set_PDFTextStripper__beadRectangles")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.util.List<org.apache.pdfbox.pdmodel.common.PDRectangle> beadRectangles
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set beadRectangles(jni.JniObject value) =>
+      _set_beadRectangles(reference, value.reference);
+
+  static final _get_charactersByArticle = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__charactersByArticle")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: protected java.util.ArrayList<java.util.List<org.apache.pdfbox.text.TextPosition>> charactersByArticle
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// The charactersByArticle is used to extract text by article divisions. For example a PDF that has two columns like
+  /// a newspaper, we want to extract the first column and then the second column. In this example the PDF would have 2
+  /// beads(or articles), one for each column. The size of the charactersByArticle would be 5, because not all text on
+  /// the screen will fall into one of the articles. The five divisions are shown below
+  ///
+  /// Text before first article
+  /// first article text
+  /// text between first article and second article
+  /// second article text
+  /// text after second article
+  ///
+  /// Most PDFs won't have any beads, so charactersByArticle will contain a single entry.
+  jni.JniObject get charactersByArticle =>
+      jni.JniObject.fromRef(_get_charactersByArticle(reference).object);
+  static final _set_charactersByArticle = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>>(
+          "set_PDFTextStripper__charactersByArticle")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected java.util.ArrayList<java.util.List<org.apache.pdfbox.text.TextPosition>> charactersByArticle
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// The charactersByArticle is used to extract text by article divisions. For example a PDF that has two columns like
+  /// a newspaper, we want to extract the first column and then the second column. In this example the PDF would have 2
+  /// beads(or articles), one for each column. The size of the charactersByArticle would be 5, because not all text on
+  /// the screen will fall into one of the articles. The five divisions are shown below
+  ///
+  /// Text before first article
+  /// first article text
+  /// text between first article and second article
+  /// second article text
+  /// text after second article
+  ///
+  /// Most PDFs won't have any beads, so charactersByArticle will contain a single entry.
+  set charactersByArticle(jni.JniObject value) =>
+      _set_charactersByArticle(reference, value.reference);
+
+  static final _get_characterListMapping = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__characterListMapping")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.util.Map<java.lang.String,java.util.TreeMap<java.lang.Float,java.util.TreeSet<java.lang.Float>>> characterListMapping
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get characterListMapping =>
+      jni.JniObject.fromRef(_get_characterListMapping(reference).object);
+  static final _set_characterListMapping = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>>(
+          "set_PDFTextStripper__characterListMapping")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.util.Map<java.lang.String,java.util.TreeMap<java.lang.Float,java.util.TreeSet<java.lang.Float>>> characterListMapping
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set characterListMapping(jni.JniObject value) =>
+      _set_characterListMapping(reference, value.reference);
+
+  static final _get_document = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__document")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: protected org.apache.pdfbox.pdmodel.PDDocument document
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  pdmodel_.PDDocument get document =>
+      pdmodel_.PDDocument.fromRef(_get_document(reference).object);
+  static final _set_document = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__document")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected org.apache.pdfbox.pdmodel.PDDocument document
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set document(pdmodel_.PDDocument value) =>
+      _set_document(reference, value.reference);
+
+  static final _get_output = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__output")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: protected java.io.Writer output
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get output =>
+      jni.JniObject.fromRef(_get_output(reference).object);
+  static final _set_output = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(jni.JObject,
+                  ffi.Pointer<ffi.Void>)>>("set_PDFTextStripper__output")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected java.io.Writer output
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set output(jni.JniObject value) => _set_output(reference, value.reference);
+
+  static final _get_inParagraph = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__inParagraph")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private boolean inParagraph
+  ///
+  /// True if we started a paragraph but haven't ended it yet.
+  bool get inParagraph => _get_inParagraph(reference).boolean;
+  static final _set_inParagraph = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(
+                  jni.JObject, ffi.Uint8)>>("set_PDFTextStripper__inParagraph")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
+
+  /// from: private boolean inParagraph
+  ///
+  /// True if we started a paragraph but haven't ended it yet.
+  set inParagraph(bool value) => _set_inParagraph(reference, value ? 1 : 0);
+
+  /// from: private static final float END_OF_LAST_TEXT_X_RESET_VALUE
+  static const END_OF_LAST_TEXT_X_RESET_VALUE = -1.0;
+
+  /// from: private static final float MAX_Y_FOR_LINE_RESET_VALUE
+  static const MAX_Y_FOR_LINE_RESET_VALUE = -3.4028235e+38;
+
+  /// from: private static final float EXPECTED_START_OF_NEXT_WORD_X_RESET_VALUE
+  static const EXPECTED_START_OF_NEXT_WORD_X_RESET_VALUE = -3.4028235e+38;
+
+  /// from: private static final float MAX_HEIGHT_FOR_LINE_RESET_VALUE
+  static const MAX_HEIGHT_FOR_LINE_RESET_VALUE = -1.0;
+
+  /// from: private static final float MIN_Y_TOP_FOR_LINE_RESET_VALUE
+  static const MIN_Y_TOP_FOR_LINE_RESET_VALUE = 3.4028235e+38;
+
+  /// from: private static final float LAST_WORD_SPACING_RESET_VALUE
+  static const LAST_WORD_SPACING_RESET_VALUE = -1.0;
+
+  static final _get_LIST_ITEM_EXPRESSIONS =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_PDFTextStripper__LIST_ITEM_EXPRESSIONS")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: private static final java.lang.String[] LIST_ITEM_EXPRESSIONS
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// a list of regular expressions that match commonly used list item formats, i.e. bullets, numbers, letters, Roman
+  /// numerals, etc. Not meant to be comprehensive.
+  static jni.JniObject get LIST_ITEM_EXPRESSIONS =>
+      jni.JniObject.fromRef(_get_LIST_ITEM_EXPRESSIONS().object);
+
+  static final _get_listOfPatterns = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_PDFTextStripper__listOfPatterns")
+      .asFunction<
+          jni.JniResult Function(
+    jni.JObject,
+  )>();
+
+  /// from: private java.util.List<java.util.regex.Pattern> listOfPatterns
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  jni.JniObject get listOfPatterns =>
+      jni.JniObject.fromRef(_get_listOfPatterns(reference).object);
+  static final _set_listOfPatterns = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>>(
+          "set_PDFTextStripper__listOfPatterns")
+      .asFunction<
+          jni.JThrowable Function(jni.JObject, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.util.List<java.util.regex.Pattern> listOfPatterns
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  set listOfPatterns(jni.JniObject value) =>
+      _set_listOfPatterns(reference, value.reference);
+
+  static final _get_MIRRORING_CHAR_MAP =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_PDFTextStripper__MIRRORING_CHAR_MAP")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: private static java.util.Map<java.lang.Character,java.lang.Character> MIRRORING_CHAR_MAP
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  static jni.JniObject get MIRRORING_CHAR_MAP =>
+      jni.JniObject.fromRef(_get_MIRRORING_CHAR_MAP().object);
+  static final _set_MIRRORING_CHAR_MAP = jniLookup<
+              ffi.NativeFunction<
+                  jni.JThrowable Function(ffi.Pointer<ffi.Void>)>>(
+          "set_PDFTextStripper__MIRRORING_CHAR_MAP")
+      .asFunction<jni.JThrowable Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: private static java.util.Map<java.lang.Character,java.lang.Character> MIRRORING_CHAR_MAP
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  static set MIRRORING_CHAR_MAP(jni.JniObject value) =>
+      _set_MIRRORING_CHAR_MAP(value.reference);
+
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "PDFTextStripper__ctor")
+      .asFunction<jni.JniResult Function()>();
+
+  /// from: public void <init>()
+  ///
+  /// Instantiate a new PDFTextStripper object.
+  ///@throws IOException If there is an error loading the properties.
+  PDFTextStripper() : super.fromRef(_ctor().object);
+
+  static final _getText = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getText")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getText(org.apache.pdfbox.pdmodel.PDDocument doc)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will return the text of a document. See writeText. <br>
+  /// NOTE: The document must not be encrypted when coming into this method.
+  ///
+  /// IMPORTANT: By default, text extraction is done in the same sequence as the text in the PDF page content stream.
+  /// PDF is a graphic format, not a text format, and unlike HTML, it has no requirements that text one on page
+  /// be rendered in a certain order. The order is the one that was determined by the software that created the
+  /// PDF. To get text sorted from left to right and top to botton, use \#setSortByPosition(boolean).
+  ///@param doc The document to get the text from.
+  ///@return The text of the PDF document.
+  ///@throws IOException if the doc state is invalid or it is encrypted.
+  jni.JniString getText(pdmodel_.PDDocument doc) =>
+      jni.JniString.fromRef(_getText(reference, doc.reference).object);
+
+  static final _resetEngine = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__resetEngine")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void resetEngine()
+  void resetEngine() => _resetEngine(reference).check();
+
+  static final _writeText = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writeText")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void writeText(org.apache.pdfbox.pdmodel.PDDocument doc, java.io.Writer outputStream)
+  ///
+  /// This will take a PDDocument and write the text of that document to the print writer.
+  ///@param doc The document to get the data from.
+  ///@param outputStream The location to put the text.
+  ///@throws IOException If the doc is in an invalid state.
+  void writeText(pdmodel_.PDDocument doc, jni.JniObject outputStream) =>
+      _writeText(reference, doc.reference, outputStream.reference).check();
+
+  static final _processPages = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__processPages")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void processPages(org.apache.pdfbox.pdmodel.PDPageTree pages)
+  ///
+  /// This will process all of the pages and the text that is in them.
+  ///@param pages The pages object in the document.
+  ///@throws IOException If there is an error parsing the text.
+  void processPages(jni.JniObject pages) =>
+      _processPages(reference, pages.reference).check();
+
+  static final _startDocument = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__startDocument")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void startDocument(org.apache.pdfbox.pdmodel.PDDocument document)
+  ///
+  /// This method is available for subclasses of this class. It will be called before processing of the document start.
+  ///@param document The PDF document that is being processed.
+  ///@throws IOException If an IO error occurs.
+  void startDocument(pdmodel_.PDDocument document) =>
+      _startDocument(reference, document.reference).check();
+
+  static final _endDocument = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__endDocument")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void endDocument(org.apache.pdfbox.pdmodel.PDDocument document)
+  ///
+  /// This method is available for subclasses of this class. It will be called after processing of the document
+  /// finishes.
+  ///@param document The PDF document that is being processed.
+  ///@throws IOException If an IO error occurs.
+  void endDocument(pdmodel_.PDDocument document) =>
+      _endDocument(reference, document.reference).check();
+
+  static final _processPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__processPage")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void processPage(org.apache.pdfbox.pdmodel.PDPage page)
+  ///
+  /// This will process the contents of a page.
+  ///@param page The page to process.
+  ///@throws IOException If there is an error processing the page.
+  void processPage(jni.JniObject page) =>
+      _processPage(reference, page.reference).check();
+
+  static final _fillBeadRectangles = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__fillBeadRectangles")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void fillBeadRectangles(org.apache.pdfbox.pdmodel.PDPage page)
+  void fillBeadRectangles(jni.JniObject page) =>
+      _fillBeadRectangles(reference, page.reference).check();
+
+  static final _startArticle = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__startArticle")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void startArticle()
+  ///
+  /// Start a new article, which is typically defined as a column on a single page (also referred to as a bead). This
+  /// assumes that the primary direction of text is left to right. Default implementation is to do nothing. Subclasses
+  /// may provide additional information.
+  ///@throws IOException If there is any error writing to the stream.
+  void startArticle() => _startArticle(reference).check();
+
+  static final _startArticle1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Uint8)>>("PDFTextStripper__startArticle1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: protected void startArticle(boolean isLTR)
+  ///
+  /// Start a new article, which is typically defined as a column on a single page (also referred to as a bead).
+  /// Default implementation is to do nothing. Subclasses may provide additional information.
+  ///@param isLTR true if primary direction of text is left to right.
+  ///@throws IOException If there is any error writing to the stream.
+  void startArticle1(bool isLTR) =>
+      _startArticle1(reference, isLTR ? 1 : 0).check();
+
+  static final _endArticle = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__endArticle")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void endArticle()
+  ///
+  /// End an article. Default implementation is to do nothing. Subclasses may provide additional information.
+  ///@throws IOException If there is any error writing to the stream.
+  void endArticle() => _endArticle(reference).check();
+
+  static final _startPage1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__startPage1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void startPage(org.apache.pdfbox.pdmodel.PDPage page)
+  ///
+  /// Start a new page. Default implementation is to do nothing. Subclasses may provide additional information.
+  ///@param page The page we are about to process.
+  ///@throws IOException If there is any error writing to the stream.
+  void startPage1(jni.JniObject page) =>
+      _startPage1(reference, page.reference).check();
+
+  static final _endPage1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__endPage1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void endPage(org.apache.pdfbox.pdmodel.PDPage page)
+  ///
+  /// End a page. Default implementation is to do nothing. Subclasses may provide additional information.
+  ///@param page The page we are about to process.
+  ///@throws IOException If there is any error writing to the stream.
+  void endPage1(jni.JniObject page) =>
+      _endPage1(reference, page.reference).check();
+
+  static final _writePage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writePage")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writePage()
+  ///
+  /// This will print the text of the processed page to "output". It will estimate, based on the coordinates of the
+  /// text, where newlines and word spacings should be placed. The text will be sorted only if that feature was
+  /// enabled.
+  ///@throws IOException If there is an error writing the text.
+  void writePage() => _writePage(reference).check();
+
+  static final _overlap = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Float,
+                  ffi.Float, ffi.Float, ffi.Float)>>("PDFTextStripper__overlap")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, double, double, double, double)>();
+
+  /// from: private boolean overlap(float y1, float height1, float y2, float height2)
+  bool overlap(double y1, double height1, double y2, double height2) =>
+      _overlap(reference, y1, height1, y2, height2).boolean;
+
+  static final _writeLineSeparator = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__writeLineSeparator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeLineSeparator()
+  ///
+  /// Write the line separator value to the output stream.
+  ///@throws IOException If there is a problem writing out the line separator to the document.
+  void writeLineSeparator() => _writeLineSeparator(reference).check();
+
+  static final _writeWordSeparator = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__writeWordSeparator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeWordSeparator()
+  ///
+  /// Write the word separator value to the output stream.
+  ///@throws IOException If there is a problem writing out the word separator to the document.
+  void writeWordSeparator() => _writeWordSeparator(reference).check();
+
+  static final _writeCharacters = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writeCharacters")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeCharacters(org.apache.pdfbox.text.TextPosition text)
+  ///
+  /// Write the string in TextPosition to the output stream.
+  ///@param text The text to write to the stream.
+  ///@throws IOException If there is an error when writing the text.
+  void writeCharacters(jni.JniObject text) =>
+      _writeCharacters(reference, text.reference).check();
+
+  static final _writeString = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writeString")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeString(java.lang.String text, java.util.List<org.apache.pdfbox.text.TextPosition> textPositions)
+  ///
+  /// Write a Java string to the output stream. The default implementation will ignore the <code>textPositions</code>
+  /// and just calls \#writeString(String).
+  ///@param text The text to write to the stream.
+  ///@param textPositions The TextPositions belonging to the text.
+  ///@throws IOException If there is an error when writing the text.
+  void writeString(jni.JniString text, jni.JniObject textPositions) =>
+      _writeString(reference, text.reference, textPositions.reference).check();
+
+  static final _writeString1 = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writeString1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeString(java.lang.String text)
+  ///
+  /// Write a Java string to the output stream.
+  ///@param text The text to write to the stream.
+  ///@throws IOException If there is an error when writing the text.
+  void writeString1(jni.JniString text) =>
+      _writeString1(reference, text.reference).check();
+
+  static final _within = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Float,
+                  ffi.Float, ffi.Float)>>("PDFTextStripper__within")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, double, double, double)>();
+
+  /// from: private boolean within(float first, float second, float variance)
+  ///
+  /// This will determine of two floating point numbers are within a specified variance.
+  ///@param first The first number to compare to.
+  ///@param second The second number to compare to.
+  ///@param variance The allowed variance.
+  bool within(double first, double second, double variance) =>
+      _within(reference, first, second, variance).boolean;
+
+  static final _processTextPosition = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__processTextPosition")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void processTextPosition(org.apache.pdfbox.text.TextPosition text)
+  ///
+  /// This will process a TextPosition object and add the text to the list of characters on a page. It takes care of
+  /// overlapping text.
+  ///@param text The text to process.
+  void processTextPosition(jni.JniObject text) =>
+      _processTextPosition(reference, text.reference).check();
+
+  static final _getStartPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getStartPage")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public int getStartPage()
+  ///
+  /// This is the page that the text extraction will start on. The pages start at page 1. For example in a 5 page PDF
+  /// document, if the start page is 1 then all pages will be extracted. If the start page is 4 then pages 4 and 5 will
+  /// be extracted. The default value is 1.
+  ///@return Value of property startPage.
+  int getStartPage() => _getStartPage(reference).integer;
+
+  static final _setStartPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int32)>>("PDFTextStripper__setStartPage")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void setStartPage(int startPageValue)
+  ///
+  /// This will set the first page to be extracted by this class.
+  ///@param startPageValue New value of 1-based startPage property.
+  void setStartPage(int startPageValue) =>
+      _setStartPage(reference, startPageValue).check();
+
+  static final _getEndPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getEndPage")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public int getEndPage()
+  ///
+  /// This will get the last page that will be extracted. This is inclusive, for example if a 5 page PDF an endPage
+  /// value of 5 would extract the entire document, an end page of 2 would extract pages 1 and 2. This defaults to
+  /// Integer.MAX_VALUE such that all pages of the pdf will be extracted.
+  ///@return Value of property endPage.
+  int getEndPage() => _getEndPage(reference).integer;
+
+  static final _setEndPage = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int32)>>("PDFTextStripper__setEndPage")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void setEndPage(int endPageValue)
+  ///
+  /// This will set the last page to be extracted by this class.
+  ///@param endPageValue New value of 1-based endPage property.
+  void setEndPage(int endPageValue) =>
+      _setEndPage(reference, endPageValue).check();
+
+  static final _setLineSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setLineSeparator")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setLineSeparator(java.lang.String separator)
+  ///
+  /// Set the desired line separator for output text. The line.separator system property is used if the line separator
+  /// preference is not set explicitly using this method.
+  ///@param separator The desired line separator string.
+  void setLineSeparator(jni.JniString separator) =>
+      _setLineSeparator(reference, separator.reference).check();
+
+  static final _getLineSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getLineSeparator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getLineSeparator()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the line separator.
+  ///@return The desired line separator string.
+  jni.JniString getLineSeparator() =>
+      jni.JniString.fromRef(_getLineSeparator(reference).object);
+
+  static final _getWordSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getWordSeparator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getWordSeparator()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// This will get the word separator.
+  ///@return The desired word separator string.
+  jni.JniString getWordSeparator() =>
+      jni.JniString.fromRef(_getWordSeparator(reference).object);
+
+  static final _setWordSeparator = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setWordSeparator")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setWordSeparator(java.lang.String separator)
+  ///
+  /// Set the desired word separator for output text. The PDFBox text extraction algorithm will output a space
+  /// character if there is enough space between two words. By default a space character is used. If you need and
+  /// accurate count of characters that are found in a PDF document then you might want to set the word separator to
+  /// the empty string.
+  ///@param separator The desired page separator string.
+  void setWordSeparator(jni.JniString separator) =>
+      _setWordSeparator(reference, separator.reference).check();
+
+  static final _getSuppressDuplicateOverlappingText = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getSuppressDuplicateOverlappingText")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public boolean getSuppressDuplicateOverlappingText()
+  ///
+  /// @return Returns the suppressDuplicateOverlappingText.
+  bool getSuppressDuplicateOverlappingText() =>
+      _getSuppressDuplicateOverlappingText(reference).boolean;
+
+  static final _getCurrentPageNo = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getCurrentPageNo")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected int getCurrentPageNo()
+  ///
+  /// Get the current page number that is being processed.
+  ///@return A 1 based number representing the current page.
+  int getCurrentPageNo() => _getCurrentPageNo(reference).integer;
+
+  static final _getOutput = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getOutput")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected java.io.Writer getOutput()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// The output stream that is being written to.
+  ///@return The stream that output is being written to.
+  jni.JniObject getOutput() =>
+      jni.JniObject.fromRef(_getOutput(reference).object);
+
+  static final _getCharactersByArticle = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getCharactersByArticle")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected java.util.List<java.util.List<org.apache.pdfbox.text.TextPosition>> getCharactersByArticle()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Character strings are grouped by articles. It is quite common that there will only be a single article. This
+  /// returns a List that contains List objects, the inner lists will contain TextPosition objects.
+  ///@return A double List of TextPositions for all text strings on the page.
+  jni.JniObject getCharactersByArticle() =>
+      jni.JniObject.fromRef(_getCharactersByArticle(reference).object);
+
+  static final _setSuppressDuplicateOverlappingText = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
+          "PDFTextStripper__setSuppressDuplicateOverlappingText")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void setSuppressDuplicateOverlappingText(boolean suppressDuplicateOverlappingTextValue)
+  ///
+  /// By default the text stripper will attempt to remove text that overlapps each other. Word paints the same
+  /// character several times in order to make it look bold. By setting this to false all text will be extracted, which
+  /// means that certain sections will be duplicated, but better performance will be noticed.
+  ///@param suppressDuplicateOverlappingTextValue The suppressDuplicateOverlappingText to set.
+  void setSuppressDuplicateOverlappingText(
+          bool suppressDuplicateOverlappingTextValue) =>
+      _setSuppressDuplicateOverlappingText(
+              reference, suppressDuplicateOverlappingTextValue ? 1 : 0)
+          .check();
+
+  static final _getSeparateByBeads = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getSeparateByBeads")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public boolean getSeparateByBeads()
+  ///
+  /// This will tell if the text stripper should separate by beads.
+  ///@return If the text will be grouped by beads.
+  bool getSeparateByBeads() => _getSeparateByBeads(reference).boolean;
+
+  static final _setShouldSeparateByBeads = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Uint8)>>("PDFTextStripper__setShouldSeparateByBeads")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void setShouldSeparateByBeads(boolean aShouldSeparateByBeads)
+  ///
+  /// Set if the text stripper should group the text output by a list of beads. The default value is true!
+  ///@param aShouldSeparateByBeads The new grouping of beads.
+  void setShouldSeparateByBeads(bool aShouldSeparateByBeads) =>
+      _setShouldSeparateByBeads(reference, aShouldSeparateByBeads ? 1 : 0)
+          .check();
+
+  static final _getEndBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getEndBookmark")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem getEndBookmark()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Get the bookmark where text extraction should end, inclusive. Default is null.
+  ///@return The ending bookmark.
+  jni.JniObject getEndBookmark() =>
+      jni.JniObject.fromRef(_getEndBookmark(reference).object);
+
+  static final _setEndBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setEndBookmark")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setEndBookmark(org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem aEndBookmark)
+  ///
+  /// Set the bookmark where the text extraction should stop.
+  ///@param aEndBookmark The ending bookmark.
+  void setEndBookmark(jni.JniObject aEndBookmark) =>
+      _setEndBookmark(reference, aEndBookmark.reference).check();
+
+  static final _getStartBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getStartBookmark")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem getStartBookmark()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Get the bookmark where text extraction should start, inclusive. Default is null.
+  ///@return The starting bookmark.
+  jni.JniObject getStartBookmark() =>
+      jni.JniObject.fromRef(_getStartBookmark(reference).object);
+
+  static final _setStartBookmark = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setStartBookmark")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setStartBookmark(org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem aStartBookmark)
+  ///
+  /// Set the bookmark where text extraction should start, inclusive.
+  ///@param aStartBookmark The starting bookmark.
+  void setStartBookmark(jni.JniObject aStartBookmark) =>
+      _setStartBookmark(reference, aStartBookmark.reference).check();
+
+  static final _getAddMoreFormatting = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getAddMoreFormatting")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public boolean getAddMoreFormatting()
+  ///
+  /// This will tell if the text stripper should add some more text formatting.
+  ///@return true if some more text formatting will be added
+  bool getAddMoreFormatting() => _getAddMoreFormatting(reference).boolean;
+
+  static final _setAddMoreFormatting = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Uint8)>>("PDFTextStripper__setAddMoreFormatting")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void setAddMoreFormatting(boolean newAddMoreFormatting)
+  ///
+  /// There will some additional text formatting be added if addMoreFormatting is set to true. Default is false.
+  ///@param newAddMoreFormatting Tell PDFBox to add some more text formatting
+  void setAddMoreFormatting(bool newAddMoreFormatting) =>
+      _setAddMoreFormatting(reference, newAddMoreFormatting ? 1 : 0).check();
+
+  static final _getSortByPosition = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getSortByPosition")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public boolean getSortByPosition()
+  ///
+  /// This will tell if the text stripper should sort the text tokens before writing to the stream.
+  ///@return true If the text tokens will be sorted before being written.
+  bool getSortByPosition() => _getSortByPosition(reference).boolean;
+
+  static final _setSortByPosition = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Uint8)>>("PDFTextStripper__setSortByPosition")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+
+  /// from: public void setSortByPosition(boolean newSortByPosition)
+  ///
+  /// The order of the text tokens in a PDF file may not be in the same as they appear visually on the screen. For
+  /// example, a PDF writer may write out all text by font, so all bold or larger text, then make a second pass and
+  /// write out the normal text.<br>
+  /// The default is to __not__ sort by position.<br>
+  /// <br>
+  /// A PDF writer could choose to write each character in a different order. By default PDFBox does __not__ sort
+  /// the text tokens before processing them due to performance reasons.
+  ///@param newSortByPosition Tell PDFBox to sort the text positions.
+  void setSortByPosition(bool newSortByPosition) =>
+      _setSortByPosition(reference, newSortByPosition ? 1 : 0).check();
+
+  static final _getSpacingTolerance = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getSpacingTolerance")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public float getSpacingTolerance()
+  ///
+  /// Get the current space width-based tolerance value that is being used to estimate where spaces in text should be
+  /// added. Note that the default value for this has been determined from trial and error.
+  ///@return The current tolerance / scaling factor
+  double getSpacingTolerance() => _getSpacingTolerance(reference).float;
+
+  static final _setSpacingTolerance = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Float)>>("PDFTextStripper__setSpacingTolerance")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, double)>();
+
+  /// from: public void setSpacingTolerance(float spacingToleranceValue)
+  ///
+  /// Set the space width-based tolerance value that is used to estimate where spaces in text should be added. Note
+  /// that the default value for this has been determined from trial and error. Setting this value larger will reduce
+  /// the number of spaces added.
+  ///@param spacingToleranceValue tolerance / scaling factor to use
+  void setSpacingTolerance(double spacingToleranceValue) =>
+      _setSpacingTolerance(reference, spacingToleranceValue).check();
+
+  static final _getAverageCharTolerance = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getAverageCharTolerance")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public float getAverageCharTolerance()
+  ///
+  /// Get the current character width-based tolerance value that is being used to estimate where spaces in text should
+  /// be added. Note that the default value for this has been determined from trial and error.
+  ///@return The current tolerance / scaling factor
+  double getAverageCharTolerance() => _getAverageCharTolerance(reference).float;
+
+  static final _setAverageCharTolerance = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Float)>>("PDFTextStripper__setAverageCharTolerance")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, double)>();
+
+  /// from: public void setAverageCharTolerance(float averageCharToleranceValue)
+  ///
+  /// Set the character width-based tolerance value that is used to estimate where spaces in text should be added. Note
+  /// that the default value for this has been determined from trial and error. Setting this value larger will reduce
+  /// the number of spaces added.
+  ///@param averageCharToleranceValue average tolerance / scaling factor to use
+  void setAverageCharTolerance(double averageCharToleranceValue) =>
+      _setAverageCharTolerance(reference, averageCharToleranceValue).check();
+
+  static final _getIndentThreshold = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getIndentThreshold")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public float getIndentThreshold()
+  ///
+  /// returns the multiple of whitespace character widths for the current text which the current line start can be
+  /// indented from the previous line start beyond which the current line start is considered to be a paragraph start.
+  ///@return the number of whitespace character widths to use when detecting paragraph indents.
+  double getIndentThreshold() => _getIndentThreshold(reference).float;
+
+  static final _setIndentThreshold = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Float)>>("PDFTextStripper__setIndentThreshold")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, double)>();
+
+  /// from: public void setIndentThreshold(float indentThresholdValue)
+  ///
+  /// sets the multiple of whitespace character widths for the current text which the current line start can be
+  /// indented from the previous line start beyond which the current line start is considered to be a paragraph start.
+  /// The default value is 2.0.
+  ///@param indentThresholdValue the number of whitespace character widths to use when detecting paragraph indents.
+  void setIndentThreshold(double indentThresholdValue) =>
+      _setIndentThreshold(reference, indentThresholdValue).check();
+
+  static final _getDropThreshold = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getDropThreshold")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public float getDropThreshold()
+  ///
+  /// the minimum whitespace, as a multiple of the max height of the current characters beyond which the current line
+  /// start is considered to be a paragraph start.
+  ///@return the character height multiple for max allowed whitespace between lines in the same paragraph.
+  double getDropThreshold() => _getDropThreshold(reference).float;
+
+  static final _setDropThreshold = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Float)>>("PDFTextStripper__setDropThreshold")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, double)>();
+
+  /// from: public void setDropThreshold(float dropThresholdValue)
+  ///
+  /// sets the minimum whitespace, as a multiple of the max height of the current characters beyond which the current
+  /// line start is considered to be a paragraph start. The default value is 2.5.
+  ///@param dropThresholdValue the character height multiple for max allowed whitespace between lines in the same
+  /// paragraph.
+  void setDropThreshold(double dropThresholdValue) =>
+      _setDropThreshold(reference, dropThresholdValue).check();
+
+  static final _getParagraphStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getParagraphStart")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getParagraphStart()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the string which will be used at the beginning of a paragraph.
+  ///@return the paragraph start string
+  jni.JniString getParagraphStart() =>
+      jni.JniString.fromRef(_getParagraphStart(reference).object);
+
+  static final _setParagraphStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setParagraphStart")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setParagraphStart(java.lang.String s)
+  ///
+  /// Sets the string which will be used at the beginning of a paragraph.
+  ///@param s the paragraph start string
+  void setParagraphStart(jni.JniString s) =>
+      _setParagraphStart(reference, s.reference).check();
+
+  static final _getParagraphEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getParagraphEnd")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getParagraphEnd()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the string which will be used at the end of a paragraph.
+  ///@return the paragraph end string
+  jni.JniString getParagraphEnd() =>
+      jni.JniString.fromRef(_getParagraphEnd(reference).object);
+
+  static final _setParagraphEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setParagraphEnd")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setParagraphEnd(java.lang.String s)
+  ///
+  /// Sets the string which will be used at the end of a paragraph.
+  ///@param s the paragraph end string
+  void setParagraphEnd(jni.JniString s) =>
+      _setParagraphEnd(reference, s.reference).check();
+
+  static final _getPageStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getPageStart")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getPageStart()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the string which will be used at the beginning of a page.
+  ///@return the page start string
+  jni.JniString getPageStart() =>
+      jni.JniString.fromRef(_getPageStart(reference).object);
+
+  static final _setPageStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setPageStart")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setPageStart(java.lang.String pageStartValue)
+  ///
+  /// Sets the string which will be used at the beginning of a page.
+  ///@param pageStartValue the page start string
+  void setPageStart(jni.JniString pageStartValue) =>
+      _setPageStart(reference, pageStartValue.reference).check();
+
+  static final _getPageEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getPageEnd")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getPageEnd()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the string which will be used at the end of a page.
+  ///@return the page end string
+  jni.JniString getPageEnd() =>
+      jni.JniString.fromRef(_getPageEnd(reference).object);
+
+  static final _setPageEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setPageEnd")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setPageEnd(java.lang.String pageEndValue)
+  ///
+  /// Sets the string which will be used at the end of a page.
+  ///@param pageEndValue the page end string
+  void setPageEnd(jni.JniString pageEndValue) =>
+      _setPageEnd(reference, pageEndValue.reference).check();
+
+  static final _getArticleStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getArticleStart")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getArticleStart()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the string which will be used at the beginning of an article.
+  ///@return the article start string
+  jni.JniString getArticleStart() =>
+      jni.JniString.fromRef(_getArticleStart(reference).object);
+
+  static final _setArticleStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setArticleStart")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setArticleStart(java.lang.String articleStartValue)
+  ///
+  /// Sets the string which will be used at the beginning of an article.
+  ///@param articleStartValue the article start string
+  void setArticleStart(jni.JniString articleStartValue) =>
+      _setArticleStart(reference, articleStartValue.reference).check();
+
+  static final _getArticleEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__getArticleEnd")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public java.lang.String getArticleEnd()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Returns the string which will be used at the end of an article.
+  ///@return the article end string
+  jni.JniString getArticleEnd() =>
+      jni.JniString.fromRef(_getArticleEnd(reference).object);
+
+  static final _setArticleEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__setArticleEnd")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: public void setArticleEnd(java.lang.String articleEndValue)
+  ///
+  /// Sets the string which will be used at the end of an article.
+  ///@param articleEndValue the article end string
+  void setArticleEnd(jni.JniString articleEndValue) =>
+      _setArticleEnd(reference, articleEndValue.reference).check();
+
+  static final _handleLineSeparation = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Float)>>("PDFTextStripper__handleLineSeparation")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, double)>();
+
+  /// from: private org.apache.pdfbox.text.PDFTextStripper.PositionWrapper handleLineSeparation(org.apache.pdfbox.text.PDFTextStripper.PositionWrapper current, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastPosition, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastLineStartPosition, float maxHeightForLine)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// handles the line separator for a new line given the specified current and previous TextPositions.
+  ///@param current the current text position
+  ///@param lastPosition the previous text position
+  ///@param lastLineStartPosition the last text position that followed a line separator.
+  ///@param maxHeightForLine max height for positions since lastLineStartPosition
+  ///@return start position of the last line
+  ///@throws IOException if something went wrong
+  jni.JniObject handleLineSeparation(
+          jni.JniObject current,
+          jni.JniObject lastPosition,
+          jni.JniObject lastLineStartPosition,
+          double maxHeightForLine) =>
+      jni.JniObject.fromRef(_handleLineSeparation(
+              reference,
+              current.reference,
+              lastPosition.reference,
+              lastLineStartPosition.reference,
+              maxHeightForLine)
+          .object);
+
+  static final _isParagraphSeparation = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Float)>>("PDFTextStripper__isParagraphSeparation")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, double)>();
+
+  /// from: private void isParagraphSeparation(org.apache.pdfbox.text.PDFTextStripper.PositionWrapper position, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastPosition, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastLineStartPosition, float maxHeightForLine)
+  ///
+  /// tests the relationship between the last text position, the current text position and the last text position that
+  /// followed a line separator to decide if the gap represents a paragraph separation. This should <i>only</i> be
+  /// called for consecutive text positions that first pass the line separation test.
+  ///
+  /// This base implementation tests to see if the lastLineStartPosition is null OR if the current vertical position
+  /// has dropped below the last text vertical position by at least 2.5 times the current text height OR if the current
+  /// horizontal position is indented by at least 2 times the current width of a space character.
+  ///
+  ///
+  ///
+  /// This also attempts to identify text that is indented under a hanging indent.
+  ///
+  ///
+  ///
+  /// This method sets the isParagraphStart and isHangingIndent flags on the current position object.
+  ///
+  ///
+  ///@param position the current text position. This may have its isParagraphStart or isHangingIndent flags set upon
+  /// return.
+  ///@param lastPosition the previous text position (should not be null).
+  ///@param lastLineStartPosition the last text position that followed a line separator, or null.
+  ///@param maxHeightForLine max height for text positions since lasLineStartPosition.
+  void isParagraphSeparation(jni.JniObject position, jni.JniObject lastPosition,
+          jni.JniObject lastLineStartPosition, double maxHeightForLine) =>
+      _isParagraphSeparation(
+              reference,
+              position.reference,
+              lastPosition.reference,
+              lastLineStartPosition.reference,
+              maxHeightForLine)
+          .check();
+
+  static final _multiplyFloat = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Float,
+                  ffi.Float)>>("PDFTextStripper__multiplyFloat")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, double, double)>();
+
+  /// from: private float multiplyFloat(float value1, float value2)
+  double multiplyFloat(double value1, double value2) =>
+      _multiplyFloat(reference, value1, value2).float;
+
+  static final _writeParagraphSeparator = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__writeParagraphSeparator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeParagraphSeparator()
+  ///
+  /// writes the paragraph separator string to the output.
+  ///@throws IOException if something went wrong
+  void writeParagraphSeparator() => _writeParagraphSeparator(reference).check();
+
+  static final _writeParagraphStart = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__writeParagraphStart")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeParagraphStart()
+  ///
+  /// Write something (if defined) at the start of a paragraph.
+  ///@throws IOException if something went wrong
+  void writeParagraphStart() => _writeParagraphStart(reference).check();
+
+  static final _writeParagraphEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writeParagraphEnd")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writeParagraphEnd()
+  ///
+  /// Write something (if defined) at the end of a paragraph.
+  ///@throws IOException if something went wrong
+  void writeParagraphEnd() => _writeParagraphEnd(reference).check();
+
+  static final _writePageStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writePageStart")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writePageStart()
+  ///
+  /// Write something (if defined) at the start of a page.
+  ///@throws IOException if something went wrong
+  void writePageStart() => _writePageStart(reference).check();
+
+  static final _writePageEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writePageEnd")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void writePageEnd()
+  ///
+  /// Write something (if defined) at the end of a page.
+  ///@throws IOException if something went wrong
+  void writePageEnd() => _writePageEnd(reference).check();
+
+  static final _matchListItemPattern = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__matchListItemPattern")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.util.regex.Pattern matchListItemPattern(org.apache.pdfbox.text.PDFTextStripper.PositionWrapper pw)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// returns the list item Pattern object that matches the text at the specified PositionWrapper or null if the text
+  /// does not match such a pattern. The list of Patterns tested against is given by the \#getListItemPatterns()
+  /// method. To add to the list, simply override that method (if sub-classing) or explicitly supply your own list
+  /// using \#setListItemPatterns(List).
+  ///@param pw position
+  ///@return the matching pattern
+  jni.JniObject matchListItemPattern(jni.JniObject pw) => jni.JniObject.fromRef(
+      _matchListItemPattern(reference, pw.reference).object);
+
+  static final _setListItemPatterns = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(
+                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__setListItemPatterns")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected void setListItemPatterns(java.util.List<java.util.regex.Pattern> patterns)
+  ///
+  /// use to supply a different set of regular expression patterns for matching list item starts.
+  ///@param patterns list of patterns
+  void setListItemPatterns(jni.JniObject patterns) =>
+      _setListItemPatterns(reference, patterns.reference).check();
+
+  static final _getListItemPatterns = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "PDFTextStripper__getListItemPatterns")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: protected java.util.List<java.util.regex.Pattern> getListItemPatterns()
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// returns a list of regular expression Patterns representing different common list item formats. For example
+  /// numbered items of form:
+  /// <ol>
+  /// <li>some text</li>
+  /// <li>more text</li>
+  /// </ol>
+  /// or
+  /// <ul>
+  /// <li>some text</li>
+  /// <li>more text</li>
+  /// </ul>
+  /// etc., all begin with some character pattern. The pattern "\\d+\." (matches "1.", "2.", ...) or "\[\\d+\]"
+  /// (matches "[1]", "[2]", ...).
+  ///
+  /// This method returns a list of such regular expression Patterns.
+  ///@return a list of Pattern objects.
+  jni.JniObject getListItemPatterns() =>
+      jni.JniObject.fromRef(_getListItemPatterns(reference).object);
+
+  static final _matchPattern = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__matchPattern")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: static protected java.util.regex.Pattern matchPattern(java.lang.String string, java.util.List<java.util.regex.Pattern> patterns)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// iterates over the specified list of Patterns until it finds one that matches the specified string. Then returns
+  /// the Pattern.
+  ///
+  /// Order of the supplied list of patterns is important as most common patterns should come first. Patterns should be
+  /// strict in general, and all will be used with case sensitivity on.
+  ///
+  ///
+  ///@param string the string to be searched
+  ///@param patterns list of patterns
+  ///@return matching pattern
+  static jni.JniObject matchPattern(
+          jni.JniString string, jni.JniObject patterns) =>
+      jni.JniObject.fromRef(
+          _matchPattern(string.reference, patterns.reference).object);
+
+  static final _writeLine = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__writeLine")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private void writeLine(java.util.List<org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions> line)
+  ///
+  /// Write a list of string containing a whole line of a document.
+  ///@param line a list with the words of the given line
+  ///@throws IOException if something went wrong
+  void writeLine(jni.JniObject line) =>
+      _writeLine(reference, line.reference).check();
+
+  static final _normalize = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__normalize")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.util.List<org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions> normalize(java.util.List<org.apache.pdfbox.text.PDFTextStripper.LineItem> line)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Normalize the given list of TextPositions.
+  ///@param line list of TextPositions
+  ///@return a list of strings, one string for every word
+  jni.JniObject normalize(jni.JniObject line) =>
+      jni.JniObject.fromRef(_normalize(reference, line.reference).object);
+
+  static final _handleDirection = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__handleDirection")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String handleDirection(java.lang.String word)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Handles the LTR and RTL direction of the given words. The whole implementation stands and falls with the given
+  /// word. If the word is a full line, the results will be the best. If the word contains of single words or
+  /// characters, the order of the characters in a word or words in a line may wrong, due to RTL and LTR marks and
+  /// characters!
+  ///
+  /// Based on http://www.nesterovsky-bros.com/weblog/2013/07/28/VisualToLogicalConversionInJava.aspx
+  ///@param word The word that shall be processed
+  ///@return new word with the correct direction of the containing characters
+  jni.JniString handleDirection(jni.JniString word) =>
+      jni.JniString.fromRef(_handleDirection(reference, word.reference).object);
+
+  static final _parseBidiFile = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__parseBidiFile")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: private static void parseBidiFile(java.io.InputStream inputStream)
+  ///
+  /// This method parses the bidi file provided as inputstream.
+  ///@param inputStream - The bidi file as inputstream
+  ///@throws IOException if any line could not be read by the LineNumberReader
+  static void parseBidiFile(jni.JniObject inputStream) =>
+      _parseBidiFile(inputStream.reference).check();
+
+  static final _createWord = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__createWord")
+      .asFunction<
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions createWord(java.lang.String word, java.util.List<org.apache.pdfbox.text.TextPosition> wordPositions)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Used within \#normalize(List) to create a single WordWithTextPositions entry.
+  jni.JniObject createWord(jni.JniString word, jni.JniObject wordPositions) =>
+      jni.JniObject.fromRef(
+          _createWord(reference, word.reference, wordPositions.reference)
+              .object);
+
+  static final _normalizeWord = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__normalizeWord")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.String normalizeWord(java.lang.String word)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Normalize certain Unicode characters. For example, convert the single "fi" ligature to "f" and "i". Also
+  /// normalises Arabic and Hebrew presentation forms.
+  ///@param word Word to normalize
+  ///@return Normalized word
+  jni.JniString normalizeWord(jni.JniString word) =>
+      jni.JniString.fromRef(_normalizeWord(reference, word.reference).object);
+
+  static final _normalizeAdd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("PDFTextStripper__normalizeAdd")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
+
+  /// from: private java.lang.StringBuilder normalizeAdd(java.util.List<org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions> normalized, java.lang.StringBuilder lineBuilder, java.util.List<org.apache.pdfbox.text.TextPosition> wordPositions, org.apache.pdfbox.text.PDFTextStripper.LineItem item)
+  /// The returned object must be deleted after use, by calling the `delete` method.
+  ///
+  /// Used within \#normalize(List) to handle a TextPosition.
+  ///@return The StringBuilder that must be used when calling this method.
+  jni.JniObject normalizeAdd(
+          jni.JniObject normalized,
+          jni.JniObject lineBuilder,
+          jni.JniObject wordPositions,
+          jni.JniObject item) =>
+      jni.JniObject.fromRef(_normalizeAdd(reference, normalized.reference,
+              lineBuilder.reference, wordPositions.reference, item.reference)
+          .object);
+}
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/third_party/org/apache/pdfbox/pdmodel.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/third_party/org/apache/pdfbox/pdmodel.dart
deleted file mode 100644
index 5ac4a5d..0000000
--- a/pkgs/jnigen/example/pdfbox_plugin/lib/third_party/org/apache/pdfbox/pdmodel.dart
+++ /dev/null
@@ -1,2535 +0,0 @@
-// Generated from Apache PDFBox library which is licensed under the Apache License 2.0.
-// The following copyright from the original authors applies.
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Autogenerated by jnigen. DO NOT EDIT!
-
-// ignore_for_file: camel_case_types
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
-// ignore_for_file: annotate_overrides
-// ignore_for_file: no_leading_underscores_for_local_identifiers
-// ignore_for_file: unused_element
-
-import "dart:ffi" as ffi;
-import "package:jni/jni.dart" as jni;
-
-import "../../../_init.dart" show jniLookup;
-
-/// from: org.apache.pdfbox.pdmodel.PDDocument
-///
-/// This is the in-memory representation of the PDF document.
-/// The \#close() method must be called once the document is no longer needed.
-///@author Ben Litchfield
-class PDDocument extends jni.JniObject {
-  PDDocument.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
-
-  static final _get_RESERVE_BYTE_RANGE =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "get_org_apache_pdfbox_pdmodel_PDDocument_RESERVE_BYTE_RANGE")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: private static final int[] RESERVE_BYTE_RANGE
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// For signing: large reserve byte range used as placeholder in the saved PDF until the actual
-  /// length of the PDF is known. You'll need to fetch (with
-  /// PDSignature\#getByteRange() ) and reassign this yourself (with
-  /// PDSignature\#setByteRange(int[]) ) only if you call
-  /// \#saveIncrementalForExternalSigning(java.io.OutputStream) saveIncrementalForExternalSigning()
-  /// twice.
-  static jni.JniObject get RESERVE_BYTE_RANGE =>
-      jni.JniObject.fromRef(_get_RESERVE_BYTE_RANGE());
-
-  static final _get_LOG =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "get_org_apache_pdfbox_pdmodel_PDDocument_LOG")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: private static final org.apache.commons.logging.Log LOG
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  static jni.JniObject get LOG => jni.JniObject.fromRef(_get_LOG());
-
-  static final _get_document = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_document")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private final org.apache.pdfbox.cos.COSDocument document
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get document => jni.JniObject.fromRef(_get_document(reference));
-
-  static final _get_documentInformation = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_documentInformation")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.PDDocumentInformation documentInformation
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  PDDocumentInformation get documentInformation =>
-      PDDocumentInformation.fromRef(_get_documentInformation(reference));
-  static final _set_documentInformation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_documentInformation")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.PDDocumentInformation documentInformation
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set documentInformation(PDDocumentInformation value) =>
-      _set_documentInformation(reference, value.reference);
-
-  static final _get_documentCatalog = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.PDDocumentCatalog documentCatalog
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get documentCatalog =>
-      jni.JniObject.fromRef(_get_documentCatalog(reference));
-  static final _set_documentCatalog = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.PDDocumentCatalog documentCatalog
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set documentCatalog(jni.JniObject value) =>
-      _set_documentCatalog(reference, value.reference);
-
-  static final _get_encryption = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_encryption")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.encryption.PDEncryption encryption
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get encryption =>
-      jni.JniObject.fromRef(_get_encryption(reference));
-  static final _set_encryption = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_encryption")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.encryption.PDEncryption encryption
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set encryption(jni.JniObject value) =>
-      _set_encryption(reference, value.reference);
-
-  static final _get_allSecurityToBeRemoved = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private boolean allSecurityToBeRemoved
-  bool get allSecurityToBeRemoved =>
-      _get_allSecurityToBeRemoved(reference) != 0;
-  static final _set_allSecurityToBeRemoved = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private boolean allSecurityToBeRemoved
-  set allSecurityToBeRemoved(bool value) =>
-      _set_allSecurityToBeRemoved(reference, value ? 1 : 0);
-
-  static final _get_documentId = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_documentId")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.Long documentId
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get documentId =>
-      jni.JniObject.fromRef(_get_documentId(reference));
-  static final _set_documentId = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_documentId")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.Long documentId
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set documentId(jni.JniObject value) =>
-      _set_documentId(reference, value.reference);
-
-  static final _get_pdfSource = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_pdfSource")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private final org.apache.pdfbox.io.RandomAccessRead pdfSource
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get pdfSource =>
-      jni.JniObject.fromRef(_get_pdfSource(reference));
-
-  static final _get_accessPermission = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_accessPermission")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.encryption.AccessPermission accessPermission
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get accessPermission =>
-      jni.JniObject.fromRef(_get_accessPermission(reference));
-  static final _set_accessPermission = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_accessPermission")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.encryption.AccessPermission accessPermission
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set accessPermission(jni.JniObject value) =>
-      _set_accessPermission(reference, value.reference);
-
-  static final _get_fontsToSubset = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_fontsToSubset")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private final java.util.Set<org.apache.pdfbox.pdmodel.font.PDFont> fontsToSubset
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get fontsToSubset =>
-      jni.JniObject.fromRef(_get_fontsToSubset(reference));
-
-  static final _get_fontsToClose = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_fontsToClose")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private final java.util.Set<org.apache.fontbox.ttf.TrueTypeFont> fontsToClose
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get fontsToClose =>
-      jni.JniObject.fromRef(_get_fontsToClose(reference));
-
-  static final _get_signInterface = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_signInterface")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signInterface
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get signInterface =>
-      jni.JniObject.fromRef(_get_signInterface(reference));
-  static final _set_signInterface = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_signInterface")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signInterface
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set signInterface(jni.JniObject value) =>
-      _set_signInterface(reference, value.reference);
-
-  static final _get_signingSupport = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_signingSupport")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SigningSupport signingSupport
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get signingSupport =>
-      jni.JniObject.fromRef(_get_signingSupport(reference));
-  static final _set_signingSupport = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_signingSupport")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.digitalsignature.SigningSupport signingSupport
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set signingSupport(jni.JniObject value) =>
-      _set_signingSupport(reference, value.reference);
-
-  static final _get_resourceCache = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_resourceCache")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.ResourceCache resourceCache
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get resourceCache =>
-      jni.JniObject.fromRef(_get_resourceCache(reference));
-  static final _set_resourceCache = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_resourceCache")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.ResourceCache resourceCache
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set resourceCache(jni.JniObject value) =>
-      _set_resourceCache(reference, value.reference);
-
-  static final _get_signatureAdded = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private boolean signatureAdded
-  bool get signatureAdded => _get_signatureAdded(reference) != 0;
-  static final _set_signatureAdded = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private boolean signatureAdded
-  set signatureAdded(bool value) =>
-      _set_signatureAdded(reference, value ? 1 : 0);
-
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "org_apache_pdfbox_pdmodel_PDDocument_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: public void <init>()
-  ///
-  /// Creates an empty PDF document.
-  /// You need to add at least one page for the document to be valid.
-  PDDocument() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _ctor1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_ctor1")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void <init>(org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  ///
-  /// Creates an empty PDF document.
-  /// You need to add at least one page for the document to be valid.
-  ///@param memUsageSetting defines how memory is used for buffering PDF streams
-  PDDocument.ctor1(jni.JniObject memUsageSetting)
-      : super.fromRef(_ctor1(memUsageSetting.reference)) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _ctor2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_ctor2")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void <init>(org.apache.pdfbox.cos.COSDocument doc)
-  ///
-  /// Constructor that uses an existing document. The COSDocument that is passed in must be valid.
-  ///@param doc The COSDocument that this document wraps.
-  PDDocument.ctor2(jni.JniObject doc) : super.fromRef(_ctor2(doc.reference)) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _ctor3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_ctor3")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void <init>(org.apache.pdfbox.cos.COSDocument doc, org.apache.pdfbox.io.RandomAccessRead source)
-  ///
-  /// Constructor that uses an existing document. The COSDocument that is passed in must be valid.
-  ///@param doc The COSDocument that this document wraps.
-  ///@param source the parser which is used to read the pdf
-  PDDocument.ctor3(jni.JniObject doc, jni.JniObject source)
-      : super.fromRef(_ctor3(doc.reference, source.reference)) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _ctor4 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_ctor4")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void <init>(org.apache.pdfbox.cos.COSDocument doc, org.apache.pdfbox.io.RandomAccessRead source, org.apache.pdfbox.pdmodel.encryption.AccessPermission permission)
-  ///
-  /// Constructor that uses an existing document. The COSDocument that is passed in must be valid.
-  ///@param doc The COSDocument that this document wraps.
-  ///@param source the parser which is used to read the pdf
-  ///@param permission he access permissions of the pdf
-  PDDocument.ctor4(
-      jni.JniObject doc, jni.JniObject source, jni.JniObject permission)
-      : super.fromRef(
-            _ctor4(doc.reference, source.reference, permission.reference)) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _addPage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_addPage")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void addPage(org.apache.pdfbox.pdmodel.PDPage page)
-  ///
-  /// This will add a page to the document. This is a convenience method, that will add the page to the root of the
-  /// hierarchy and set the parent of the page to the root.
-  ///@param page The page to add to the document.
-  void addPage(jni.JniObject page) {
-    final result__ = _addPage(reference, page.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _addSignature = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_addSignature")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject)
-  ///
-  /// Add parameters of signature to be created externally using default signature options. See
-  /// \#saveIncrementalForExternalSigning(OutputStream) method description on external
-  /// signature creation scenario details.
-  ///
-  /// Only one signature may be added in a document. To sign several times,
-  /// load document, add signature, save incremental and close again.
-  ///@param sigObject is the PDSignatureField model
-  ///@throws IOException if there is an error creating required fields
-  ///@throws IllegalStateException if one attempts to add several signature
-  /// fields.
-  void addSignature(jni.JniObject sigObject) {
-    final result__ = _addSignature(reference, sigObject.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _addSignature1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_addSignature1")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options)
-  ///
-  /// Add parameters of signature to be created externally. See
-  /// \#saveIncrementalForExternalSigning(OutputStream) method description on external
-  /// signature creation scenario details.
-  ///
-  /// Only one signature may be added in a document. To sign several times,
-  /// load document, add signature, save incremental and close again.
-  ///@param sigObject is the PDSignatureField model
-  ///@param options signature options
-  ///@throws IOException if there is an error creating required fields
-  ///@throws IllegalStateException if one attempts to add several signature
-  /// fields.
-  void addSignature1(jni.JniObject sigObject, jni.JniObject options) {
-    final result__ =
-        _addSignature1(reference, sigObject.reference, options.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _addSignature2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_addSignature2")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface)
-  ///
-  /// Add a signature to be created using the instance of given interface.
-  ///
-  /// Only one signature may be added in a document. To sign several times,
-  /// load document, add signature, save incremental and close again.
-  ///@param sigObject is the PDSignatureField model
-  ///@param signatureInterface is an interface whose implementation provides
-  /// signing capabilities. Can be null if external signing if used.
-  ///@throws IOException if there is an error creating required fields
-  ///@throws IllegalStateException if one attempts to add several signature
-  /// fields.
-  void addSignature2(
-      jni.JniObject sigObject, jni.JniObject signatureInterface) {
-    final result__ = _addSignature2(
-        reference, sigObject.reference, signatureInterface.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _addSignature3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_addSignature3")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void addSignature(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options)
-  ///
-  /// This will add a signature to the document. If the 0-based page number in the options
-  /// parameter is smaller than 0 or larger than max, the nearest valid page number will be used
-  /// (i.e. 0 or max) and no exception will be thrown.
-  ///
-  /// Only one signature may be added in a document. To sign several times,
-  /// load document, add signature, save incremental and close again.
-  ///@param sigObject is the PDSignatureField model
-  ///@param signatureInterface is an interface whose implementation provides
-  /// signing capabilities. Can be null if external signing if used.
-  ///@param options signature options
-  ///@throws IOException if there is an error creating required fields
-  ///@throws IllegalStateException if one attempts to add several signature
-  /// fields.
-  void addSignature3(jni.JniObject sigObject, jni.JniObject signatureInterface,
-      jni.JniObject options) {
-    final result__ = _addSignature3(reference, sigObject.reference,
-        signatureInterface.reference, options.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _findSignatureField = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_findSignatureField")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField findSignatureField(java.util.Iterator<org.apache.pdfbox.pdmodel.interactive.form.PDField> fieldIterator, org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sigObject)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Search acroform fields for signature field with specific signature dictionary.
-  ///@param fieldIterator iterator on all fields.
-  ///@param sigObject signature object (the /V part).
-  ///@return a signature field if found, or null if none was found.
-  jni.JniObject findSignatureField(
-      jni.JniObject fieldIterator, jni.JniObject sigObject) {
-    final result__ = jni.JniObject.fromRef(_findSignatureField(
-        reference, fieldIterator.reference, sigObject.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _checkSignatureField = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_checkSignatureField")
-      .asFunction<
-          int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: private boolean checkSignatureField(java.util.Iterator<org.apache.pdfbox.pdmodel.interactive.form.PDField> fieldIterator, org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField)
-  ///
-  /// Check if the field already exists in the field list.
-  ///@param fieldIterator iterator on all fields.
-  ///@param signatureField the signature field.
-  ///@return true if the field already existed in the field list, false if not.
-  bool checkSignatureField(
-      jni.JniObject fieldIterator, jni.JniObject signatureField) {
-    final result__ = _checkSignatureField(
-            reference, fieldIterator.reference, signatureField.reference) !=
-        0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _checkSignatureAnnotation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_checkSignatureAnnotation")
-      .asFunction<
-          int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: private boolean checkSignatureAnnotation(java.util.List<org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation> annotations, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget widget)
-  ///
-  /// Check if the widget already exists in the annotation list
-  ///@param annotations the list of PDAnnotation fields.
-  ///@param widget the annotation widget.
-  ///@return true if the widget already existed in the annotation list, false if not.
-  bool checkSignatureAnnotation(
-      jni.JniObject annotations, jni.JniObject widget) {
-    final result__ = _checkSignatureAnnotation(
-            reference, annotations.reference, widget.reference) !=
-        0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _prepareVisibleSignature = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_prepareVisibleSignature")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void prepareVisibleSignature(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, org.apache.pdfbox.cos.COSDocument visualSignature)
-  void prepareVisibleSignature(jni.JniObject signatureField,
-      jni.JniObject acroForm, jni.JniObject visualSignature) {
-    final result__ = _prepareVisibleSignature(
-        reference,
-        signatureField.reference,
-        acroForm.reference,
-        visualSignature.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _assignSignatureRectangle = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_assignSignatureRectangle")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void assignSignatureRectangle(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField, org.apache.pdfbox.cos.COSDictionary annotDict)
-  void assignSignatureRectangle(
-      jni.JniObject signatureField, jni.JniObject annotDict) {
-    final result__ = _assignSignatureRectangle(
-        reference, signatureField.reference, annotDict.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _assignAppearanceDictionary = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_assignAppearanceDictionary")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void assignAppearanceDictionary(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField, org.apache.pdfbox.cos.COSDictionary apDict)
-  void assignAppearanceDictionary(
-      jni.JniObject signatureField, jni.JniObject apDict) {
-    final result__ = _assignAppearanceDictionary(
-        reference, signatureField.reference, apDict.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _assignAcroFormDefaultResource = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_assignAcroFormDefaultResource")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void assignAcroFormDefaultResource(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, org.apache.pdfbox.cos.COSDictionary newDict)
-  void assignAcroFormDefaultResource(
-      jni.JniObject acroForm, jni.JniObject newDict) {
-    final result__ = _assignAcroFormDefaultResource(
-        reference, acroForm.reference, newDict.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _prepareNonVisibleSignature = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_prepareNonVisibleSignature")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void prepareNonVisibleSignature(org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField signatureField)
-  void prepareNonVisibleSignature(jni.JniObject signatureField) {
-    final result__ =
-        _prepareNonVisibleSignature(reference, signatureField.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _addSignatureField = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_addSignatureField")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void addSignatureField(java.util.List<org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField> sigFields, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface signatureInterface, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions options)
-  ///
-  /// This will add a list of signature fields to the document.
-  ///@param sigFields are the PDSignatureFields that should be added to the document
-  ///@param signatureInterface is an interface whose implementation provides
-  /// signing capabilities. Can be null if external signing if used.
-  ///@param options signature options
-  ///@throws IOException if there is an error creating required fields
-  ///@deprecated The method is misleading, because only one signature may be
-  /// added in a document. The method will be removed in the future.
-  void addSignatureField(jni.JniObject sigFields,
-      jni.JniObject signatureInterface, jni.JniObject options) {
-    final result__ = _addSignatureField(reference, sigFields.reference,
-        signatureInterface.reference, options.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _removePage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_removePage")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void removePage(org.apache.pdfbox.pdmodel.PDPage page)
-  ///
-  /// Remove the page from the document.
-  ///@param page The page to remove from the document.
-  void removePage(jni.JniObject page) {
-    final result__ = _removePage(reference, page.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _removePage1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_removePage1")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void removePage(int pageNumber)
-  ///
-  /// Remove the page from the document.
-  ///@param pageNumber 0 based index to page number.
-  void removePage1(int pageNumber) {
-    final result__ = _removePage1(reference, pageNumber);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _importPage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_importPage")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.PDPage importPage(org.apache.pdfbox.pdmodel.PDPage page)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will import and copy the contents from another location. Currently the content stream is
-  /// stored in a scratch file. The scratch file is associated with the document. If you are adding
-  /// a page to this document from another document and want to copy the contents to this
-  /// document's scratch file then use this method otherwise just use the \#addPage addPage()
-  /// method.
-  ///
-  /// Unlike \#addPage addPage(), this method creates a new PDPage object. If your page has
-  /// annotations, and if these link to pages not in the target document, then the target document
-  /// might become huge. What you need to do is to delete page references of such annotations. See
-  /// <a href="http://stackoverflow.com/a/35477351/535646">here</a> for how to do this.
-  ///
-  /// Inherited (global) resources are ignored because these can contain resources not needed for
-  /// this page which could bloat your document, see
-  /// <a href="https://issues.apache.org/jira/browse/PDFBOX-28">PDFBOX-28</a> and related issues.
-  /// If you need them, call <code>importedPage.setResources(page.getResources());</code>
-  ///
-  /// This method should only be used to import a page from a loaded document, not from a generated
-  /// document because these can contain unfinished parts, e.g. font subsetting information.
-  ///@param page The page to import.
-  ///@return The page that was imported.
-  ///@throws IOException If there is an error copying the page.
-  jni.JniObject importPage(jni.JniObject page) {
-    final result__ =
-        jni.JniObject.fromRef(_importPage(reference, page.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getDocument = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getDocument")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.cos.COSDocument getDocument()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the low level document.
-  ///@return The document that this layer sits on top of.
-  jni.JniObject getDocument() {
-    final result__ = jni.JniObject.fromRef(_getDocument(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getDocumentInformation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getDocumentInformation")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.PDDocumentInformation getDocumentInformation()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the document info dictionary. If it doesn't exist, an empty document info
-  /// dictionary is created in the document trailer.
-  ///
-  /// In PDF 2.0 this is deprecated except for two entries, /CreationDate and /ModDate. For any other
-  /// document level metadata, a metadata stream should be used instead, see
-  /// PDDocumentCatalog\#getMetadata().
-  ///@return The documents /Info dictionary, never null.
-  PDDocumentInformation getDocumentInformation() {
-    final result__ =
-        PDDocumentInformation.fromRef(_getDocumentInformation(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setDocumentInformation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_setDocumentInformation")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setDocumentInformation(org.apache.pdfbox.pdmodel.PDDocumentInformation info)
-  ///
-  /// This will set the document information for this document.
-  ///
-  /// In PDF 2.0 this is deprecated except for two entries, /CreationDate and /ModDate. For any other
-  /// document level metadata, a metadata stream should be used instead, see
-  /// PDDocumentCatalog\#setMetadata(org.apache.pdfbox.pdmodel.common.PDMetadata) PDDocumentCatalog\#setMetadata(PDMetadata).
-  ///@param info The updated document information.
-  void setDocumentInformation(PDDocumentInformation info) {
-    final result__ = _setDocumentInformation(reference, info.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getDocumentCatalog = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getDocumentCatalog")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.PDDocumentCatalog getDocumentCatalog()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the document CATALOG. This is guaranteed to not return null.
-  ///@return The documents /Root dictionary
-  jni.JniObject getDocumentCatalog() {
-    final result__ = jni.JniObject.fromRef(_getDocumentCatalog(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _isEncrypted =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_pdmodel_PDDocument_isEncrypted")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public boolean isEncrypted()
-  ///
-  /// This will tell if this document is encrypted or not.
-  ///@return true If this document is encrypted.
-  bool isEncrypted() {
-    final result__ = _isEncrypted(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getEncryption = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getEncryption")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.encryption.PDEncryption getEncryption()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the encryption dictionary for this document. This will still return the parameters if the document
-  /// was decrypted. As the encryption architecture in PDF documents is pluggable this returns an abstract class,
-  /// but the only supported subclass at this time is a
-  /// PDStandardEncryption object.
-  ///@return The encryption dictionary(most likely a PDStandardEncryption object)
-  jni.JniObject getEncryption() {
-    final result__ = jni.JniObject.fromRef(_getEncryption(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setEncryptionDictionary = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_setEncryptionDictionary")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setEncryptionDictionary(org.apache.pdfbox.pdmodel.encryption.PDEncryption encryption)
-  ///
-  /// This will set the encryption dictionary for this document.
-  ///@param encryption The encryption dictionary(most likely a PDStandardEncryption object)
-  ///@throws IOException If there is an error determining which security handler to use.
-  void setEncryptionDictionary(jni.JniObject encryption) {
-    final result__ = _setEncryptionDictionary(reference, encryption.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getLastSignatureDictionary = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getLastSignatureDictionary")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature getLastSignatureDictionary()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will return the last signature from the field tree. Note that this may not be the
-  /// last in time when empty signature fields are created first but signed after other fields.
-  ///@return the last signature as <code>PDSignatureField</code>.
-  ///@throws IOException if no document catalog can be found.
-  jni.JniObject getLastSignatureDictionary() {
-    final result__ =
-        jni.JniObject.fromRef(_getLastSignatureDictionary(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getSignatureFields = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getSignatureFields")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.util.List<org.apache.pdfbox.pdmodel.interactive.form.PDSignatureField> getSignatureFields()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Retrieve all signature fields from the document.
-  ///@return a <code>List</code> of <code>PDSignatureField</code>s
-  ///@throws IOException if no document catalog can be found.
-  jni.JniObject getSignatureFields() {
-    final result__ = jni.JniObject.fromRef(_getSignatureFields(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getSignatureDictionaries = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getSignatureDictionaries")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.util.List<org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature> getSignatureDictionaries()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Retrieve all signature dictionaries from the document.
-  ///@return a <code>List</code> of <code>PDSignatureField</code>s
-  ///@throws IOException if no document catalog can be found.
-  jni.JniObject getSignatureDictionaries() {
-    final result__ =
-        jni.JniObject.fromRef(_getSignatureDictionaries(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _registerTrueTypeFontForClosing = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_registerTrueTypeFontForClosing")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void registerTrueTypeFontForClosing(org.apache.fontbox.ttf.TrueTypeFont ttf)
-  ///
-  /// For internal PDFBox use when creating PDF documents: register a TrueTypeFont to make sure it
-  /// is closed when the PDDocument is closed to avoid memory leaks. Users don't have to call this
-  /// method, it is done by the appropriate PDFont classes.
-  ///@param ttf
-  void registerTrueTypeFontForClosing(jni.JniObject ttf) {
-    final result__ = _registerTrueTypeFontForClosing(reference, ttf.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getFontsToSubset = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getFontsToSubset")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: java.util.Set<org.apache.pdfbox.pdmodel.font.PDFont> getFontsToSubset()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the list of fonts which will be subset before the document is saved.
-  jni.JniObject getFontsToSubset() {
-    final result__ = jni.JniObject.fromRef(_getFontsToSubset(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param file file to be loaded
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the file required a non-empty password.
-  ///@throws IOException in case of a file reading or parsing error
-  static PDDocument load(jni.JniObject file) {
-    final result__ = PDDocument.fromRef(_load(file.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load1")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF.
-  ///@param file file to be loaded
-  ///@param memUsageSetting defines how memory is used for buffering PDF streams
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the file required a non-empty password.
-  ///@throws IOException in case of a file reading or parsing error
-  static PDDocument load1(jni.JniObject file, jni.JniObject memUsageSetting) {
-    final result__ =
-        PDDocument.fromRef(_load1(file.reference, memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load2")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param file file to be loaded
-  ///@param password password to be used for decryption
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException in case of a file reading or parsing error
-  static PDDocument load2(jni.JniObject file, jni.JniString password) {
-    final result__ =
-        PDDocument.fromRef(_load2(file.reference, password.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load3")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF.
-  ///@param file file to be loaded
-  ///@param password password to be used for decryption
-  ///@param memUsageSetting defines how memory is used for buffering PDF streams
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException in case of a file reading or parsing error
-  static PDDocument load3(jni.JniObject file, jni.JniString password,
-      jni.JniObject memUsageSetting) {
-    final result__ = PDDocument.fromRef(
-        _load3(file.reference, password.reference, memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load4 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load4")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param file file to be loaded
-  ///@param password password to be used for decryption
-  ///@param keyStore key store to be used for decryption when using public key security
-  ///@param alias alias to be used for decryption when using public key security
-  ///@return loaded document
-  ///@throws IOException in case of a file reading or parsing error
-  static PDDocument load4(jni.JniObject file, jni.JniString password,
-      jni.JniObject keyStore, jni.JniString alias) {
-    final result__ = PDDocument.fromRef(_load4(file.reference,
-        password.reference, keyStore.reference, alias.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load5 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load5")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.File file, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF.
-  ///@param file file to be loaded
-  ///@param password password to be used for decryption
-  ///@param keyStore key store to be used for decryption when using public key security
-  ///@param alias alias to be used for decryption when using public key security
-  ///@param memUsageSetting defines how memory is used for buffering PDF streams
-  ///@return loaded document
-  ///@throws IOException in case of a file reading or parsing error
-  static PDDocument load5(
-      jni.JniObject file,
-      jni.JniString password,
-      jni.JniObject keyStore,
-      jni.JniString alias,
-      jni.JniObject memUsageSetting) {
-    final result__ = PDDocument.fromRef(_load5(
-        file.reference,
-        password.reference,
-        keyStore.reference,
-        alias.reference,
-        memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load6 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load6")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: private static org.apache.pdfbox.pdmodel.PDDocument load(org.apache.pdfbox.io.RandomAccessBufferedFileInputStream raFile, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  static PDDocument load6(
-      jni.JniObject raFile,
-      jni.JniString password,
-      jni.JniObject keyStore,
-      jni.JniString alias,
-      jni.JniObject memUsageSetting) {
-    final result__ = PDDocument.fromRef(_load6(
-        raFile.reference,
-        password.reference,
-        keyStore.reference,
-        alias.reference,
-        memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load7 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load7")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. The given input stream is copied to the memory to enable random access to the
-  /// pdf. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param input stream that contains the document. Don't forget to close it after loading.
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the PDF required a non-empty password.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load7(jni.JniObject input) {
-    final result__ = PDDocument.fromRef(_load7(input.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load8 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load8")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Depending on the memory settings parameter the given input stream is either
-  /// copied to main memory or to a temporary file to enable random access to the pdf.
-  ///@param input stream that contains the document. Don't forget to close it after loading.
-  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the PDF required a non-empty password.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load8(jni.JniObject input, jni.JniObject memUsageSetting) {
-    final result__ =
-        PDDocument.fromRef(_load8(input.reference, memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load9 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load9")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. The given input stream is copied to the memory to enable random access to the
-  /// pdf. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param input stream that contains the document. Don't forget to close it after loading.
-  ///@param password password to be used for decryption
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load9(jni.JniObject input, jni.JniString password) {
-    final result__ =
-        PDDocument.fromRef(_load9(input.reference, password.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load10 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load10")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. The given input stream is copied to the memory to enable random access to the
-  /// pdf. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param input stream that contains the document. Don't forget to close it after loading.
-  ///@param password password to be used for decryption
-  ///@param keyStore key store to be used for decryption when using public key security
-  ///@param alias alias to be used for decryption when using public key security
-  ///@return loaded document
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load10(jni.JniObject input, jni.JniString password,
-      jni.JniObject keyStore, jni.JniString alias) {
-    final result__ = PDDocument.fromRef(_load10(input.reference,
-        password.reference, keyStore.reference, alias.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load11 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load11")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Depending on the memory settings parameter the given input stream is either
-  /// copied to main memory or to a temporary file to enable random access to the pdf.
-  ///@param input stream that contains the document. Don't forget to close it after loading.
-  ///@param password password to be used for decryption
-  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load11(jni.JniObject input, jni.JniString password,
-      jni.JniObject memUsageSetting) {
-    final result__ = PDDocument.fromRef(_load11(
-        input.reference, password.reference, memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load12 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load12")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(java.io.InputStream input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Depending on the memory settings parameter the given input stream is either
-  /// copied to memory or to a temporary file to enable random access to the pdf.
-  ///@param input stream that contains the document. Don't forget to close it after loading.
-  ///@param password password to be used for decryption
-  ///@param keyStore key store to be used for decryption when using public key security
-  ///@param alias alias to be used for decryption when using public key security
-  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load12(
-      jni.JniObject input,
-      jni.JniString password,
-      jni.JniObject keyStore,
-      jni.JniString alias,
-      jni.JniObject memUsageSetting) {
-    final result__ = PDDocument.fromRef(_load12(
-        input.reference,
-        password.reference,
-        keyStore.reference,
-        alias.reference,
-        memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load13 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load13")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param input byte array that contains the document.
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the PDF required a non-empty password.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load13(jni.JniObject input) {
-    final result__ = PDDocument.fromRef(_load13(input.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load14 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load14")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param input byte array that contains the document.
-  ///@param password password to be used for decryption
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load14(jni.JniObject input, jni.JniString password) {
-    final result__ =
-        PDDocument.fromRef(_load14(input.reference, password.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load15 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load15")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF. Unrestricted main memory will be used for buffering PDF streams.
-  ///@param input byte array that contains the document.
-  ///@param password password to be used for decryption
-  ///@param keyStore key store to be used for decryption when using public key security
-  ///@param alias alias to be used for decryption when using public key security
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load15(jni.JniObject input, jni.JniString password,
-      jni.JniObject keyStore, jni.JniString alias) {
-    final result__ = PDDocument.fromRef(_load15(input.reference,
-        password.reference, keyStore.reference, alias.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _load16 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_load16")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: static public org.apache.pdfbox.pdmodel.PDDocument load(byte[] input, java.lang.String password, java.io.InputStream keyStore, java.lang.String alias, org.apache.pdfbox.io.MemoryUsageSetting memUsageSetting)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Parses a PDF.
-  ///@param input byte array that contains the document.
-  ///@param password password to be used for decryption
-  ///@param keyStore key store to be used for decryption when using public key security
-  ///@param alias alias to be used for decryption when using public key security
-  ///@param memUsageSetting defines how memory is used for buffering input stream and PDF streams
-  ///@return loaded document
-  ///@throws InvalidPasswordException If the password is incorrect.
-  ///@throws IOException In case of a reading or parsing error.
-  static PDDocument load16(
-      jni.JniObject input,
-      jni.JniString password,
-      jni.JniObject keyStore,
-      jni.JniString alias,
-      jni.JniObject memUsageSetting) {
-    final result__ = PDDocument.fromRef(_load16(
-        input.reference,
-        password.reference,
-        keyStore.reference,
-        alias.reference,
-        memUsageSetting.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _save = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_save")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void save(java.lang.String fileName)
-  ///
-  /// Save the document to a file.
-  ///
-  /// If encryption has been activated (with
-  /// \#protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy) protect(ProtectionPolicy)),
-  /// do not use the document after saving because the contents are now encrypted.
-  ///@param fileName The file to save as.
-  ///@throws IOException if the output could not be written
-  void save(jni.JniString fileName) {
-    final result__ = _save(reference, fileName.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _save1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_save1")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void save(java.io.File file)
-  ///
-  /// Save the document to a file.
-  ///
-  /// If encryption has been activated (with
-  /// \#protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy) protect(ProtectionPolicy)),
-  /// do not use the document after saving because the contents are now encrypted.
-  ///@param file The file to save as.
-  ///@throws IOException if the output could not be written
-  void save1(jni.JniObject file) {
-    final result__ = _save1(reference, file.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _save2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_save2")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void save(java.io.OutputStream output)
-  ///
-  /// This will save the document to an output stream.
-  ///
-  /// If encryption has been activated (with
-  /// \#protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy) protect(ProtectionPolicy)),
-  /// do not use the document after saving because the contents are now encrypted.
-  ///@param output The stream to write to. It will be closed when done. It is recommended to wrap
-  /// it in a java.io.BufferedOutputStream, unless it is already buffered.
-  ///@throws IOException if the output could not be written
-  void save2(jni.JniObject output) {
-    final result__ = _save2(reference, output.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _saveIncremental = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_saveIncremental")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void saveIncremental(java.io.OutputStream output)
-  ///
-  /// Save the PDF as an incremental update. This is only possible if the PDF was loaded from a
-  /// file or a stream, not if the document was created in PDFBox itself. There must be a path of
-  /// objects that have COSUpdateInfo\#isNeedToBeUpdated() set, starting from the document
-  /// catalog. For signatures this is taken care by PDFBox itself.
-  ///
-  /// Other usages of this method are for experienced users only. You will usually never need it.
-  /// It is useful only if you are required to keep the current revision and append the changes. A
-  /// typical use case is changing a signed file without invalidating the signature.
-  ///@param output stream to write to. It will be closed when done. It
-  /// <i>__must never__</i> point to the source file or that one will be
-  /// harmed!
-  ///@throws IOException if the output could not be written
-  ///@throws IllegalStateException if the document was not loaded from a file or a stream.
-  void saveIncremental(jni.JniObject output) {
-    final result__ = _saveIncremental(reference, output.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _saveIncremental1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_saveIncremental1")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void saveIncremental(java.io.OutputStream output, java.util.Set<org.apache.pdfbox.cos.COSDictionary> objectsToWrite)
-  ///
-  /// Save the PDF as an incremental update. This is only possible if the PDF was loaded from a
-  /// file or a stream, not if the document was created in PDFBox itself. This allows to include
-  /// objects even if there is no path of objects that have
-  /// COSUpdateInfo\#isNeedToBeUpdated() set so the incremental update gets smaller. Only
-  /// dictionaries are supported; if you need to update other objects classes, then add their
-  /// parent dictionary.
-  ///
-  /// This method is for experienced users only. You will usually never need it. It is useful only
-  /// if you are required to keep the current revision and append the changes. A typical use case
-  /// is changing a signed file without invalidating the signature. To know which objects are
-  /// getting changed, you need to have some understanding of the PDF specification, and look at
-  /// the saved file with an editor to verify that you are updating the correct objects. You should
-  /// also inspect the page and document structures of the file with PDFDebugger.
-  ///@param output stream to write to. It will be closed when done. It
-  /// <i>__must never__</i> point to the source file or that one will be harmed!
-  ///@param objectsToWrite objects that __must__ be part of the incremental saving.
-  ///@throws IOException if the output could not be written
-  ///@throws IllegalStateException if the document was not loaded from a file or a stream.
-  void saveIncremental1(jni.JniObject output, jni.JniObject objectsToWrite) {
-    final result__ = _saveIncremental1(
-        reference, output.reference, objectsToWrite.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _saveIncrementalForExternalSigning = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_saveIncrementalForExternalSigning")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport saveIncrementalForExternalSigning(java.io.OutputStream output)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  ///
-  /// __(This is a new feature for 2.0.3. The API for external signing might change based on feedback after release!)__
-  ///
-  /// Save PDF incrementally without closing for external signature creation scenario. The general
-  /// sequence is:
-  /// <pre>
-  ///    PDDocument pdDocument = ...;
-  ///    OutputStream outputStream = ...;
-  ///    SignatureOptions signatureOptions = ...; // options to specify fine tuned signature options or null for defaults
-  ///    PDSignature pdSignature = ...;
-  ///
-  ///    // add signature parameters to be used when creating signature dictionary
-  ///    pdDocument.addSignature(pdSignature, signatureOptions);
-  ///    // prepare PDF for signing and obtain helper class to be used
-  ///    ExternalSigningSupport externalSigningSupport = pdDocument.saveIncrementalForExternalSigning(outputStream);
-  ///    // get data to be signed
-  ///    InputStream dataToBeSigned = externalSigningSupport.getContent();
-  ///    // invoke signature service
-  ///    byte[] signature = sign(dataToBeSigned);
-  ///    // set resulted CMS signature
-  ///    externalSigningSupport.setSignature(signature);
-  ///
-  ///    // last step is to close the document
-  ///    pdDocument.close();
-  /// </pre>
-  ///
-  /// Note that after calling this method, only {@code close()} method may invoked for
-  /// {@code PDDocument} instance and only AFTER ExternalSigningSupport instance is used.
-  ///
-  ///
-  ///@param output stream to write the final PDF. It will be closed when the
-  /// document is closed. It <i>__must never__</i> point to the source file
-  /// or that one will be harmed!
-  ///@return instance to be used for external signing and setting CMS signature
-  ///@throws IOException if the output could not be written
-  ///@throws IllegalStateException if the document was not loaded from a file or a stream or
-  /// signature options were not set.
-  jni.JniObject saveIncrementalForExternalSigning(jni.JniObject output) {
-    final result__ = jni.JniObject.fromRef(
-        _saveIncrementalForExternalSigning(reference, output.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getPage = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                  ffi.Int32)>>("org_apache_pdfbox_pdmodel_PDDocument_getPage")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.PDPage getPage(int pageIndex)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the page at the given 0-based index.
-  ///
-  /// This method is too slow to get all the pages from a large PDF document
-  /// (1000 pages or more). For such documents, use the iterator of
-  /// PDDocument\#getPages() instead.
-  ///@param pageIndex the 0-based page index
-  ///@return the page at the given index.
-  jni.JniObject getPage(int pageIndex) {
-    final result__ = jni.JniObject.fromRef(_getPage(reference, pageIndex));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getPages = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getPages")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.PDPageTree getPages()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the page tree.
-  ///@return the page tree
-  jni.JniObject getPages() {
-    final result__ = jni.JniObject.fromRef(_getPages(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getNumberOfPages =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_pdmodel_PDDocument_getNumberOfPages")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public int getNumberOfPages()
-  ///
-  /// This will return the total page count of the PDF document.
-  ///@return The total number of pages in the PDF document.
-  int getNumberOfPages() {
-    final result__ = _getNumberOfPages(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _close =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_pdmodel_PDDocument_close")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void close()
-  ///
-  /// This will close the underlying COSDocument object.
-  ///@throws IOException If there is an error releasing resources.
-  void close() {
-    final result__ = _close(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _protect = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_protect")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void protect(org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy policy)
-  ///
-  /// Protects the document with a protection policy. The document content will be really
-  /// encrypted when it will be saved. This method only marks the document for encryption. It also
-  /// calls \#setAllSecurityToBeRemoved(boolean) with a false argument if it was set to true
-  /// previously and logs a warning.
-  ///
-  /// Do not use the document after saving, because the structures are encrypted.
-  ///@see org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy
-  ///@see org.apache.pdfbox.pdmodel.encryption.PublicKeyProtectionPolicy
-  ///@param policy The protection policy.
-  ///@throws IOException if there isn't any suitable security handler.
-  void protect(jni.JniObject policy) {
-    final result__ = _protect(reference, policy.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getCurrentAccessPermission = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getCurrentAccessPermission")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.encryption.AccessPermission getCurrentAccessPermission()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the access permissions granted when the document was decrypted. If the document was not decrypted this
-  /// method returns the access permission for a document owner (ie can do everything). The returned object is in read
-  /// only mode so that permissions cannot be changed. Methods providing access to content should rely on this object
-  /// to verify if the current user is allowed to proceed.
-  ///@return the access permissions for the current user on the document.
-  jni.JniObject getCurrentAccessPermission() {
-    final result__ =
-        jni.JniObject.fromRef(_getCurrentAccessPermission(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _isAllSecurityToBeRemoved =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_pdmodel_PDDocument_isAllSecurityToBeRemoved")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public boolean isAllSecurityToBeRemoved()
-  ///
-  /// Indicates if all security is removed or not when writing the pdf.
-  ///@return returns true if all security shall be removed otherwise false
-  bool isAllSecurityToBeRemoved() {
-    final result__ = _isAllSecurityToBeRemoved(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setAllSecurityToBeRemoved = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_setAllSecurityToBeRemoved")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void setAllSecurityToBeRemoved(boolean removeAllSecurity)
-  ///
-  /// Activates/Deactivates the removal of all security when writing the pdf.
-  ///@param removeAllSecurity remove all security if set to true
-  void setAllSecurityToBeRemoved(bool removeAllSecurity) {
-    final result__ =
-        _setAllSecurityToBeRemoved(reference, removeAllSecurity ? 1 : 0);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getDocumentId = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getDocumentId")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.Long getDocumentId()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Provides the document ID.
-  ///@return the document ID
-  jni.JniObject getDocumentId() {
-    final result__ = jni.JniObject.fromRef(_getDocumentId(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setDocumentId = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_setDocumentId")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setDocumentId(java.lang.Long docId)
-  ///
-  /// Sets the document ID to the given value.
-  ///@param docId the new document ID
-  void setDocumentId(jni.JniObject docId) {
-    final result__ = _setDocumentId(reference, docId.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getVersion =
-      jniLookup<ffi.NativeFunction<ffi.Float Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_pdmodel_PDDocument_getVersion")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public float getVersion()
-  ///
-  /// Returns the PDF specification version this document conforms to.
-  ///@return the PDF version (e.g. 1.4f)
-  double getVersion() {
-    final result__ = _getVersion(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setVersion = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_setVersion")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: public void setVersion(float newVersion)
-  ///
-  /// Sets the PDF specification version for this document.
-  ///@param newVersion the new PDF version (e.g. 1.4f)
-  void setVersion(double newVersion) {
-    final result__ = _setVersion(reference, newVersion);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getResourceCache = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_getResourceCache")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.ResourceCache getResourceCache()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the resource cache associated with this document, or null if there is none.
-  ///@return the resource cache or null.
-  jni.JniObject getResourceCache() {
-    final result__ = jni.JniObject.fromRef(_getResourceCache(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setResourceCache = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocument_setResourceCache")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setResourceCache(org.apache.pdfbox.pdmodel.ResourceCache resourceCache)
-  ///
-  /// Sets the resource cache associated with this document.
-  ///@param resourceCache A resource cache, or null.
-  void setResourceCache(jni.JniObject resourceCache) {
-    final result__ = _setResourceCache(reference, resourceCache.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-}
-
-/// from: org.apache.pdfbox.pdmodel.PDDocumentInformation
-///
-/// This is the document metadata.  Each getXXX method will return the entry if
-/// it exists or null if it does not exist.  If you pass in null for the setXXX
-/// method then it will clear the value.
-///@author Ben Litchfield
-///@author Gerardo Ortiz
-class PDDocumentInformation extends jni.JniObject {
-  PDDocumentInformation.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
-
-  static final _get_info = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_pdmodel_PDDocumentInformation_info")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private final org.apache.pdfbox.cos.COSDictionary info
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get info => jni.JniObject.fromRef(_get_info(reference));
-
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: public void <init>()
-  ///
-  /// Default Constructor.
-  PDDocumentInformation() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _ctor1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor1")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void <init>(org.apache.pdfbox.cos.COSDictionary dic)
-  ///
-  /// Constructor that is used for a preexisting dictionary.
-  ///@param dic The underlying dictionary.
-  PDDocumentInformation.ctor1(jni.JniObject dic)
-      : super.fromRef(_ctor1(dic.reference)) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _getCOSObject = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getCOSObject")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.cos.COSDictionary getCOSObject()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the underlying dictionary that this object wraps.
-  ///@return The underlying info dictionary.
-  jni.JniObject getCOSObject() {
-    final result__ = jni.JniObject.fromRef(_getCOSObject(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getPropertyStringValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getPropertyStringValue")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.Object getPropertyStringValue(java.lang.String propertyKey)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Return the properties String value.
-  ///
-  /// Allows to retrieve the
-  /// low level date for validation purposes.
-  ///
-  ///
-  ///@param propertyKey the dictionaries key
-  ///@return the properties value
-  jni.JniObject getPropertyStringValue(jni.JniString propertyKey) {
-    final result__ = jni.JniObject.fromRef(
-        _getPropertyStringValue(reference, propertyKey.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getTitle = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getTitle")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getTitle()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the title of the document.  This will return null if no title exists.
-  ///@return The title of the document.
-  jni.JniString getTitle() {
-    final result__ = jni.JniString.fromRef(_getTitle(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setTitle = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setTitle")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setTitle(java.lang.String title)
-  ///
-  /// This will set the title of the document.
-  ///@param title The new title for the document.
-  void setTitle(jni.JniString title) {
-    final result__ = _setTitle(reference, title.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getAuthor = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getAuthor")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getAuthor()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the author of the document.  This will return null if no author exists.
-  ///@return The author of the document.
-  jni.JniString getAuthor() {
-    final result__ = jni.JniString.fromRef(_getAuthor(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setAuthor = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setAuthor")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setAuthor(java.lang.String author)
-  ///
-  /// This will set the author of the document.
-  ///@param author The new author for the document.
-  void setAuthor(jni.JniString author) {
-    final result__ = _setAuthor(reference, author.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getSubject = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getSubject")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getSubject()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the subject of the document.  This will return null if no subject exists.
-  ///@return The subject of the document.
-  jni.JniString getSubject() {
-    final result__ = jni.JniString.fromRef(_getSubject(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setSubject = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setSubject")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setSubject(java.lang.String subject)
-  ///
-  /// This will set the subject of the document.
-  ///@param subject The new subject for the document.
-  void setSubject(jni.JniString subject) {
-    final result__ = _setSubject(reference, subject.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getKeywords = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getKeywords")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getKeywords()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the keywords of the document.  This will return null if no keywords exists.
-  ///@return The keywords of the document.
-  jni.JniString getKeywords() {
-    final result__ = jni.JniString.fromRef(_getKeywords(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setKeywords = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setKeywords")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setKeywords(java.lang.String keywords)
-  ///
-  /// This will set the keywords of the document.
-  ///@param keywords The new keywords for the document.
-  void setKeywords(jni.JniString keywords) {
-    final result__ = _setKeywords(reference, keywords.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getCreator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreator")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getCreator()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the creator of the document.  This will return null if no creator exists.
-  ///@return The creator of the document.
-  jni.JniString getCreator() {
-    final result__ = jni.JniString.fromRef(_getCreator(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setCreator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreator")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setCreator(java.lang.String creator)
-  ///
-  /// This will set the creator of the document.
-  ///@param creator The new creator for the document.
-  void setCreator(jni.JniString creator) {
-    final result__ = _setCreator(reference, creator.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getProducer = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getProducer")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getProducer()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the producer of the document.  This will return null if no producer exists.
-  ///@return The producer of the document.
-  jni.JniString getProducer() {
-    final result__ = jni.JniString.fromRef(_getProducer(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setProducer = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setProducer")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setProducer(java.lang.String producer)
-  ///
-  /// This will set the producer of the document.
-  ///@param producer The new producer for the document.
-  void setProducer(jni.JniString producer) {
-    final result__ = _setProducer(reference, producer.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getCreationDate = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreationDate")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.util.Calendar getCreationDate()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the creation date of the document.  This will return null if no creation date exists.
-  ///@return The creation date of the document.
-  jni.JniObject getCreationDate() {
-    final result__ = jni.JniObject.fromRef(_getCreationDate(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setCreationDate = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreationDate")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setCreationDate(java.util.Calendar date)
-  ///
-  /// This will set the creation date of the document.
-  ///@param date The new creation date for the document.
-  void setCreationDate(jni.JniObject date) {
-    final result__ = _setCreationDate(reference, date.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getModificationDate = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getModificationDate")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.util.Calendar getModificationDate()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the modification date of the document.  This will return null if no modification date exists.
-  ///@return The modification date of the document.
-  jni.JniObject getModificationDate() {
-    final result__ = jni.JniObject.fromRef(_getModificationDate(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setModificationDate = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setModificationDate")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setModificationDate(java.util.Calendar date)
-  ///
-  /// This will set the modification date of the document.
-  ///@param date The new modification date for the document.
-  void setModificationDate(jni.JniObject date) {
-    final result__ = _setModificationDate(reference, date.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getTrapped = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getTrapped")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getTrapped()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the trapped value for the document.
-  /// This will return null if one is not found.
-  ///@return The trapped value for the document.
-  jni.JniString getTrapped() {
-    final result__ = jni.JniString.fromRef(_getTrapped(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getMetadataKeys = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getMetadataKeys")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.util.Set<java.lang.String> getMetadataKeys()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the keys of all metadata information fields for the document.
-  ///@return all metadata key strings.
-  ///@since Apache PDFBox 1.3.0
-  jni.JniObject getMetadataKeys() {
-    final result__ = jni.JniObject.fromRef(_getMetadataKeys(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getCustomMetadataValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_getCustomMetadataValue")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getCustomMetadataValue(java.lang.String fieldName)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the value of a custom metadata information field for the document.
-  ///  This will return null if one is not found.
-  ///@param fieldName Name of custom metadata field from pdf document.
-  ///@return String Value of metadata field
-  jni.JniString getCustomMetadataValue(jni.JniString fieldName) {
-    final result__ = jni.JniString.fromRef(
-        _getCustomMetadataValue(reference, fieldName.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setCustomMetadataValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setCustomMetadataValue")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setCustomMetadataValue(java.lang.String fieldName, java.lang.String fieldValue)
-  ///
-  /// Set the custom metadata value.
-  ///@param fieldName The name of the custom metadata field.
-  ///@param fieldValue The value to the custom metadata field.
-  void setCustomMetadataValue(
-      jni.JniString fieldName, jni.JniString fieldValue) {
-    final result__ = _setCustomMetadataValue(
-        reference, fieldName.reference, fieldValue.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setTrapped = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_pdmodel_PDDocumentInformation_setTrapped")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setTrapped(java.lang.String value)
-  ///
-  /// This will set the trapped of the document.  This will be
-  /// 'True', 'False', or 'Unknown'.
-  ///@param value The new trapped value for the document.
-  ///@throws IllegalArgumentException if the parameter is invalid.
-  void setTrapped(jni.JniString value) {
-    final result__ = _setTrapped(reference, value.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-}
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/third_party/org/apache/pdfbox/text.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/third_party/org/apache/pdfbox/text.dart
deleted file mode 100644
index ca4f36c..0000000
--- a/pkgs/jnigen/example/pdfbox_plugin/lib/third_party/org/apache/pdfbox/text.dart
+++ /dev/null
@@ -1,2523 +0,0 @@
-// Generated from Apache PDFBox library which is licensed under the Apache License 2.0.
-// The following copyright from the original authors applies.
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements.  See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License.  You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Autogenerated by jnigen. DO NOT EDIT!
-
-// ignore_for_file: camel_case_types
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
-// ignore_for_file: annotate_overrides
-// ignore_for_file: no_leading_underscores_for_local_identifiers
-// ignore_for_file: unused_element
-
-import "dart:ffi" as ffi;
-import "package:jni/jni.dart" as jni;
-
-import "../pdfbox/pdmodel.dart" as pdmodel_;
-import "../../../_init.dart" show jniLookup;
-
-/// from: org.apache.pdfbox.text.PDFTextStripper
-///
-/// This class will take a pdf document and strip out all of the text and ignore the formatting and such. Please note; it
-/// is up to clients of this class to verify that a specific user has the correct permissions to extract text from the
-/// PDF document.
-///
-/// The basic flow of this process is that we get a document and use a series of processXXX() functions that work on
-/// smaller and smaller chunks of the page. Eventually, we fully process each page and then print it.
-///@author Ben Litchfield
-class PDFTextStripper extends jni.JniObject {
-  PDFTextStripper.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
-
-  static final _get_defaultIndentThreshold = jniLookup<
-              ffi.NativeFunction<ffi.Float Function()>>(
-          "get_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold")
-      .asFunction<double Function()>();
-
-  /// from: private static float defaultIndentThreshold
-  static double get defaultIndentThreshold => _get_defaultIndentThreshold();
-  static final _set_defaultIndentThreshold = jniLookup<
-              ffi.NativeFunction<ffi.Void Function(ffi.Float)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold")
-      .asFunction<void Function(double)>();
-
-  /// from: private static float defaultIndentThreshold
-  static set defaultIndentThreshold(double value) =>
-      _set_defaultIndentThreshold(value);
-
-  static final _get_defaultDropThreshold =
-      jniLookup<ffi.NativeFunction<ffi.Float Function()>>(
-              "get_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold")
-          .asFunction<double Function()>();
-
-  /// from: private static float defaultDropThreshold
-  static double get defaultDropThreshold => _get_defaultDropThreshold();
-  static final _set_defaultDropThreshold =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Float)>>(
-              "set_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold")
-          .asFunction<void Function(double)>();
-
-  /// from: private static float defaultDropThreshold
-  static set defaultDropThreshold(double value) =>
-      _set_defaultDropThreshold(value);
-
-  static final _get_LOG =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "get_org_apache_pdfbox_text_PDFTextStripper_LOG")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: private static final org.apache.commons.logging.Log LOG
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  static jni.JniObject get LOG => jni.JniObject.fromRef(_get_LOG());
-
-  static final _get_LINE_SEPARATOR = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_LINE_SEPARATOR")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: protected final java.lang.String LINE_SEPARATOR
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// The platform's line separator.
-  jni.JniString get LINE_SEPARATOR =>
-      jni.JniString.fromRef(_get_LINE_SEPARATOR(reference));
-
-  static final _get_lineSeparator = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_lineSeparator")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String lineSeparator
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get lineSeparator =>
-      jni.JniString.fromRef(_get_lineSeparator(reference));
-  static final _set_lineSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_lineSeparator")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String lineSeparator
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set lineSeparator(jni.JniString value) =>
-      _set_lineSeparator(reference, value.reference);
-
-  static final _get_wordSeparator = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_wordSeparator")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String wordSeparator
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get wordSeparator =>
-      jni.JniString.fromRef(_get_wordSeparator(reference));
-  static final _set_wordSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_wordSeparator")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String wordSeparator
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set wordSeparator(jni.JniString value) =>
-      _set_wordSeparator(reference, value.reference);
-
-  static final _get_paragraphStart = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_paragraphStart")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String paragraphStart
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get paragraphStart =>
-      jni.JniString.fromRef(_get_paragraphStart(reference));
-  static final _set_paragraphStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_paragraphStart")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String paragraphStart
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set paragraphStart(jni.JniString value) =>
-      _set_paragraphStart(reference, value.reference);
-
-  static final _get_paragraphEnd = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String paragraphEnd
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get paragraphEnd =>
-      jni.JniString.fromRef(_get_paragraphEnd(reference));
-  static final _set_paragraphEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String paragraphEnd
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set paragraphEnd(jni.JniString value) =>
-      _set_paragraphEnd(reference, value.reference);
-
-  static final _get_pageStart = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_pageStart")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String pageStart
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get pageStart =>
-      jni.JniString.fromRef(_get_pageStart(reference));
-  static final _set_pageStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_pageStart")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String pageStart
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set pageStart(jni.JniString value) =>
-      _set_pageStart(reference, value.reference);
-
-  static final _get_pageEnd = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_pageEnd")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String pageEnd
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get pageEnd => jni.JniString.fromRef(_get_pageEnd(reference));
-  static final _set_pageEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_pageEnd")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String pageEnd
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set pageEnd(jni.JniString value) => _set_pageEnd(reference, value.reference);
-
-  static final _get_articleStart = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_articleStart")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String articleStart
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get articleStart =>
-      jni.JniString.fromRef(_get_articleStart(reference));
-  static final _set_articleStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_articleStart")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String articleStart
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set articleStart(jni.JniString value) =>
-      _set_articleStart(reference, value.reference);
-
-  static final _get_articleEnd = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_articleEnd")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.lang.String articleEnd
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString get articleEnd =>
-      jni.JniString.fromRef(_get_articleEnd(reference));
-  static final _set_articleEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_articleEnd")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String articleEnd
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set articleEnd(jni.JniString value) =>
-      _set_articleEnd(reference, value.reference);
-
-  static final _get_currentPageNo = jniLookup<
-          ffi.NativeFunction<
-              ffi.Int32 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_currentPageNo")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private int currentPageNo
-  int get currentPageNo => _get_currentPageNo(reference);
-  static final _set_currentPageNo = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_currentPageNo")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private int currentPageNo
-  set currentPageNo(int value) => _set_currentPageNo(reference, value);
-
-  static final _get_startPage = jniLookup<
-          ffi.NativeFunction<
-              ffi.Int32 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_startPage")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private int startPage
-  int get startPage => _get_startPage(reference);
-  static final _set_startPage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_startPage")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private int startPage
-  set startPage(int value) => _set_startPage(reference, value);
-
-  static final _get_endPage = jniLookup<
-          ffi.NativeFunction<
-              ffi.Int32 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_endPage")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private int endPage
-  int get endPage => _get_endPage(reference);
-  static final _set_endPage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_endPage")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private int endPage
-  set endPage(int value) => _set_endPage(reference, value);
-
-  static final _get_startBookmark = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_startBookmark")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem startBookmark
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get startBookmark =>
-      jni.JniObject.fromRef(_get_startBookmark(reference));
-  static final _set_startBookmark = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_startBookmark")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem startBookmark
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set startBookmark(jni.JniObject value) =>
-      _set_startBookmark(reference, value.reference);
-
-  static final _get_startBookmarkPageNumber = jniLookup<
-          ffi.NativeFunction<
-              ffi.Int32 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private int startBookmarkPageNumber
-  int get startBookmarkPageNumber => _get_startBookmarkPageNumber(reference);
-  static final _set_startBookmarkPageNumber = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private int startBookmarkPageNumber
-  set startBookmarkPageNumber(int value) =>
-      _set_startBookmarkPageNumber(reference, value);
-
-  static final _get_endBookmarkPageNumber = jniLookup<
-          ffi.NativeFunction<
-              ffi.Int32 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private int endBookmarkPageNumber
-  int get endBookmarkPageNumber => _get_endBookmarkPageNumber(reference);
-  static final _set_endBookmarkPageNumber = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private int endBookmarkPageNumber
-  set endBookmarkPageNumber(int value) =>
-      _set_endBookmarkPageNumber(reference, value);
-
-  static final _get_endBookmark = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_endBookmark")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem endBookmark
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get endBookmark =>
-      jni.JniObject.fromRef(_get_endBookmark(reference));
-  static final _set_endBookmark = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_endBookmark")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem endBookmark
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set endBookmark(jni.JniObject value) =>
-      _set_endBookmark(reference, value.reference);
-
-  static final _get_suppressDuplicateOverlappingText = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private boolean suppressDuplicateOverlappingText
-  bool get suppressDuplicateOverlappingText =>
-      _get_suppressDuplicateOverlappingText(reference) != 0;
-  static final _set_suppressDuplicateOverlappingText = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private boolean suppressDuplicateOverlappingText
-  set suppressDuplicateOverlappingText(bool value) =>
-      _set_suppressDuplicateOverlappingText(reference, value ? 1 : 0);
-
-  static final _get_shouldSeparateByBeads = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private boolean shouldSeparateByBeads
-  bool get shouldSeparateByBeads => _get_shouldSeparateByBeads(reference) != 0;
-  static final _set_shouldSeparateByBeads = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private boolean shouldSeparateByBeads
-  set shouldSeparateByBeads(bool value) =>
-      _set_shouldSeparateByBeads(reference, value ? 1 : 0);
-
-  static final _get_sortByPosition = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_sortByPosition")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private boolean sortByPosition
-  bool get sortByPosition => _get_sortByPosition(reference) != 0;
-  static final _set_sortByPosition = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_sortByPosition")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private boolean sortByPosition
-  set sortByPosition(bool value) =>
-      _set_sortByPosition(reference, value ? 1 : 0);
-
-  static final _get_addMoreFormatting = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private boolean addMoreFormatting
-  bool get addMoreFormatting => _get_addMoreFormatting(reference) != 0;
-  static final _set_addMoreFormatting = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private boolean addMoreFormatting
-  set addMoreFormatting(bool value) =>
-      _set_addMoreFormatting(reference, value ? 1 : 0);
-
-  static final _get_indentThreshold = jniLookup<
-          ffi.NativeFunction<
-              ffi.Float Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_indentThreshold")
-      .asFunction<
-          double Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private float indentThreshold
-  double get indentThreshold => _get_indentThreshold(reference);
-  static final _set_indentThreshold = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_indentThreshold")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: private float indentThreshold
-  set indentThreshold(double value) => _set_indentThreshold(reference, value);
-
-  static final _get_dropThreshold = jniLookup<
-          ffi.NativeFunction<
-              ffi.Float Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_dropThreshold")
-      .asFunction<
-          double Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private float dropThreshold
-  double get dropThreshold => _get_dropThreshold(reference);
-  static final _set_dropThreshold = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_dropThreshold")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: private float dropThreshold
-  set dropThreshold(double value) => _set_dropThreshold(reference, value);
-
-  static final _get_spacingTolerance = jniLookup<
-          ffi.NativeFunction<
-              ffi.Float Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance")
-      .asFunction<
-          double Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private float spacingTolerance
-  double get spacingTolerance => _get_spacingTolerance(reference);
-  static final _set_spacingTolerance = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: private float spacingTolerance
-  set spacingTolerance(double value) => _set_spacingTolerance(reference, value);
-
-  static final _get_averageCharTolerance = jniLookup<
-          ffi.NativeFunction<
-              ffi.Float Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance")
-      .asFunction<
-          double Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private float averageCharTolerance
-  double get averageCharTolerance => _get_averageCharTolerance(reference);
-  static final _set_averageCharTolerance = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: private float averageCharTolerance
-  set averageCharTolerance(double value) =>
-      _set_averageCharTolerance(reference, value);
-
-  static final _get_beadRectangles = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_beadRectangles")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.util.List<org.apache.pdfbox.pdmodel.common.PDRectangle> beadRectangles
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get beadRectangles =>
-      jni.JniObject.fromRef(_get_beadRectangles(reference));
-  static final _set_beadRectangles = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_beadRectangles")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.util.List<org.apache.pdfbox.pdmodel.common.PDRectangle> beadRectangles
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set beadRectangles(jni.JniObject value) =>
-      _set_beadRectangles(reference, value.reference);
-
-  static final _get_charactersByArticle = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: protected java.util.ArrayList<java.util.List<org.apache.pdfbox.text.TextPosition>> charactersByArticle
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// The charactersByArticle is used to extract text by article divisions. For example a PDF that has two columns like
-  /// a newspaper, we want to extract the first column and then the second column. In this example the PDF would have 2
-  /// beads(or articles), one for each column. The size of the charactersByArticle would be 5, because not all text on
-  /// the screen will fall into one of the articles. The five divisions are shown below
-  ///
-  /// Text before first article
-  /// first article text
-  /// text between first article and second article
-  /// second article text
-  /// text after second article
-  ///
-  /// Most PDFs won't have any beads, so charactersByArticle will contain a single entry.
-  jni.JniObject get charactersByArticle =>
-      jni.JniObject.fromRef(_get_charactersByArticle(reference));
-  static final _set_charactersByArticle = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected java.util.ArrayList<java.util.List<org.apache.pdfbox.text.TextPosition>> charactersByArticle
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// The charactersByArticle is used to extract text by article divisions. For example a PDF that has two columns like
-  /// a newspaper, we want to extract the first column and then the second column. In this example the PDF would have 2
-  /// beads(or articles), one for each column. The size of the charactersByArticle would be 5, because not all text on
-  /// the screen will fall into one of the articles. The five divisions are shown below
-  ///
-  /// Text before first article
-  /// first article text
-  /// text between first article and second article
-  /// second article text
-  /// text after second article
-  ///
-  /// Most PDFs won't have any beads, so charactersByArticle will contain a single entry.
-  set charactersByArticle(jni.JniObject value) =>
-      _set_charactersByArticle(reference, value.reference);
-
-  static final _get_characterListMapping = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_characterListMapping")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.util.Map<java.lang.String,java.util.TreeMap<java.lang.Float,java.util.TreeSet<java.lang.Float>>> characterListMapping
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get characterListMapping =>
-      jni.JniObject.fromRef(_get_characterListMapping(reference));
-  static final _set_characterListMapping = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_characterListMapping")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.util.Map<java.lang.String,java.util.TreeMap<java.lang.Float,java.util.TreeSet<java.lang.Float>>> characterListMapping
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set characterListMapping(jni.JniObject value) =>
-      _set_characterListMapping(reference, value.reference);
-
-  static final _get_document = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_document")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: protected org.apache.pdfbox.pdmodel.PDDocument document
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  pdmodel_.PDDocument get document =>
-      pdmodel_.PDDocument.fromRef(_get_document(reference));
-  static final _set_document = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_document")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected org.apache.pdfbox.pdmodel.PDDocument document
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set document(pdmodel_.PDDocument value) =>
-      _set_document(reference, value.reference);
-
-  static final _get_output = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_output")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: protected java.io.Writer output
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get output => jni.JniObject.fromRef(_get_output(reference));
-  static final _set_output = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_output")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected java.io.Writer output
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set output(jni.JniObject value) => _set_output(reference, value.reference);
-
-  static final _get_inParagraph = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_inParagraph")
-      .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private boolean inParagraph
-  ///
-  /// True if we started a paragraph but haven't ended it yet.
-  bool get inParagraph => _get_inParagraph(reference) != 0;
-  static final _set_inParagraph = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_inParagraph")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: private boolean inParagraph
-  ///
-  /// True if we started a paragraph but haven't ended it yet.
-  set inParagraph(bool value) => _set_inParagraph(reference, value ? 1 : 0);
-
-  /// from: private static final float END_OF_LAST_TEXT_X_RESET_VALUE
-  static const END_OF_LAST_TEXT_X_RESET_VALUE = -1.0;
-
-  /// from: private static final float MAX_Y_FOR_LINE_RESET_VALUE
-  static const MAX_Y_FOR_LINE_RESET_VALUE = -3.4028235e+38;
-
-  /// from: private static final float EXPECTED_START_OF_NEXT_WORD_X_RESET_VALUE
-  static const EXPECTED_START_OF_NEXT_WORD_X_RESET_VALUE = -3.4028235e+38;
-
-  /// from: private static final float MAX_HEIGHT_FOR_LINE_RESET_VALUE
-  static const MAX_HEIGHT_FOR_LINE_RESET_VALUE = -1.0;
-
-  /// from: private static final float MIN_Y_TOP_FOR_LINE_RESET_VALUE
-  static const MIN_Y_TOP_FOR_LINE_RESET_VALUE = 3.4028235e+38;
-
-  /// from: private static final float LAST_WORD_SPACING_RESET_VALUE
-  static const LAST_WORD_SPACING_RESET_VALUE = -1.0;
-
-  static final _get_LIST_ITEM_EXPRESSIONS = jniLookup<
-              ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-          "get_org_apache_pdfbox_text_PDFTextStripper_LIST_ITEM_EXPRESSIONS")
-      .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: private static final java.lang.String[] LIST_ITEM_EXPRESSIONS
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// a list of regular expressions that match commonly used list item formats, i.e. bullets, numbers, letters, Roman
-  /// numerals, etc. Not meant to be comprehensive.
-  static jni.JniObject get LIST_ITEM_EXPRESSIONS =>
-      jni.JniObject.fromRef(_get_LIST_ITEM_EXPRESSIONS());
-
-  static final _get_listOfPatterns = jniLookup<
-          ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-    ffi.Pointer<ffi.Void>,
-  )>();
-
-  /// from: private java.util.List<java.util.regex.Pattern> listOfPatterns
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject get listOfPatterns =>
-      jni.JniObject.fromRef(_get_listOfPatterns(reference));
-  static final _set_listOfPatterns = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "set_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.util.List<java.util.regex.Pattern> listOfPatterns
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  set listOfPatterns(jni.JniObject value) =>
-      _set_listOfPatterns(reference, value.reference);
-
-  static final _get_MIRRORING_CHAR_MAP =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "get_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: private static java.util.Map<java.lang.Character,java.lang.Character> MIRRORING_CHAR_MAP
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  static jni.JniObject get MIRRORING_CHAR_MAP =>
-      jni.JniObject.fromRef(_get_MIRRORING_CHAR_MAP());
-  static final _set_MIRRORING_CHAR_MAP =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "set_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: private static java.util.Map<java.lang.Character,java.lang.Character> MIRRORING_CHAR_MAP
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  static set MIRRORING_CHAR_MAP(jni.JniObject value) =>
-      _set_MIRRORING_CHAR_MAP(value.reference);
-
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "org_apache_pdfbox_text_PDFTextStripper_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
-
-  /// from: public void <init>()
-  ///
-  /// Instantiate a new PDFTextStripper object.
-  ///@throws IOException If there is an error loading the properties.
-  PDFTextStripper() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
-
-  static final _getText = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getText")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getText(org.apache.pdfbox.pdmodel.PDDocument doc)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will return the text of a document. See writeText. <br>
-  /// NOTE: The document must not be encrypted when coming into this method.
-  ///
-  /// IMPORTANT: By default, text extraction is done in the same sequence as the text in the PDF page content stream.
-  /// PDF is a graphic format, not a text format, and unlike HTML, it has no requirements that text one on page
-  /// be rendered in a certain order. The order is the one that was determined by the software that created the
-  /// PDF. To get text sorted from left to right and top to botton, use \#setSortByPosition(boolean).
-  ///@param doc The document to get the text from.
-  ///@return The text of the PDF document.
-  ///@throws IOException if the doc state is invalid or it is encrypted.
-  jni.JniString getText(pdmodel_.PDDocument doc) {
-    final result__ = jni.JniString.fromRef(_getText(reference, doc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _resetEngine =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_resetEngine")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void resetEngine()
-  void resetEngine() {
-    final result__ = _resetEngine(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeText = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_writeText")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void writeText(org.apache.pdfbox.pdmodel.PDDocument doc, java.io.Writer outputStream)
-  ///
-  /// This will take a PDDocument and write the text of that document to the print writer.
-  ///@param doc The document to get the data from.
-  ///@param outputStream The location to put the text.
-  ///@throws IOException If the doc is in an invalid state.
-  void writeText(pdmodel_.PDDocument doc, jni.JniObject outputStream) {
-    final result__ =
-        _writeText(reference, doc.reference, outputStream.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _processPages = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_processPages")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void processPages(org.apache.pdfbox.pdmodel.PDPageTree pages)
-  ///
-  /// This will process all of the pages and the text that is in them.
-  ///@param pages The pages object in the document.
-  ///@throws IOException If there is an error parsing the text.
-  void processPages(jni.JniObject pages) {
-    final result__ = _processPages(reference, pages.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _startDocument = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_startDocument")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void startDocument(org.apache.pdfbox.pdmodel.PDDocument document)
-  ///
-  /// This method is available for subclasses of this class. It will be called before processing of the document start.
-  ///@param document The PDF document that is being processed.
-  ///@throws IOException If an IO error occurs.
-  void startDocument(pdmodel_.PDDocument document) {
-    final result__ = _startDocument(reference, document.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _endDocument = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_endDocument")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void endDocument(org.apache.pdfbox.pdmodel.PDDocument document)
-  ///
-  /// This method is available for subclasses of this class. It will be called after processing of the document
-  /// finishes.
-  ///@param document The PDF document that is being processed.
-  ///@throws IOException If an IO error occurs.
-  void endDocument(pdmodel_.PDDocument document) {
-    final result__ = _endDocument(reference, document.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _processPage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_processPage")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void processPage(org.apache.pdfbox.pdmodel.PDPage page)
-  ///
-  /// This will process the contents of a page.
-  ///@param page The page to process.
-  ///@throws IOException If there is an error processing the page.
-  void processPage(jni.JniObject page) {
-    final result__ = _processPage(reference, page.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _fillBeadRectangles = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_fillBeadRectangles")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void fillBeadRectangles(org.apache.pdfbox.pdmodel.PDPage page)
-  void fillBeadRectangles(jni.JniObject page) {
-    final result__ = _fillBeadRectangles(reference, page.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _startArticle =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_startArticle")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void startArticle()
-  ///
-  /// Start a new article, which is typically defined as a column on a single page (also referred to as a bead). This
-  /// assumes that the primary direction of text is left to right. Default implementation is to do nothing. Subclasses
-  /// may provide additional information.
-  ///@throws IOException If there is any error writing to the stream.
-  void startArticle() {
-    final result__ = _startArticle(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _startArticle1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_startArticle1")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: protected void startArticle(boolean isLTR)
-  ///
-  /// Start a new article, which is typically defined as a column on a single page (also referred to as a bead).
-  /// Default implementation is to do nothing. Subclasses may provide additional information.
-  ///@param isLTR true if primary direction of text is left to right.
-  ///@throws IOException If there is any error writing to the stream.
-  void startArticle1(bool isLTR) {
-    final result__ = _startArticle1(reference, isLTR ? 1 : 0);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _endArticle =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_endArticle")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void endArticle()
-  ///
-  /// End an article. Default implementation is to do nothing. Subclasses may provide additional information.
-  ///@throws IOException If there is any error writing to the stream.
-  void endArticle() {
-    final result__ = _endArticle(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _startPage1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_startPage1")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void startPage(org.apache.pdfbox.pdmodel.PDPage page)
-  ///
-  /// Start a new page. Default implementation is to do nothing. Subclasses may provide additional information.
-  ///@param page The page we are about to process.
-  ///@throws IOException If there is any error writing to the stream.
-  void startPage1(jni.JniObject page) {
-    final result__ = _startPage1(reference, page.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _endPage1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_endPage1")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void endPage(org.apache.pdfbox.pdmodel.PDPage page)
-  ///
-  /// End a page. Default implementation is to do nothing. Subclasses may provide additional information.
-  ///@param page The page we are about to process.
-  ///@throws IOException If there is any error writing to the stream.
-  void endPage1(jni.JniObject page) {
-    final result__ = _endPage1(reference, page.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writePage =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writePage")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writePage()
-  ///
-  /// This will print the text of the processed page to "output". It will estimate, based on the coordinates of the
-  /// text, where newlines and word spacings should be placed. The text will be sorted only if that feature was
-  /// enabled.
-  ///@throws IOException If there is an error writing the text.
-  void writePage() {
-    final result__ = _writePage(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _overlap = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(
-                  ffi.Pointer<ffi.Void>,
-                  ffi.Float,
-                  ffi.Float,
-                  ffi.Float,
-                  ffi.Float)>>("org_apache_pdfbox_text_PDFTextStripper_overlap")
-      .asFunction<
-          int Function(
-              ffi.Pointer<ffi.Void>, double, double, double, double)>();
-
-  /// from: private boolean overlap(float y1, float height1, float y2, float height2)
-  bool overlap(double y1, double height1, double y2, double height2) {
-    final result__ = _overlap(reference, y1, height1, y2, height2) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeLineSeparator =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writeLineSeparator")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeLineSeparator()
-  ///
-  /// Write the line separator value to the output stream.
-  ///@throws IOException If there is a problem writing out the line separator to the document.
-  void writeLineSeparator() {
-    final result__ = _writeLineSeparator(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeWordSeparator =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writeWordSeparator")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeWordSeparator()
-  ///
-  /// Write the word separator value to the output stream.
-  ///@throws IOException If there is a problem writing out the word separator to the document.
-  void writeWordSeparator() {
-    final result__ = _writeWordSeparator(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeCharacters = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_writeCharacters")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeCharacters(org.apache.pdfbox.text.TextPosition text)
-  ///
-  /// Write the string in TextPosition to the output stream.
-  ///@param text The text to write to the stream.
-  ///@throws IOException If there is an error when writing the text.
-  void writeCharacters(jni.JniObject text) {
-    final result__ = _writeCharacters(reference, text.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeString = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_writeString")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeString(java.lang.String text, java.util.List<org.apache.pdfbox.text.TextPosition> textPositions)
-  ///
-  /// Write a Java string to the output stream. The default implementation will ignore the <code>textPositions</code>
-  /// and just calls \#writeString(String).
-  ///@param text The text to write to the stream.
-  ///@param textPositions The TextPositions belonging to the text.
-  ///@throws IOException If there is an error when writing the text.
-  void writeString(jni.JniString text, jni.JniObject textPositions) {
-    final result__ =
-        _writeString(reference, text.reference, textPositions.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeString1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_writeString1")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeString(java.lang.String text)
-  ///
-  /// Write a Java string to the output stream.
-  ///@param text The text to write to the stream.
-  ///@throws IOException If there is an error when writing the text.
-  void writeString1(jni.JniString text) {
-    final result__ = _writeString1(reference, text.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _within = jniLookup<
-          ffi.NativeFunction<
-              ffi.Uint8 Function(ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float,
-                  ffi.Float)>>("org_apache_pdfbox_text_PDFTextStripper_within")
-      .asFunction<
-          int Function(ffi.Pointer<ffi.Void>, double, double, double)>();
-
-  /// from: private boolean within(float first, float second, float variance)
-  ///
-  /// This will determine of two floating point numbers are within a specified variance.
-  ///@param first The first number to compare to.
-  ///@param second The second number to compare to.
-  ///@param variance The allowed variance.
-  bool within(double first, double second, double variance) {
-    final result__ = _within(reference, first, second, variance) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _processTextPosition = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_processTextPosition")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void processTextPosition(org.apache.pdfbox.text.TextPosition text)
-  ///
-  /// This will process a TextPosition object and add the text to the list of characters on a page. It takes care of
-  /// overlapping text.
-  ///@param text The text to process.
-  void processTextPosition(jni.JniObject text) {
-    final result__ = _processTextPosition(reference, text.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getStartPage =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getStartPage")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public int getStartPage()
-  ///
-  /// This is the page that the text extraction will start on. The pages start at page 1. For example in a 5 page PDF
-  /// document, if the start page is 1 then all pages will be extracted. If the start page is 4 then pages 4 and 5 will
-  /// be extracted. The default value is 1.
-  ///@return Value of property startPage.
-  int getStartPage() {
-    final result__ = _getStartPage(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setStartPage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setStartPage")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void setStartPage(int startPageValue)
-  ///
-  /// This will set the first page to be extracted by this class.
-  ///@param startPageValue New value of 1-based startPage property.
-  void setStartPage(int startPageValue) {
-    final result__ = _setStartPage(reference, startPageValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getEndPage =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getEndPage")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public int getEndPage()
-  ///
-  /// This will get the last page that will be extracted. This is inclusive, for example if a 5 page PDF an endPage
-  /// value of 5 would extract the entire document, an end page of 2 would extract pages 1 and 2. This defaults to
-  /// Integer.MAX_VALUE such that all pages of the pdf will be extracted.
-  ///@return Value of property endPage.
-  int getEndPage() {
-    final result__ = _getEndPage(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setEndPage = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setEndPage")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void setEndPage(int endPageValue)
-  ///
-  /// This will set the last page to be extracted by this class.
-  ///@param endPageValue New value of 1-based endPage property.
-  void setEndPage(int endPageValue) {
-    final result__ = _setEndPage(reference, endPageValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setLineSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setLineSeparator")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setLineSeparator(java.lang.String separator)
-  ///
-  /// Set the desired line separator for output text. The line.separator system property is used if the line separator
-  /// preference is not set explicitly using this method.
-  ///@param separator The desired line separator string.
-  void setLineSeparator(jni.JniString separator) {
-    final result__ = _setLineSeparator(reference, separator.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getLineSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getLineSeparator")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getLineSeparator()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the line separator.
-  ///@return The desired line separator string.
-  jni.JniString getLineSeparator() {
-    final result__ = jni.JniString.fromRef(_getLineSeparator(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getWordSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getWordSeparator")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getWordSeparator()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// This will get the word separator.
-  ///@return The desired word separator string.
-  jni.JniString getWordSeparator() {
-    final result__ = jni.JniString.fromRef(_getWordSeparator(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setWordSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setWordSeparator")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setWordSeparator(java.lang.String separator)
-  ///
-  /// Set the desired word separator for output text. The PDFBox text extraction algorithm will output a space
-  /// character if there is enough space between two words. By default a space character is used. If you need and
-  /// accurate count of characters that are found in a PDF document then you might want to set the word separator to
-  /// the empty string.
-  ///@param separator The desired page separator string.
-  void setWordSeparator(jni.JniString separator) {
-    final result__ = _setWordSeparator(reference, separator.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getSuppressDuplicateOverlappingText = jniLookup<
-              ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getSuppressDuplicateOverlappingText")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public boolean getSuppressDuplicateOverlappingText()
-  ///
-  /// @return Returns the suppressDuplicateOverlappingText.
-  bool getSuppressDuplicateOverlappingText() {
-    final result__ = _getSuppressDuplicateOverlappingText(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getCurrentPageNo =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getCurrentPageNo")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected int getCurrentPageNo()
-  ///
-  /// Get the current page number that is being processed.
-  ///@return A 1 based number representing the current page.
-  int getCurrentPageNo() {
-    final result__ = _getCurrentPageNo(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getOutput = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getOutput")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected java.io.Writer getOutput()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// The output stream that is being written to.
-  ///@return The stream that output is being written to.
-  jni.JniObject getOutput() {
-    final result__ = jni.JniObject.fromRef(_getOutput(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getCharactersByArticle = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getCharactersByArticle")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected java.util.List<java.util.List<org.apache.pdfbox.text.TextPosition>> getCharactersByArticle()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Character strings are grouped by articles. It is quite common that there will only be a single article. This
-  /// returns a List that contains List objects, the inner lists will contain TextPosition objects.
-  ///@return A double List of TextPositions for all text strings on the page.
-  jni.JniObject getCharactersByArticle() {
-    final result__ = jni.JniObject.fromRef(_getCharactersByArticle(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setSuppressDuplicateOverlappingText = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setSuppressDuplicateOverlappingText")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void setSuppressDuplicateOverlappingText(boolean suppressDuplicateOverlappingTextValue)
-  ///
-  /// By default the text stripper will attempt to remove text that overlapps each other. Word paints the same
-  /// character several times in order to make it look bold. By setting this to false all text will be extracted, which
-  /// means that certain sections will be duplicated, but better performance will be noticed.
-  ///@param suppressDuplicateOverlappingTextValue The suppressDuplicateOverlappingText to set.
-  void setSuppressDuplicateOverlappingText(
-      bool suppressDuplicateOverlappingTextValue) {
-    final result__ = _setSuppressDuplicateOverlappingText(
-        reference, suppressDuplicateOverlappingTextValue ? 1 : 0);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getSeparateByBeads =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getSeparateByBeads")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public boolean getSeparateByBeads()
-  ///
-  /// This will tell if the text stripper should separate by beads.
-  ///@return If the text will be grouped by beads.
-  bool getSeparateByBeads() {
-    final result__ = _getSeparateByBeads(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setShouldSeparateByBeads = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setShouldSeparateByBeads")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void setShouldSeparateByBeads(boolean aShouldSeparateByBeads)
-  ///
-  /// Set if the text stripper should group the text output by a list of beads. The default value is true!
-  ///@param aShouldSeparateByBeads The new grouping of beads.
-  void setShouldSeparateByBeads(bool aShouldSeparateByBeads) {
-    final result__ =
-        _setShouldSeparateByBeads(reference, aShouldSeparateByBeads ? 1 : 0);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getEndBookmark = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getEndBookmark")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem getEndBookmark()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Get the bookmark where text extraction should end, inclusive. Default is null.
-  ///@return The ending bookmark.
-  jni.JniObject getEndBookmark() {
-    final result__ = jni.JniObject.fromRef(_getEndBookmark(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setEndBookmark = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setEndBookmark")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setEndBookmark(org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem aEndBookmark)
-  ///
-  /// Set the bookmark where the text extraction should stop.
-  ///@param aEndBookmark The ending bookmark.
-  void setEndBookmark(jni.JniObject aEndBookmark) {
-    final result__ = _setEndBookmark(reference, aEndBookmark.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getStartBookmark = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getStartBookmark")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem getStartBookmark()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Get the bookmark where text extraction should start, inclusive. Default is null.
-  ///@return The starting bookmark.
-  jni.JniObject getStartBookmark() {
-    final result__ = jni.JniObject.fromRef(_getStartBookmark(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setStartBookmark = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setStartBookmark")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setStartBookmark(org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem aStartBookmark)
-  ///
-  /// Set the bookmark where text extraction should start, inclusive.
-  ///@param aStartBookmark The starting bookmark.
-  void setStartBookmark(jni.JniObject aStartBookmark) {
-    final result__ = _setStartBookmark(reference, aStartBookmark.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getAddMoreFormatting =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getAddMoreFormatting")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public boolean getAddMoreFormatting()
-  ///
-  /// This will tell if the text stripper should add some more text formatting.
-  ///@return true if some more text formatting will be added
-  bool getAddMoreFormatting() {
-    final result__ = _getAddMoreFormatting(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setAddMoreFormatting = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setAddMoreFormatting")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void setAddMoreFormatting(boolean newAddMoreFormatting)
-  ///
-  /// There will some additional text formatting be added if addMoreFormatting is set to true. Default is false.
-  ///@param newAddMoreFormatting Tell PDFBox to add some more text formatting
-  void setAddMoreFormatting(bool newAddMoreFormatting) {
-    final result__ =
-        _setAddMoreFormatting(reference, newAddMoreFormatting ? 1 : 0);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getSortByPosition =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getSortByPosition")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public boolean getSortByPosition()
-  ///
-  /// This will tell if the text stripper should sort the text tokens before writing to the stream.
-  ///@return true If the text tokens will be sorted before being written.
-  bool getSortByPosition() {
-    final result__ = _getSortByPosition(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setSortByPosition = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setSortByPosition")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
-
-  /// from: public void setSortByPosition(boolean newSortByPosition)
-  ///
-  /// The order of the text tokens in a PDF file may not be in the same as they appear visually on the screen. For
-  /// example, a PDF writer may write out all text by font, so all bold or larger text, then make a second pass and
-  /// write out the normal text.<br>
-  /// The default is to __not__ sort by position.<br>
-  /// <br>
-  /// A PDF writer could choose to write each character in a different order. By default PDFBox does __not__ sort
-  /// the text tokens before processing them due to performance reasons.
-  ///@param newSortByPosition Tell PDFBox to sort the text positions.
-  void setSortByPosition(bool newSortByPosition) {
-    final result__ = _setSortByPosition(reference, newSortByPosition ? 1 : 0);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getSpacingTolerance =
-      jniLookup<ffi.NativeFunction<ffi.Float Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getSpacingTolerance")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public float getSpacingTolerance()
-  ///
-  /// Get the current space width-based tolerance value that is being used to estimate where spaces in text should be
-  /// added. Note that the default value for this has been determined from trial and error.
-  ///@return The current tolerance / scaling factor
-  double getSpacingTolerance() {
-    final result__ = _getSpacingTolerance(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setSpacingTolerance = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setSpacingTolerance")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: public void setSpacingTolerance(float spacingToleranceValue)
-  ///
-  /// Set the space width-based tolerance value that is used to estimate where spaces in text should be added. Note
-  /// that the default value for this has been determined from trial and error. Setting this value larger will reduce
-  /// the number of spaces added.
-  ///@param spacingToleranceValue tolerance / scaling factor to use
-  void setSpacingTolerance(double spacingToleranceValue) {
-    final result__ = _setSpacingTolerance(reference, spacingToleranceValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getAverageCharTolerance =
-      jniLookup<ffi.NativeFunction<ffi.Float Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getAverageCharTolerance")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public float getAverageCharTolerance()
-  ///
-  /// Get the current character width-based tolerance value that is being used to estimate where spaces in text should
-  /// be added. Note that the default value for this has been determined from trial and error.
-  ///@return The current tolerance / scaling factor
-  double getAverageCharTolerance() {
-    final result__ = _getAverageCharTolerance(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setAverageCharTolerance = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setAverageCharTolerance")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: public void setAverageCharTolerance(float averageCharToleranceValue)
-  ///
-  /// Set the character width-based tolerance value that is used to estimate where spaces in text should be added. Note
-  /// that the default value for this has been determined from trial and error. Setting this value larger will reduce
-  /// the number of spaces added.
-  ///@param averageCharToleranceValue average tolerance / scaling factor to use
-  void setAverageCharTolerance(double averageCharToleranceValue) {
-    final result__ =
-        _setAverageCharTolerance(reference, averageCharToleranceValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getIndentThreshold =
-      jniLookup<ffi.NativeFunction<ffi.Float Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getIndentThreshold")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public float getIndentThreshold()
-  ///
-  /// returns the multiple of whitespace character widths for the current text which the current line start can be
-  /// indented from the previous line start beyond which the current line start is considered to be a paragraph start.
-  ///@return the number of whitespace character widths to use when detecting paragraph indents.
-  double getIndentThreshold() {
-    final result__ = _getIndentThreshold(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setIndentThreshold = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setIndentThreshold")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: public void setIndentThreshold(float indentThresholdValue)
-  ///
-  /// sets the multiple of whitespace character widths for the current text which the current line start can be
-  /// indented from the previous line start beyond which the current line start is considered to be a paragraph start.
-  /// The default value is 2.0.
-  ///@param indentThresholdValue the number of whitespace character widths to use when detecting paragraph indents.
-  void setIndentThreshold(double indentThresholdValue) {
-    final result__ = _setIndentThreshold(reference, indentThresholdValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getDropThreshold =
-      jniLookup<ffi.NativeFunction<ffi.Float Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_getDropThreshold")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public float getDropThreshold()
-  ///
-  /// the minimum whitespace, as a multiple of the max height of the current characters beyond which the current line
-  /// start is considered to be a paragraph start.
-  ///@return the character height multiple for max allowed whitespace between lines in the same paragraph.
-  double getDropThreshold() {
-    final result__ = _getDropThreshold(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setDropThreshold = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Float)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setDropThreshold")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: public void setDropThreshold(float dropThresholdValue)
-  ///
-  /// sets the minimum whitespace, as a multiple of the max height of the current characters beyond which the current
-  /// line start is considered to be a paragraph start. The default value is 2.5.
-  ///@param dropThresholdValue the character height multiple for max allowed whitespace between lines in the same
-  /// paragraph.
-  void setDropThreshold(double dropThresholdValue) {
-    final result__ = _setDropThreshold(reference, dropThresholdValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getParagraphStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getParagraphStart")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getParagraphStart()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the string which will be used at the beginning of a paragraph.
-  ///@return the paragraph start string
-  jni.JniString getParagraphStart() {
-    final result__ = jni.JniString.fromRef(_getParagraphStart(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setParagraphStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setParagraphStart")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setParagraphStart(java.lang.String s)
-  ///
-  /// Sets the string which will be used at the beginning of a paragraph.
-  ///@param s the paragraph start string
-  void setParagraphStart(jni.JniString s) {
-    final result__ = _setParagraphStart(reference, s.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getParagraphEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getParagraphEnd")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getParagraphEnd()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the string which will be used at the end of a paragraph.
-  ///@return the paragraph end string
-  jni.JniString getParagraphEnd() {
-    final result__ = jni.JniString.fromRef(_getParagraphEnd(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setParagraphEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setParagraphEnd")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setParagraphEnd(java.lang.String s)
-  ///
-  /// Sets the string which will be used at the end of a paragraph.
-  ///@param s the paragraph end string
-  void setParagraphEnd(jni.JniString s) {
-    final result__ = _setParagraphEnd(reference, s.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getPageStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getPageStart")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getPageStart()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the string which will be used at the beginning of a page.
-  ///@return the page start string
-  jni.JniString getPageStart() {
-    final result__ = jni.JniString.fromRef(_getPageStart(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setPageStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setPageStart")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setPageStart(java.lang.String pageStartValue)
-  ///
-  /// Sets the string which will be used at the beginning of a page.
-  ///@param pageStartValue the page start string
-  void setPageStart(jni.JniString pageStartValue) {
-    final result__ = _setPageStart(reference, pageStartValue.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getPageEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getPageEnd")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getPageEnd()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the string which will be used at the end of a page.
-  ///@return the page end string
-  jni.JniString getPageEnd() {
-    final result__ = jni.JniString.fromRef(_getPageEnd(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setPageEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setPageEnd")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setPageEnd(java.lang.String pageEndValue)
-  ///
-  /// Sets the string which will be used at the end of a page.
-  ///@param pageEndValue the page end string
-  void setPageEnd(jni.JniString pageEndValue) {
-    final result__ = _setPageEnd(reference, pageEndValue.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getArticleStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getArticleStart")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getArticleStart()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the string which will be used at the beginning of an article.
-  ///@return the article start string
-  jni.JniString getArticleStart() {
-    final result__ = jni.JniString.fromRef(_getArticleStart(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setArticleStart = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setArticleStart")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setArticleStart(java.lang.String articleStartValue)
-  ///
-  /// Sets the string which will be used at the beginning of an article.
-  ///@param articleStartValue the article start string
-  void setArticleStart(jni.JniString articleStartValue) {
-    final result__ = _setArticleStart(reference, articleStartValue.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getArticleEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getArticleEnd")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: public java.lang.String getArticleEnd()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Returns the string which will be used at the end of an article.
-  ///@return the article end string
-  jni.JniString getArticleEnd() {
-    final result__ = jni.JniString.fromRef(_getArticleEnd(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setArticleEnd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setArticleEnd")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: public void setArticleEnd(java.lang.String articleEndValue)
-  ///
-  /// Sets the string which will be used at the end of an article.
-  ///@param articleEndValue the article end string
-  void setArticleEnd(jni.JniString articleEndValue) {
-    final result__ = _setArticleEnd(reference, articleEndValue.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _handleLineSeparation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Float)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_handleLineSeparation")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              double)>();
-
-  /// from: private org.apache.pdfbox.text.PDFTextStripper.PositionWrapper handleLineSeparation(org.apache.pdfbox.text.PDFTextStripper.PositionWrapper current, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastPosition, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastLineStartPosition, float maxHeightForLine)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// handles the line separator for a new line given the specified current and previous TextPositions.
-  ///@param current the current text position
-  ///@param lastPosition the previous text position
-  ///@param lastLineStartPosition the last text position that followed a line separator.
-  ///@param maxHeightForLine max height for positions since lastLineStartPosition
-  ///@return start position of the last line
-  ///@throws IOException if something went wrong
-  jni.JniObject handleLineSeparation(
-      jni.JniObject current,
-      jni.JniObject lastPosition,
-      jni.JniObject lastLineStartPosition,
-      double maxHeightForLine) {
-    final result__ = jni.JniObject.fromRef(_handleLineSeparation(
-        reference,
-        current.reference,
-        lastPosition.reference,
-        lastLineStartPosition.reference,
-        maxHeightForLine));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _isParagraphSeparation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Float)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_isParagraphSeparation")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, double)>();
-
-  /// from: private void isParagraphSeparation(org.apache.pdfbox.text.PDFTextStripper.PositionWrapper position, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastPosition, org.apache.pdfbox.text.PDFTextStripper.PositionWrapper lastLineStartPosition, float maxHeightForLine)
-  ///
-  /// tests the relationship between the last text position, the current text position and the last text position that
-  /// followed a line separator to decide if the gap represents a paragraph separation. This should <i>only</i> be
-  /// called for consecutive text positions that first pass the line separation test.
-  ///
-  /// This base implementation tests to see if the lastLineStartPosition is null OR if the current vertical position
-  /// has dropped below the last text vertical position by at least 2.5 times the current text height OR if the current
-  /// horizontal position is indented by at least 2 times the current width of a space character.
-  ///
-  ///
-  ///
-  /// This also attempts to identify text that is indented under a hanging indent.
-  ///
-  ///
-  ///
-  /// This method sets the isParagraphStart and isHangingIndent flags on the current position object.
-  ///
-  ///
-  ///@param position the current text position. This may have its isParagraphStart or isHangingIndent flags set upon
-  /// return.
-  ///@param lastPosition the previous text position (should not be null).
-  ///@param lastLineStartPosition the last text position that followed a line separator, or null.
-  ///@param maxHeightForLine max height for text positions since lasLineStartPosition.
-  void isParagraphSeparation(jni.JniObject position, jni.JniObject lastPosition,
-      jni.JniObject lastLineStartPosition, double maxHeightForLine) {
-    final result__ = _isParagraphSeparation(
-        reference,
-        position.reference,
-        lastPosition.reference,
-        lastLineStartPosition.reference,
-        maxHeightForLine);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _multiplyFloat = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Float Function(
-                      ffi.Pointer<ffi.Void>, ffi.Float, ffi.Float)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_multiplyFloat")
-      .asFunction<double Function(ffi.Pointer<ffi.Void>, double, double)>();
-
-  /// from: private float multiplyFloat(float value1, float value2)
-  double multiplyFloat(double value1, double value2) {
-    final result__ = _multiplyFloat(reference, value1, value2);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeParagraphSeparator =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writeParagraphSeparator")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeParagraphSeparator()
-  ///
-  /// writes the paragraph separator string to the output.
-  ///@throws IOException if something went wrong
-  void writeParagraphSeparator() {
-    final result__ = _writeParagraphSeparator(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeParagraphStart =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writeParagraphStart")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeParagraphStart()
-  ///
-  /// Write something (if defined) at the start of a paragraph.
-  ///@throws IOException if something went wrong
-  void writeParagraphStart() {
-    final result__ = _writeParagraphStart(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeParagraphEnd =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writeParagraphEnd")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writeParagraphEnd()
-  ///
-  /// Write something (if defined) at the end of a paragraph.
-  ///@throws IOException if something went wrong
-  void writeParagraphEnd() {
-    final result__ = _writeParagraphEnd(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writePageStart =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writePageStart")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writePageStart()
-  ///
-  /// Write something (if defined) at the start of a page.
-  ///@throws IOException if something went wrong
-  void writePageStart() {
-    final result__ = _writePageStart(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writePageEnd =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_writePageEnd")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void writePageEnd()
-  ///
-  /// Write something (if defined) at the end of a page.
-  ///@throws IOException if something went wrong
-  void writePageEnd() {
-    final result__ = _writePageEnd(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _matchListItemPattern = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_matchListItemPattern")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.util.regex.Pattern matchListItemPattern(org.apache.pdfbox.text.PDFTextStripper.PositionWrapper pw)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// returns the list item Pattern object that matches the text at the specified PositionWrapper or null if the text
-  /// does not match such a pattern. The list of Patterns tested against is given by the \#getListItemPatterns()
-  /// method. To add to the list, simply override that method (if sub-classing) or explicitly supply your own list
-  /// using \#setListItemPatterns(List).
-  ///@param pw position
-  ///@return the matching pattern
-  jni.JniObject matchListItemPattern(jni.JniObject pw) {
-    final result__ =
-        jni.JniObject.fromRef(_matchListItemPattern(reference, pw.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _setListItemPatterns = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_setListItemPatterns")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected void setListItemPatterns(java.util.List<java.util.regex.Pattern> patterns)
-  ///
-  /// use to supply a different set of regular expression patterns for matching list item starts.
-  ///@param patterns list of patterns
-  void setListItemPatterns(jni.JniObject patterns) {
-    final result__ = _setListItemPatterns(reference, patterns.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _getListItemPatterns = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_getListItemPatterns")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: protected java.util.List<java.util.regex.Pattern> getListItemPatterns()
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// returns a list of regular expression Patterns representing different common list item formats. For example
-  /// numbered items of form:
-  /// <ol>
-  /// <li>some text</li>
-  /// <li>more text</li>
-  /// </ol>
-  /// or
-  /// <ul>
-  /// <li>some text</li>
-  /// <li>more text</li>
-  /// </ul>
-  /// etc., all begin with some character pattern. The pattern "\\d+\." (matches "1.", "2.", ...) or "\[\\d+\]"
-  /// (matches "[1]", "[2]", ...).
-  ///
-  /// This method returns a list of such regular expression Patterns.
-  ///@return a list of Pattern objects.
-  jni.JniObject getListItemPatterns() {
-    final result__ = jni.JniObject.fromRef(_getListItemPatterns(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _matchPattern = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_matchPattern")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: static protected java.util.regex.Pattern matchPattern(java.lang.String string, java.util.List<java.util.regex.Pattern> patterns)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// iterates over the specified list of Patterns until it finds one that matches the specified string. Then returns
-  /// the Pattern.
-  ///
-  /// Order of the supplied list of patterns is important as most common patterns should come first. Patterns should be
-  /// strict in general, and all will be used with case sensitivity on.
-  ///
-  ///
-  ///@param string the string to be searched
-  ///@param patterns list of patterns
-  ///@return matching pattern
-  static jni.JniObject matchPattern(
-      jni.JniString string, jni.JniObject patterns) {
-    final result__ = jni.JniObject.fromRef(
-        _matchPattern(string.reference, patterns.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _writeLine = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_writeLine")
-      .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private void writeLine(java.util.List<org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions> line)
-  ///
-  /// Write a list of string containing a whole line of a document.
-  ///@param line a list with the words of the given line
-  ///@throws IOException if something went wrong
-  void writeLine(jni.JniObject line) {
-    final result__ = _writeLine(reference, line.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _normalize = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_normalize")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.util.List<org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions> normalize(java.util.List<org.apache.pdfbox.text.PDFTextStripper.LineItem> line)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Normalize the given list of TextPositions.
-  ///@param line list of TextPositions
-  ///@return a list of strings, one string for every word
-  jni.JniObject normalize(jni.JniObject line) {
-    final result__ =
-        jni.JniObject.fromRef(_normalize(reference, line.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _handleDirection = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_handleDirection")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String handleDirection(java.lang.String word)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Handles the LTR and RTL direction of the given words. The whole implementation stands and falls with the given
-  /// word. If the word is a full line, the results will be the best. If the word contains of single words or
-  /// characters, the order of the characters in a word or words in a line may wrong, due to RTL and LTR marks and
-  /// characters!
-  ///
-  /// Based on http://www.nesterovsky-bros.com/weblog/2013/07/28/VisualToLogicalConversionInJava.aspx
-  ///@param word The word that shall be processed
-  ///@return new word with the correct direction of the containing characters
-  jni.JniString handleDirection(jni.JniString word) {
-    final result__ =
-        jni.JniString.fromRef(_handleDirection(reference, word.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _parseBidiFile =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "org_apache_pdfbox_text_PDFTextStripper_parseBidiFile")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
-
-  /// from: private static void parseBidiFile(java.io.InputStream inputStream)
-  ///
-  /// This method parses the bidi file provided as inputstream.
-  ///@param inputStream - The bidi file as inputstream
-  ///@throws IOException if any line could not be read by the LineNumberReader
-  static void parseBidiFile(jni.JniObject inputStream) {
-    final result__ = _parseBidiFile(inputStream.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _createWord = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_createWord")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions createWord(java.lang.String word, java.util.List<org.apache.pdfbox.text.TextPosition> wordPositions)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Used within \#normalize(List) to create a single WordWithTextPositions entry.
-  jni.JniObject createWord(jni.JniString word, jni.JniObject wordPositions) {
-    final result__ = jni.JniObject.fromRef(
-        _createWord(reference, word.reference, wordPositions.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _normalizeWord = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_normalizeWord")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.String normalizeWord(java.lang.String word)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Normalize certain Unicode characters. For example, convert the single "fi" ligature to "f" and "i". Also
-  /// normalises Arabic and Hebrew presentation forms.
-  ///@param word Word to normalize
-  ///@return Normalized word
-  jni.JniString normalizeWord(jni.JniString word) {
-    final result__ =
-        jni.JniString.fromRef(_normalizeWord(reference, word.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-
-  static final _normalizeAdd = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>)>>(
-          "org_apache_pdfbox_text_PDFTextStripper_normalizeAdd")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>)>();
-
-  /// from: private java.lang.StringBuilder normalizeAdd(java.util.List<org.apache.pdfbox.text.PDFTextStripper.WordWithTextPositions> normalized, java.lang.StringBuilder lineBuilder, java.util.List<org.apache.pdfbox.text.TextPosition> wordPositions, org.apache.pdfbox.text.PDFTextStripper.LineItem item)
-  /// The returned object must be deleted after use, by calling the `delete` method.
-  ///
-  /// Used within \#normalize(List) to handle a TextPosition.
-  ///@return The StringBuilder that must be used when calling this method.
-  jni.JniObject normalizeAdd(
-      jni.JniObject normalized,
-      jni.JniObject lineBuilder,
-      jni.JniObject wordPositions,
-      jni.JniObject item) {
-    final result__ = jni.JniObject.fromRef(_normalizeAdd(
-        reference,
-        normalized.reference,
-        lineBuilder.reference,
-        wordPositions.reference,
-        item.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
-}
diff --git a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/.clang-format b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/.clang-format
new file mode 100644
index 0000000..a256c2f
--- /dev/null
+++ b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/.clang-format
@@ -0,0 +1,15 @@
+# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format
+
+# Defines the Chromium style for automatic reformatting.
+# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+BasedOnStyle: Chromium
+
+# clang-format doesn't seem to do a good job of this for longer comments.
+ReflowComments: 'false'
+
+# We have lots of these. Though we need to put them all in curly braces,
+# clang-format can't do that.
+AllowShortIfStatementsOnASingleLine: 'true'
+
+# Put escaped newlines into the rightmost column.
+AlignEscapedNewlinesLeft: false
diff --git a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/dartjni.h b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/dartjni.h
index bc72baa..efb9079 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/dartjni.h
+++ b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/dartjni.h
@@ -89,6 +89,13 @@
   jthrowable exception;
 } JniPointerResult;
 
+/// JniExceptionDetails holds 2 jstring objects, one is the result of
+/// calling `toString` on exception object, other is stack trace;
+typedef struct JniExceptionDetails {
+  jstring message;
+  jstring stacktrace;
+} JniExceptionDetails;
+
 /// This struct contains functions which wrap method call / field access conveniently along with
 /// exception checking.
 ///
@@ -118,6 +125,7 @@
                                 jvalue* args);
   JniResult (*getField)(jobject obj, jfieldID fieldID, int callType);
   JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType);
+  JniExceptionDetails (*getExceptionDetails)(jthrowable exception);
 } JniAccessors;
 
 FFI_PLUGIN_EXPORT JniAccessors* GetAccessors();
@@ -240,3 +248,10 @@
     jniEnv = env_getter();
   }
 }
+
+static inline jthrowable check_exception() {
+  jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv);
+  if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv);
+  if (exception == NULL) return NULL;
+  return to_global_ref(exception);
+}
diff --git a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/pdfbox_plugin.c b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/pdfbox_plugin.c
index 5128886..1aa65a7 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/src/third_party/pdfbox_plugin.c
+++ b/pkgs/jnigen/example/pdfbox_plugin/src/third_party/pdfbox_plugin.c
@@ -19,3084 +19,4571 @@
 // Autogenerated by jnigen. DO NOT EDIT!
 
 #include <stdint.h>
-#include "jni.h"
 #include "dartjni.h"
+#include "jni.h"
 
-thread_local JNIEnv *jniEnv;
+thread_local JNIEnv* jniEnv;
 JniContext jni;
 
 JniContext (*context_getter)(void);
-JNIEnv *(*env_getter)(void);
+JNIEnv* (*env_getter)(void);
 
-void setJniGetters(JniContext (*cg)(void),
-        JNIEnv *(*eg)(void)) {
-    context_getter = cg;
-    env_getter = eg;
+void setJniGetters(JniContext (*cg)(void), JNIEnv* (*eg)(void)) {
+  context_getter = cg;
+  env_getter = eg;
 }
 
 // org.apache.pdfbox.pdmodel.PDDocument
-jclass _c_org_apache_pdfbox_pdmodel_PDDocument = NULL;
+jclass _c_PDDocument = NULL;
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_ctor = NULL;
+jmethodID _m_PDDocument__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_ctor() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_ctor, "<init>", "()V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_ctor);
-    return to_global_ref(_result);
+JniResult PDDocument__ctor() {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__ctor, "<init>", "()V");
+  if (_m_PDDocument__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_PDDocument, _m_PDDocument__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_ctor1 = NULL;
+jmethodID _m_PDDocument__ctor1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_ctor1(jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_ctor1, "<init>", "(Lorg/apache/pdfbox/io/MemoryUsageSetting;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_ctor1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_ctor1, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__ctor1(jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__ctor1, "<init>",
+              "(Lorg/apache/pdfbox/io/MemoryUsageSetting;)V");
+  if (_m_PDDocument__ctor1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocument,
+                                         _m_PDDocument__ctor1, memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_ctor2 = NULL;
+jmethodID _m_PDDocument__ctor2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_ctor2(jobject doc) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_ctor2, "<init>", "(Lorg/apache/pdfbox/cos/COSDocument;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_ctor2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_ctor2, doc);
-    return to_global_ref(_result);
+JniResult PDDocument__ctor2(jobject doc) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__ctor2, "<init>",
+              "(Lorg/apache/pdfbox/cos/COSDocument;)V");
+  if (_m_PDDocument__ctor2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_PDDocument, _m_PDDocument__ctor2, doc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_ctor3 = NULL;
+jmethodID _m_PDDocument__ctor3 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_ctor3(jobject doc, jobject source) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_ctor3, "<init>", "(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/RandomAccessRead;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_ctor3 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_ctor3, doc, source);
-    return to_global_ref(_result);
+JniResult PDDocument__ctor3(jobject doc, jobject source) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__ctor3, "<init>",
+              "(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/"
+              "RandomAccessRead;)V");
+  if (_m_PDDocument__ctor3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocument,
+                                         _m_PDDocument__ctor3, doc, source);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_ctor4 = NULL;
+jmethodID _m_PDDocument__ctor4 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_ctor4(jobject doc, jobject source, jobject permission) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_ctor4, "<init>", "(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/RandomAccessRead;Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_ctor4 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_ctor4, doc, source, permission);
-    return to_global_ref(_result);
+JniResult PDDocument__ctor4(jobject doc, jobject source, jobject permission) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__ctor4, "<init>",
+              "(Lorg/apache/pdfbox/cos/COSDocument;Lorg/apache/pdfbox/io/"
+              "RandomAccessRead;Lorg/apache/pdfbox/pdmodel/encryption/"
+              "AccessPermission;)V");
+  if (_m_PDDocument__ctor4 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(
+      jniEnv, _c_PDDocument, _m_PDDocument__ctor4, doc, source, permission);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_addPage = NULL;
+jmethodID _m_PDDocument__addPage = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_addPage(jobject self_, jobject page) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_addPage, "addPage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_addPage == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_addPage, page);
+JniResult PDDocument__addPage(jobject self_, jobject page) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__addPage, "addPage",
+              "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
+  if (_m_PDDocument__addPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addPage, page);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature = NULL;
+jmethodID _m_PDDocument__addSignature = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_addSignature(jobject self_, jobject sigObject) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature, "addSignature", "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature, sigObject);
+JniResult PDDocument__addSignature(jobject self_, jobject sigObject) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__addSignature, "addSignature",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+              "PDSignature;)V");
+  if (_m_PDDocument__addSignature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature,
+                            sigObject);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature1 = NULL;
+jmethodID _m_PDDocument__addSignature1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_addSignature1(jobject self_, jobject sigObject, jobject options) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature1, "addSignature", "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature1, sigObject, options);
+JniResult PDDocument__addSignature1(jobject self_,
+                                    jobject sigObject,
+                                    jobject options) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__addSignature1, "addSignature",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+              "PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/"
+              "digitalsignature/SignatureOptions;)V");
+  if (_m_PDDocument__addSignature1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature1,
+                            sigObject, options);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature2 = NULL;
+jmethodID _m_PDDocument__addSignature2 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_addSignature2(jobject self_, jobject sigObject, jobject signatureInterface) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature2, "addSignature", "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature2 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature2, sigObject, signatureInterface);
+JniResult PDDocument__addSignature2(jobject self_,
+                                    jobject sigObject,
+                                    jobject signatureInterface) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__addSignature2, "addSignature",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+              "PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/"
+              "digitalsignature/SignatureInterface;)V");
+  if (_m_PDDocument__addSignature2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature2,
+                            sigObject, signatureInterface);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature3 = NULL;
+jmethodID _m_PDDocument__addSignature3 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_addSignature3(jobject self_, jobject sigObject, jobject signatureInterface, jobject options) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature3, "addSignature", "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_addSignature3 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_addSignature3, sigObject, signatureInterface, options);
+JniResult PDDocument__addSignature3(jobject self_,
+                                    jobject sigObject,
+                                    jobject signatureInterface,
+                                    jobject options) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__addSignature3, "addSignature",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+              "PDSignature;Lorg/apache/pdfbox/pdmodel/interactive/"
+              "digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/"
+              "interactive/digitalsignature/SignatureOptions;)V");
+  if (_m_PDDocument__addSignature3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignature3,
+                            sigObject, signatureInterface, options);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_findSignatureField = NULL;
+jmethodID _m_PDDocument__findSignatureField = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_findSignatureField(jobject self_, jobject fieldIterator, jobject sigObject) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_findSignatureField, "findSignatureField", "(Ljava/util/Iterator;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;)Lorg/apache/pdfbox/pdmodel/interactive/form/PDSignatureField;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_findSignatureField == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_findSignatureField, fieldIterator, sigObject);
-    return to_global_ref(_result);
+JniResult PDDocument__findSignatureField(jobject self_,
+                                         jobject fieldIterator,
+                                         jobject sigObject) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__findSignatureField,
+              "findSignatureField",
+              "(Ljava/util/Iterator;Lorg/apache/pdfbox/pdmodel/interactive/"
+              "digitalsignature/PDSignature;)Lorg/apache/pdfbox/pdmodel/"
+              "interactive/form/PDSignatureField;");
+  if (_m_PDDocument__findSignatureField == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__findSignatureField, fieldIterator,
+      sigObject);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureField = NULL;
+jmethodID _m_PDDocument__checkSignatureField = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_pdmodel_PDDocument_checkSignatureField(jobject self_, jobject fieldIterator, jobject signatureField) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureField, "checkSignatureField", "(Ljava/util/Iterator;Lorg/apache/pdfbox/pdmodel/interactive/form/PDSignatureField;)Z");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureField == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureField, fieldIterator, signatureField);
-    return _result;
+JniResult PDDocument__checkSignatureField(jobject self_,
+                                          jobject fieldIterator,
+                                          jobject signatureField) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__checkSignatureField,
+              "checkSignatureField",
+              "(Ljava/util/Iterator;Lorg/apache/pdfbox/pdmodel/interactive/"
+              "form/PDSignatureField;)Z");
+  if (_m_PDDocument__checkSignatureField == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDDocument__checkSignatureField, fieldIterator,
+      signatureField);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureAnnotation = NULL;
+jmethodID _m_PDDocument__checkSignatureAnnotation = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_pdmodel_PDDocument_checkSignatureAnnotation(jobject self_, jobject annotations, jobject widget) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureAnnotation, "checkSignatureAnnotation", "(Ljava/util/List;Lorg/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget;)Z");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureAnnotation == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_checkSignatureAnnotation, annotations, widget);
-    return _result;
+JniResult PDDocument__checkSignatureAnnotation(jobject self_,
+                                               jobject annotations,
+                                               jobject widget) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__checkSignatureAnnotation,
+              "checkSignatureAnnotation",
+              "(Ljava/util/List;Lorg/apache/pdfbox/pdmodel/interactive/"
+              "annotation/PDAnnotationWidget;)Z");
+  if (_m_PDDocument__checkSignatureAnnotation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDDocument__checkSignatureAnnotation, annotations,
+      widget);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_prepareVisibleSignature = NULL;
+jmethodID _m_PDDocument__prepareVisibleSignature = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_prepareVisibleSignature(jobject self_, jobject signatureField, jobject acroForm, jobject visualSignature) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_prepareVisibleSignature, "prepareVisibleSignature", "(Lorg/apache/pdfbox/pdmodel/interactive/form/PDSignatureField;Lorg/apache/pdfbox/pdmodel/interactive/form/PDAcroForm;Lorg/apache/pdfbox/cos/COSDocument;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_prepareVisibleSignature == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_prepareVisibleSignature, signatureField, acroForm, visualSignature);
+JniResult PDDocument__prepareVisibleSignature(jobject self_,
+                                              jobject signatureField,
+                                              jobject acroForm,
+                                              jobject visualSignature) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__prepareVisibleSignature,
+              "prepareVisibleSignature",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/form/"
+              "PDSignatureField;Lorg/apache/pdfbox/pdmodel/interactive/form/"
+              "PDAcroForm;Lorg/apache/pdfbox/cos/COSDocument;)V");
+  if (_m_PDDocument__prepareVisibleSignature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__prepareVisibleSignature,
+                            signatureField, acroForm, visualSignature);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_assignSignatureRectangle = NULL;
+jmethodID _m_PDDocument__assignSignatureRectangle = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_assignSignatureRectangle(jobject self_, jobject signatureField, jobject annotDict) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_assignSignatureRectangle, "assignSignatureRectangle", "(Lorg/apache/pdfbox/pdmodel/interactive/form/PDSignatureField;Lorg/apache/pdfbox/cos/COSDictionary;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_assignSignatureRectangle == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_assignSignatureRectangle, signatureField, annotDict);
+JniResult PDDocument__assignSignatureRectangle(jobject self_,
+                                               jobject signatureField,
+                                               jobject annotDict) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__assignSignatureRectangle,
+              "assignSignatureRectangle",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/form/"
+              "PDSignatureField;Lorg/apache/pdfbox/cos/COSDictionary;)V");
+  if (_m_PDDocument__assignSignatureRectangle == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__assignSignatureRectangle,
+                            signatureField, annotDict);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_assignAppearanceDictionary = NULL;
+jmethodID _m_PDDocument__assignAppearanceDictionary = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_assignAppearanceDictionary(jobject self_, jobject signatureField, jobject apDict) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_assignAppearanceDictionary, "assignAppearanceDictionary", "(Lorg/apache/pdfbox/pdmodel/interactive/form/PDSignatureField;Lorg/apache/pdfbox/cos/COSDictionary;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_assignAppearanceDictionary == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_assignAppearanceDictionary, signatureField, apDict);
+JniResult PDDocument__assignAppearanceDictionary(jobject self_,
+                                                 jobject signatureField,
+                                                 jobject apDict) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__assignAppearanceDictionary,
+              "assignAppearanceDictionary",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/form/"
+              "PDSignatureField;Lorg/apache/pdfbox/cos/COSDictionary;)V");
+  if (_m_PDDocument__assignAppearanceDictionary == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__assignAppearanceDictionary,
+                            signatureField, apDict);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_assignAcroFormDefaultResource = NULL;
+jmethodID _m_PDDocument__assignAcroFormDefaultResource = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_assignAcroFormDefaultResource(jobject self_, jobject acroForm, jobject newDict) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_assignAcroFormDefaultResource, "assignAcroFormDefaultResource", "(Lorg/apache/pdfbox/pdmodel/interactive/form/PDAcroForm;Lorg/apache/pdfbox/cos/COSDictionary;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_assignAcroFormDefaultResource == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_assignAcroFormDefaultResource, acroForm, newDict);
+JniResult PDDocument__assignAcroFormDefaultResource(jobject self_,
+                                                    jobject acroForm,
+                                                    jobject newDict) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__assignAcroFormDefaultResource,
+              "assignAcroFormDefaultResource",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/form/PDAcroForm;Lorg/"
+              "apache/pdfbox/cos/COSDictionary;)V");
+  if (_m_PDDocument__assignAcroFormDefaultResource == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__assignAcroFormDefaultResource,
+                            acroForm, newDict);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_prepareNonVisibleSignature = NULL;
+jmethodID _m_PDDocument__prepareNonVisibleSignature = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_prepareNonVisibleSignature(jobject self_, jobject signatureField) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_prepareNonVisibleSignature, "prepareNonVisibleSignature", "(Lorg/apache/pdfbox/pdmodel/interactive/form/PDSignatureField;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_prepareNonVisibleSignature == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_prepareNonVisibleSignature, signatureField);
+JniResult PDDocument__prepareNonVisibleSignature(jobject self_,
+                                                 jobject signatureField) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_PDDocument, &_m_PDDocument__prepareNonVisibleSignature,
+      "prepareNonVisibleSignature",
+      "(Lorg/apache/pdfbox/pdmodel/interactive/form/PDSignatureField;)V");
+  if (_m_PDDocument__prepareNonVisibleSignature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(
+      jniEnv, self_, _m_PDDocument__prepareNonVisibleSignature, signatureField);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_addSignatureField = NULL;
+jmethodID _m_PDDocument__addSignatureField = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_addSignatureField(jobject self_, jobject sigFields, jobject signatureInterface, jobject options) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_addSignatureField, "addSignatureField", "(Ljava/util/List;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_addSignatureField == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_addSignatureField, sigFields, signatureInterface, options);
+JniResult PDDocument__addSignatureField(jobject self_,
+                                        jobject sigFields,
+                                        jobject signatureInterface,
+                                        jobject options) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__addSignatureField,
+              "addSignatureField",
+              "(Ljava/util/List;Lorg/apache/pdfbox/pdmodel/interactive/"
+              "digitalsignature/SignatureInterface;Lorg/apache/pdfbox/pdmodel/"
+              "interactive/digitalsignature/SignatureOptions;)V");
+  if (_m_PDDocument__addSignatureField == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__addSignatureField,
+                            sigFields, signatureInterface, options);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_removePage = NULL;
+jmethodID _m_PDDocument__removePage = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_removePage(jobject self_, jobject page) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_removePage, "removePage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_removePage == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_removePage, page);
+JniResult PDDocument__removePage(jobject self_, jobject page) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__removePage, "removePage",
+              "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
+  if (_m_PDDocument__removePage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__removePage, page);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_removePage1 = NULL;
+jmethodID _m_PDDocument__removePage1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_removePage1(jobject self_, int32_t pageNumber) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_removePage1, "removePage", "(I)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_removePage1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_removePage1, pageNumber);
+JniResult PDDocument__removePage1(jobject self_, int32_t pageNumber) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__removePage1, "removePage", "(I)V");
+  if (_m_PDDocument__removePage1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__removePage1,
+                            pageNumber);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_importPage = NULL;
+jmethodID _m_PDDocument__importPage = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_importPage(jobject self_, jobject page) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_importPage, "importPage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)Lorg/apache/pdfbox/pdmodel/PDPage;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_importPage == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_importPage, page);
-    return to_global_ref(_result);
+JniResult PDDocument__importPage(jobject self_, jobject page) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_PDDocument, &_m_PDDocument__importPage, "importPage",
+      "(Lorg/apache/pdfbox/pdmodel/PDPage;)Lorg/apache/pdfbox/pdmodel/PDPage;");
+  if (_m_PDDocument__importPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__importPage, page);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getDocument = NULL;
+jmethodID _m_PDDocument__getDocument = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getDocument(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getDocument, "getDocument", "()Lorg/apache/pdfbox/cos/COSDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getDocument == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getDocument);
-    return to_global_ref(_result);
+JniResult PDDocument__getDocument(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getDocument, "getDocument",
+              "()Lorg/apache/pdfbox/cos/COSDocument;");
+  if (_m_PDDocument__getDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getDocument);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentInformation = NULL;
+jmethodID _m_PDDocument__getDocumentInformation = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getDocumentInformation(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentInformation, "getDocumentInformation", "()Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentInformation == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentInformation);
-    return to_global_ref(_result);
+JniResult PDDocument__getDocumentInformation(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getDocumentInformation,
+              "getDocumentInformation",
+              "()Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;");
+  if (_m_PDDocument__getDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getDocumentInformation);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentInformation = NULL;
+jmethodID _m_PDDocument__setDocumentInformation = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_setDocumentInformation(jobject self_, jobject info) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentInformation, "setDocumentInformation", "(Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentInformation == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentInformation, info);
+JniResult PDDocument__setDocumentInformation(jobject self_, jobject info) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__setDocumentInformation,
+              "setDocumentInformation",
+              "(Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;)V");
+  if (_m_PDDocument__setDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__setDocumentInformation, info);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentCatalog = NULL;
+jmethodID _m_PDDocument__getDocumentCatalog = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getDocumentCatalog(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentCatalog, "getDocumentCatalog", "()Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentCatalog == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentCatalog);
-    return to_global_ref(_result);
+JniResult PDDocument__getDocumentCatalog(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getDocumentCatalog,
+              "getDocumentCatalog",
+              "()Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;");
+  if (_m_PDDocument__getDocumentCatalog == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getDocumentCatalog);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_isEncrypted = NULL;
+jmethodID _m_PDDocument__isEncrypted = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_pdmodel_PDDocument_isEncrypted(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_isEncrypted, "isEncrypted", "()Z");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_isEncrypted == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_isEncrypted);
-    return _result;
+JniResult PDDocument__isEncrypted(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__isEncrypted, "isEncrypted", "()Z");
+  if (_m_PDDocument__isEncrypted == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_PDDocument__isEncrypted);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getEncryption = NULL;
+jmethodID _m_PDDocument__getEncryption = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getEncryption(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getEncryption, "getEncryption", "()Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getEncryption == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getEncryption);
-    return to_global_ref(_result);
+JniResult PDDocument__getEncryption(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getEncryption, "getEncryption",
+              "()Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;");
+  if (_m_PDDocument__getEncryption == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getEncryption);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_setEncryptionDictionary = NULL;
+jmethodID _m_PDDocument__setEncryptionDictionary = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_setEncryptionDictionary(jobject self_, jobject encryption) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_setEncryptionDictionary, "setEncryptionDictionary", "(Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_setEncryptionDictionary == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_setEncryptionDictionary, encryption);
+JniResult PDDocument__setEncryptionDictionary(jobject self_,
+                                              jobject encryption) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__setEncryptionDictionary,
+              "setEncryptionDictionary",
+              "(Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;)V");
+  if (_m_PDDocument__setEncryptionDictionary == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__setEncryptionDictionary, encryption);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getLastSignatureDictionary = NULL;
+jmethodID _m_PDDocument__getLastSignatureDictionary = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getLastSignatureDictionary(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getLastSignatureDictionary, "getLastSignatureDictionary", "()Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getLastSignatureDictionary == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getLastSignatureDictionary);
-    return to_global_ref(_result);
+JniResult PDDocument__getLastSignatureDictionary(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_PDDocument, &_m_PDDocument__getLastSignatureDictionary,
+      "getLastSignatureDictionary",
+      "()Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature;");
+  if (_m_PDDocument__getLastSignatureDictionary == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getLastSignatureDictionary);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureFields = NULL;
+jmethodID _m_PDDocument__getSignatureFields = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getSignatureFields(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureFields, "getSignatureFields", "()Ljava/util/List;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureFields == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureFields);
-    return to_global_ref(_result);
+JniResult PDDocument__getSignatureFields(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getSignatureFields,
+              "getSignatureFields", "()Ljava/util/List;");
+  if (_m_PDDocument__getSignatureFields == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getSignatureFields);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureDictionaries = NULL;
+jmethodID _m_PDDocument__getSignatureDictionaries = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getSignatureDictionaries(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureDictionaries, "getSignatureDictionaries", "()Ljava/util/List;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureDictionaries == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getSignatureDictionaries);
-    return to_global_ref(_result);
+JniResult PDDocument__getSignatureDictionaries(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getSignatureDictionaries,
+              "getSignatureDictionaries", "()Ljava/util/List;");
+  if (_m_PDDocument__getSignatureDictionaries == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getSignatureDictionaries);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_registerTrueTypeFontForClosing = NULL;
+jmethodID _m_PDDocument__registerTrueTypeFontForClosing = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_registerTrueTypeFontForClosing(jobject self_, jobject ttf) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_registerTrueTypeFontForClosing, "registerTrueTypeFontForClosing", "(Lorg/apache/fontbox/ttf/TrueTypeFont;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_registerTrueTypeFontForClosing == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_registerTrueTypeFontForClosing, ttf);
+JniResult PDDocument__registerTrueTypeFontForClosing(jobject self_,
+                                                     jobject ttf) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__registerTrueTypeFontForClosing,
+              "registerTrueTypeFontForClosing",
+              "(Lorg/apache/fontbox/ttf/TrueTypeFont;)V");
+  if (_m_PDDocument__registerTrueTypeFontForClosing == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__registerTrueTypeFontForClosing, ttf);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getFontsToSubset = NULL;
+jmethodID _m_PDDocument__getFontsToSubset = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getFontsToSubset(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getFontsToSubset, "getFontsToSubset", "()Ljava/util/Set;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getFontsToSubset == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getFontsToSubset);
-    return to_global_ref(_result);
+JniResult PDDocument__getFontsToSubset(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getFontsToSubset,
+              "getFontsToSubset", "()Ljava/util/Set;");
+  if (_m_PDDocument__getFontsToSubset == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getFontsToSubset);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load = NULL;
+jmethodID _m_PDDocument__load = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load(jobject file) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load, "load", "(Ljava/io/File;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load, file);
-    return to_global_ref(_result);
+JniResult PDDocument__load(jobject file) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_PDDocument, &_m_PDDocument__load, "load",
+                     "(Ljava/io/File;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load, file);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load1 = NULL;
+jmethodID _m_PDDocument__load1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load1(jobject file, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load1, "load", "(Ljava/io/File;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load1, file, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load1(jobject file, jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load1, "load",
+      "(Ljava/io/File;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/"
+      "pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load1, file, memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load2 = NULL;
+jmethodID _m_PDDocument__load2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load2(jobject file, jobject password) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load2, "load", "(Ljava/io/File;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load2, file, password);
-    return to_global_ref(_result);
+JniResult PDDocument__load2(jobject file, jobject password) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_PDDocument, &_m_PDDocument__load2, "load",
+                     "(Ljava/io/File;Ljava/lang/String;)Lorg/apache/pdfbox/"
+                     "pdmodel/PDDocument;");
+  if (_m_PDDocument__load2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load2, file, password);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load3 = NULL;
+jmethodID _m_PDDocument__load3 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load3(jobject file, jobject password, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load3, "load", "(Ljava/io/File;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load3 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load3, file, password, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load3(jobject file,
+                            jobject password,
+                            jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load3, "load",
+      "(Ljava/io/File;Ljava/lang/String;Lorg/apache/pdfbox/io/"
+      "MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load3, file, password,
+      memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load4 = NULL;
+jmethodID _m_PDDocument__load4 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load4(jobject file, jobject password, jobject keyStore, jobject alias) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load4, "load", "(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load4 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load4, file, password, keyStore, alias);
-    return to_global_ref(_result);
+JniResult PDDocument__load4(jobject file,
+                            jobject password,
+                            jobject keyStore,
+                            jobject alias) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load4, "load",
+      "(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/"
+      "String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load4 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load4, file, password, keyStore,
+      alias);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load5 = NULL;
+jmethodID _m_PDDocument__load5 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load5(jobject file, jobject password, jobject keyStore, jobject alias, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load5, "load", "(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load5 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load5, file, password, keyStore, alias, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load5(jobject file,
+                            jobject password,
+                            jobject keyStore,
+                            jobject alias,
+                            jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load5, "load",
+      "(Ljava/io/File;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/"
+      "String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/"
+      "pdmodel/PDDocument;");
+  if (_m_PDDocument__load5 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load5, file, password, keyStore,
+      alias, memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load6 = NULL;
+jmethodID _m_PDDocument__load6 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load6(jobject raFile, jobject password, jobject keyStore, jobject alias, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load6, "load", "(Lorg/apache/pdfbox/io/RandomAccessBufferedFileInputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load6 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load6, raFile, password, keyStore, alias, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load6(jobject raFile,
+                            jobject password,
+                            jobject keyStore,
+                            jobject alias,
+                            jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load6, "load",
+      "(Lorg/apache/pdfbox/io/RandomAccessBufferedFileInputStream;Ljava/lang/"
+      "String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/"
+      "MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load6 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load6, raFile, password, keyStore,
+      alias, memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load7 = NULL;
+jmethodID _m_PDDocument__load7 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load7(jobject input) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load7, "load", "(Ljava/io/InputStream;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load7 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load7, input);
-    return to_global_ref(_result);
+JniResult PDDocument__load7(jobject input) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load7, "load",
+      "(Ljava/io/InputStream;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load7 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load7, input);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load8 = NULL;
+jmethodID _m_PDDocument__load8 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load8(jobject input, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load8, "load", "(Ljava/io/InputStream;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load8 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load8, input, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load8(jobject input, jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load8, "load",
+      "(Ljava/io/InputStream;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/"
+      "apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load8 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load8, input, memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load9 = NULL;
+jmethodID _m_PDDocument__load9 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load9(jobject input, jobject password) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load9, "load", "(Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load9 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load9, input, password);
-    return to_global_ref(_result);
+JniResult PDDocument__load9(jobject input, jobject password) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_PDDocument, &_m_PDDocument__load9, "load",
+                     "(Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/"
+                     "pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load9 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load9, input, password);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load10 = NULL;
+jmethodID _m_PDDocument__load10 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load10(jobject input, jobject password, jobject keyStore, jobject alias) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load10, "load", "(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load10 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load10, input, password, keyStore, alias);
-    return to_global_ref(_result);
+JniResult PDDocument__load10(jobject input,
+                             jobject password,
+                             jobject keyStore,
+                             jobject alias) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load10, "load",
+      "(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/"
+      "String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load10 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load10, input, password, keyStore,
+      alias);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load11 = NULL;
+jmethodID _m_PDDocument__load11 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load11(jobject input, jobject password, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load11, "load", "(Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load11 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load11, input, password, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load11(jobject input,
+                             jobject password,
+                             jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load11, "load",
+      "(Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/"
+      "MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load11 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load11, input, password,
+      memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load12 = NULL;
+jmethodID _m_PDDocument__load12 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load12(jobject input, jobject password, jobject keyStore, jobject alias, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load12, "load", "(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load12 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load12, input, password, keyStore, alias, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load12(jobject input,
+                             jobject password,
+                             jobject keyStore,
+                             jobject alias,
+                             jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load12, "load",
+      "(Ljava/io/InputStream;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/"
+      "String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/"
+      "pdmodel/PDDocument;");
+  if (_m_PDDocument__load12 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load12, input, password, keyStore,
+      alias, memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load13 = NULL;
+jmethodID _m_PDDocument__load13 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load13(jobject input) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load13, "load", "(L[B;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load13 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load13, input);
-    return to_global_ref(_result);
+JniResult PDDocument__load13(jobject input) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_PDDocument, &_m_PDDocument__load13, "load",
+                     "(L[B;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load13 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load13, input);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load14 = NULL;
+jmethodID _m_PDDocument__load14 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load14(jobject input, jobject password) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load14, "load", "(L[B;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load14 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load14, input, password);
-    return to_global_ref(_result);
+JniResult PDDocument__load14(jobject input, jobject password) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDDocument, &_m_PDDocument__load14, "load",
+      "(L[B;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load14 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load14, input, password);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load15 = NULL;
+jmethodID _m_PDDocument__load15 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load15(jobject input, jobject password, jobject keyStore, jobject alias) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load15, "load", "(L[B;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load15 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load15, input, password, keyStore, alias);
-    return to_global_ref(_result);
+JniResult PDDocument__load15(jobject input,
+                             jobject password,
+                             jobject keyStore,
+                             jobject alias) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_PDDocument, &_m_PDDocument__load15, "load",
+                     "(L[B;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/"
+                     "String;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load15 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load15, input, password, keyStore,
+      alias);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_load16 = NULL;
+jmethodID _m_PDDocument__load16 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_load16(jobject input, jobject password, jobject keyStore, jobject alias, jobject memUsageSetting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_load16, "load", "(L[B;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_load16 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _m_org_apache_pdfbox_pdmodel_PDDocument_load16, input, password, keyStore, alias, memUsageSetting);
-    return to_global_ref(_result);
+JniResult PDDocument__load16(jobject input,
+                             jobject password,
+                             jobject keyStore,
+                             jobject alias,
+                             jobject memUsageSetting) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_PDDocument, &_m_PDDocument__load16, "load",
+                     "(L[B;Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/"
+                     "String;Lorg/apache/pdfbox/io/MemoryUsageSetting;)Lorg/"
+                     "apache/pdfbox/pdmodel/PDDocument;");
+  if (_m_PDDocument__load16 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDDocument, _m_PDDocument__load16, input, password, keyStore,
+      alias, memUsageSetting);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_save = NULL;
+jmethodID _m_PDDocument__save = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_save(jobject self_, jobject fileName) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_save, "save", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_save == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_save, fileName);
+JniResult PDDocument__save(jobject self_, jobject fileName) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__save, "save",
+              "(Ljava/lang/String;)V");
+  if (_m_PDDocument__save == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__save, fileName);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_save1 = NULL;
+jmethodID _m_PDDocument__save1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_save1(jobject self_, jobject file) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_save1, "save", "(Ljava/io/File;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_save1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_save1, file);
+JniResult PDDocument__save1(jobject self_, jobject file) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__save1, "save",
+              "(Ljava/io/File;)V");
+  if (_m_PDDocument__save1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__save1, file);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_save2 = NULL;
+jmethodID _m_PDDocument__save2 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_save2(jobject self_, jobject output) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_save2, "save", "(Ljava/io/OutputStream;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_save2 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_save2, output);
+JniResult PDDocument__save2(jobject self_, jobject output) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__save2, "save",
+              "(Ljava/io/OutputStream;)V");
+  if (_m_PDDocument__save2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__save2, output);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental = NULL;
+jmethodID _m_PDDocument__saveIncremental = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_saveIncremental(jobject self_, jobject output) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental, "saveIncremental", "(Ljava/io/OutputStream;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental, output);
+JniResult PDDocument__saveIncremental(jobject self_, jobject output) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__saveIncremental, "saveIncremental",
+              "(Ljava/io/OutputStream;)V");
+  if (_m_PDDocument__saveIncremental == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__saveIncremental,
+                            output);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental1 = NULL;
+jmethodID _m_PDDocument__saveIncremental1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_saveIncremental1(jobject self_, jobject output, jobject objectsToWrite) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental1, "saveIncremental", "(Ljava/io/OutputStream;Ljava/util/Set;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_saveIncremental1, output, objectsToWrite);
+JniResult PDDocument__saveIncremental1(jobject self_,
+                                       jobject output,
+                                       jobject objectsToWrite) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__saveIncremental1,
+              "saveIncremental", "(Ljava/io/OutputStream;Ljava/util/Set;)V");
+  if (_m_PDDocument__saveIncremental1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__saveIncremental1,
+                            output, objectsToWrite);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_saveIncrementalForExternalSigning = NULL;
+jmethodID _m_PDDocument__saveIncrementalForExternalSigning = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_saveIncrementalForExternalSigning(jobject self_, jobject output) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_saveIncrementalForExternalSigning, "saveIncrementalForExternalSigning", "(Ljava/io/OutputStream;)Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/ExternalSigningSupport;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_saveIncrementalForExternalSigning == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_saveIncrementalForExternalSigning, output);
-    return to_global_ref(_result);
+JniResult PDDocument__saveIncrementalForExternalSigning(jobject self_,
+                                                        jobject output) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__saveIncrementalForExternalSigning,
+              "saveIncrementalForExternalSigning",
+              "(Ljava/io/OutputStream;)Lorg/apache/pdfbox/pdmodel/interactive/"
+              "digitalsignature/ExternalSigningSupport;");
+  if (_m_PDDocument__saveIncrementalForExternalSigning == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__saveIncrementalForExternalSigning, output);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getPage = NULL;
+jmethodID _m_PDDocument__getPage = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getPage(jobject self_, int32_t pageIndex) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getPage, "getPage", "(I)Lorg/apache/pdfbox/pdmodel/PDPage;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getPage == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getPage, pageIndex);
-    return to_global_ref(_result);
+JniResult PDDocument__getPage(jobject self_, int32_t pageIndex) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getPage, "getPage",
+              "(I)Lorg/apache/pdfbox/pdmodel/PDPage;");
+  if (_m_PDDocument__getPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getPage, pageIndex);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getPages = NULL;
+jmethodID _m_PDDocument__getPages = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getPages(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getPages, "getPages", "()Lorg/apache/pdfbox/pdmodel/PDPageTree;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getPages == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getPages);
-    return to_global_ref(_result);
+JniResult PDDocument__getPages(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getPages, "getPages",
+              "()Lorg/apache/pdfbox/pdmodel/PDPageTree;");
+  if (_m_PDDocument__getPages == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getPages);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getNumberOfPages = NULL;
+jmethodID _m_PDDocument__getNumberOfPages = NULL;
 FFI_PLUGIN_EXPORT
-int32_t org_apache_pdfbox_pdmodel_PDDocument_getNumberOfPages(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (int32_t)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getNumberOfPages, "getNumberOfPages", "()I");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getNumberOfPages == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getNumberOfPages);
-    return _result;
+JniResult PDDocument__getNumberOfPages(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getNumberOfPages,
+              "getNumberOfPages", "()I");
+  if (_m_PDDocument__getNumberOfPages == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_PDDocument__getNumberOfPages);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_close = NULL;
+jmethodID _m_PDDocument__close = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_close(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_close, "close", "()V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_close == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_close);
+JniResult PDDocument__close(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__close, "close", "()V");
+  if (_m_PDDocument__close == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__close);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_protect = NULL;
+jmethodID _m_PDDocument__protect = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_protect(jobject self_, jobject policy) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_protect, "protect", "(Lorg/apache/pdfbox/pdmodel/encryption/ProtectionPolicy;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_protect == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_protect, policy);
+JniResult PDDocument__protect(jobject self_, jobject policy) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__protect, "protect",
+              "(Lorg/apache/pdfbox/pdmodel/encryption/ProtectionPolicy;)V");
+  if (_m_PDDocument__protect == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__protect, policy);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getCurrentAccessPermission = NULL;
+jmethodID _m_PDDocument__getCurrentAccessPermission = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getCurrentAccessPermission(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getCurrentAccessPermission, "getCurrentAccessPermission", "()Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getCurrentAccessPermission == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getCurrentAccessPermission);
-    return to_global_ref(_result);
+JniResult PDDocument__getCurrentAccessPermission(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getCurrentAccessPermission,
+              "getCurrentAccessPermission",
+              "()Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;");
+  if (_m_PDDocument__getCurrentAccessPermission == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getCurrentAccessPermission);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_isAllSecurityToBeRemoved = NULL;
+jmethodID _m_PDDocument__isAllSecurityToBeRemoved = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_pdmodel_PDDocument_isAllSecurityToBeRemoved(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_isAllSecurityToBeRemoved, "isAllSecurityToBeRemoved", "()Z");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_isAllSecurityToBeRemoved == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_isAllSecurityToBeRemoved);
-    return _result;
+JniResult PDDocument__isAllSecurityToBeRemoved(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__isAllSecurityToBeRemoved,
+              "isAllSecurityToBeRemoved", "()Z");
+  if (_m_PDDocument__isAllSecurityToBeRemoved == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDDocument__isAllSecurityToBeRemoved);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_setAllSecurityToBeRemoved = NULL;
+jmethodID _m_PDDocument__setAllSecurityToBeRemoved = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_setAllSecurityToBeRemoved(jobject self_, uint8_t removeAllSecurity) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_setAllSecurityToBeRemoved, "setAllSecurityToBeRemoved", "(Z)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_setAllSecurityToBeRemoved == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_setAllSecurityToBeRemoved, removeAllSecurity);
+JniResult PDDocument__setAllSecurityToBeRemoved(jobject self_,
+                                                uint8_t removeAllSecurity) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__setAllSecurityToBeRemoved,
+              "setAllSecurityToBeRemoved", "(Z)V");
+  if (_m_PDDocument__setAllSecurityToBeRemoved == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocument__setAllSecurityToBeRemoved,
+                            removeAllSecurity);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentId = NULL;
+jmethodID _m_PDDocument__getDocumentId = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getDocumentId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentId, "getDocumentId", "()Ljava/lang/Long;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentId == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getDocumentId);
-    return to_global_ref(_result);
+JniResult PDDocument__getDocumentId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getDocumentId, "getDocumentId",
+              "()Ljava/lang/Long;");
+  if (_m_PDDocument__getDocumentId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDDocument__getDocumentId);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentId = NULL;
+jmethodID _m_PDDocument__setDocumentId = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_setDocumentId(jobject self_, jobject docId) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentId, "setDocumentId", "(Ljava/lang/Long;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentId == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_setDocumentId, docId);
+JniResult PDDocument__setDocumentId(jobject self_, jobject docId) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__setDocumentId, "setDocumentId",
+              "(Ljava/lang/Long;)V");
+  if (_m_PDDocument__setDocumentId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__setDocumentId, docId);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getVersion = NULL;
+jmethodID _m_PDDocument__getVersion = NULL;
 FFI_PLUGIN_EXPORT
-float org_apache_pdfbox_pdmodel_PDDocument_getVersion(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (float)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getVersion, "getVersion", "()F");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getVersion == NULL) return (float)0;
-    float _result = (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getVersion);
-    return _result;
+JniResult PDDocument__getVersion(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getVersion, "getVersion", "()F");
+  if (_m_PDDocument__getVersion == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  float _result =
+      (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_PDDocument__getVersion);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_setVersion = NULL;
+jmethodID _m_PDDocument__setVersion = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_setVersion(jobject self_, float newVersion) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_setVersion, "setVersion", "(F)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_setVersion == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_setVersion, newVersion);
+JniResult PDDocument__setVersion(jobject self_, float newVersion) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__setVersion, "setVersion", "(F)V");
+  if (_m_PDDocument__setVersion == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__setVersion,
+                            newVersion);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_getResourceCache = NULL;
+jmethodID _m_PDDocument__getResourceCache = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocument_getResourceCache(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_getResourceCache, "getResourceCache", "()Lorg/apache/pdfbox/pdmodel/ResourceCache;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_getResourceCache == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_getResourceCache);
-    return to_global_ref(_result);
+JniResult PDDocument__getResourceCache(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__getResourceCache,
+              "getResourceCache",
+              "()Lorg/apache/pdfbox/pdmodel/ResourceCache;");
+  if (_m_PDDocument__getResourceCache == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocument__getResourceCache);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocument_setResourceCache = NULL;
+jmethodID _m_PDDocument__setResourceCache = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocument_setResourceCache(jobject self_, jobject resourceCache) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocument, &_m_org_apache_pdfbox_pdmodel_PDDocument_setResourceCache, "setResourceCache", "(Lorg/apache/pdfbox/pdmodel/ResourceCache;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocument_setResourceCache == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocument_setResourceCache, resourceCache);
+JniResult PDDocument__setResourceCache(jobject self_, jobject resourceCache) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocument, &_m_PDDocument__setResourceCache,
+              "setResourceCache",
+              "(Lorg/apache/pdfbox/pdmodel/ResourceCache;)V");
+  if (_m_PDDocument__setResourceCache == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocument__setResourceCache,
+                            resourceCache);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_RESERVE_BYTE_RANGE = NULL;
+jfieldID _f_PDDocument__RESERVE_BYTE_RANGE = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_RESERVE_BYTE_RANGE() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_RESERVE_BYTE_RANGE, "RESERVE_BYTE_RANGE","L[I;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _f_org_apache_pdfbox_pdmodel_PDDocument_RESERVE_BYTE_RANGE));
+JniResult get_PDDocument__RESERVE_BYTE_RANGE() {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDDocument, &_f_PDDocument__RESERVE_BYTE_RANGE,
+                    "RESERVE_BYTE_RANGE", "L[I;");
+  jobject _result = to_global_ref((*jniEnv)->GetStaticObjectField(
+      jniEnv, _c_PDDocument, _f_PDDocument__RESERVE_BYTE_RANGE));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_LOG = NULL;
+jfieldID _f_PDDocument__LOG = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_LOG() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_static_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_LOG, "LOG","Lorg/apache/commons/logging/Log;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocument, _f_org_apache_pdfbox_pdmodel_PDDocument_LOG));
+JniResult get_PDDocument__LOG() {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDDocument, &_f_PDDocument__LOG, "LOG",
+                    "Lorg/apache/commons/logging/Log;");
+  jobject _result = to_global_ref((*jniEnv)->GetStaticObjectField(
+      jniEnv, _c_PDDocument, _f_PDDocument__LOG));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_document = NULL;
+jfieldID _f_PDDocument__document = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_document(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_document, "document","Lorg/apache/pdfbox/cos/COSDocument;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_document));
+JniResult get_PDDocument__document(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__document, "document",
+             "Lorg/apache/pdfbox/cos/COSDocument;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__document));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_documentInformation = NULL;
+jfieldID _f_PDDocument__documentInformation = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_documentInformation(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_documentInformation, "documentInformation","Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_documentInformation));
+JniResult get_PDDocument__documentInformation(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__documentInformation,
+             "documentInformation",
+             "Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDDocument__documentInformation));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_documentInformation(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_documentInformation, "documentInformation","Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_documentInformation, value));
+JniResult set_PDDocument__documentInformation(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__documentInformation,
+             "documentInformation",
+             "Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__documentInformation,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog = NULL;
+jfieldID _f_PDDocument__documentCatalog = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog, "documentCatalog","Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog));
+JniResult get_PDDocument__documentCatalog(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__documentCatalog, "documentCatalog",
+             "Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__documentCatalog));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog, "documentCatalog","Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_documentCatalog, value));
+JniResult set_PDDocument__documentCatalog(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__documentCatalog, "documentCatalog",
+             "Lorg/apache/pdfbox/pdmodel/PDDocumentCatalog;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__documentCatalog,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_encryption = NULL;
+jfieldID _f_PDDocument__encryption = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_encryption(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_encryption, "encryption","Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_encryption));
+JniResult get_PDDocument__encryption(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__encryption, "encryption",
+             "Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__encryption));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_encryption(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_encryption, "encryption","Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_encryption, value));
+JniResult set_PDDocument__encryption(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__encryption, "encryption",
+             "Lorg/apache/pdfbox/pdmodel/encryption/PDEncryption;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__encryption, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved = NULL;
+jfieldID _f_PDDocument__allSecurityToBeRemoved = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (uint8_t)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved, "allSecurityToBeRemoved","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved));
+JniResult get_PDDocument__allSecurityToBeRemoved(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__allSecurityToBeRemoved,
+             "allSecurityToBeRemoved", "Z");
+  uint8_t _result = (*jniEnv)->GetBooleanField(
+      jniEnv, self_, _f_PDDocument__allSecurityToBeRemoved);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved, "allSecurityToBeRemoved","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_allSecurityToBeRemoved, value));
+JniResult set_PDDocument__allSecurityToBeRemoved(jobject self_, uint8_t value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__allSecurityToBeRemoved,
+             "allSecurityToBeRemoved", "Z");
+  (*jniEnv)->SetBooleanField(jniEnv, self_,
+                             _f_PDDocument__allSecurityToBeRemoved, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_documentId = NULL;
+jfieldID _f_PDDocument__documentId = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_documentId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_documentId, "documentId","Ljava/lang/Long;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_documentId));
+JniResult get_PDDocument__documentId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__documentId, "documentId",
+             "Ljava/lang/Long;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__documentId));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_documentId(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_documentId, "documentId","Ljava/lang/Long;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_documentId, value));
+JniResult set_PDDocument__documentId(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__documentId, "documentId",
+             "Ljava/lang/Long;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__documentId, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_pdfSource = NULL;
+jfieldID _f_PDDocument__pdfSource = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_pdfSource(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_pdfSource, "pdfSource","Lorg/apache/pdfbox/io/RandomAccessRead;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_pdfSource));
+JniResult get_PDDocument__pdfSource(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__pdfSource, "pdfSource",
+             "Lorg/apache/pdfbox/io/RandomAccessRead;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__pdfSource));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_accessPermission = NULL;
+jfieldID _f_PDDocument__accessPermission = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_accessPermission(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_accessPermission, "accessPermission","Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_accessPermission));
+JniResult get_PDDocument__accessPermission(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__accessPermission,
+             "accessPermission",
+             "Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDDocument__accessPermission));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_accessPermission(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_accessPermission, "accessPermission","Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_accessPermission, value));
+JniResult set_PDDocument__accessPermission(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__accessPermission,
+             "accessPermission",
+             "Lorg/apache/pdfbox/pdmodel/encryption/AccessPermission;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__accessPermission,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_fontsToSubset = NULL;
+jfieldID _f_PDDocument__fontsToSubset = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_fontsToSubset(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_fontsToSubset, "fontsToSubset","Ljava/util/Set;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_fontsToSubset));
+JniResult get_PDDocument__fontsToSubset(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__fontsToSubset, "fontsToSubset",
+             "Ljava/util/Set;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__fontsToSubset));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_fontsToClose = NULL;
+jfieldID _f_PDDocument__fontsToClose = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_fontsToClose(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_fontsToClose, "fontsToClose","Ljava/util/Set;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_fontsToClose));
+JniResult get_PDDocument__fontsToClose(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__fontsToClose, "fontsToClose",
+             "Ljava/util/Set;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__fontsToClose));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_signInterface = NULL;
+jfieldID _f_PDDocument__signInterface = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_signInterface(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_signInterface, "signInterface","Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_signInterface));
+JniResult get_PDDocument__signInterface(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__signInterface, "signInterface",
+             "Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+             "SignatureInterface;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__signInterface));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_signInterface(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_signInterface, "signInterface","Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureInterface;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_signInterface, value));
+JniResult set_PDDocument__signInterface(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__signInterface, "signInterface",
+             "Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+             "SignatureInterface;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__signInterface, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_signingSupport = NULL;
+jfieldID _f_PDDocument__signingSupport = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_signingSupport(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_signingSupport, "signingSupport","Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SigningSupport;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_signingSupport));
+JniResult get_PDDocument__signingSupport(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__signingSupport, "signingSupport",
+             "Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+             "SigningSupport;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__signingSupport));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_signingSupport(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_signingSupport, "signingSupport","Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/SigningSupport;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_signingSupport, value));
+JniResult set_PDDocument__signingSupport(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__signingSupport, "signingSupport",
+             "Lorg/apache/pdfbox/pdmodel/interactive/digitalsignature/"
+             "SigningSupport;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__signingSupport,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_resourceCache = NULL;
+jfieldID _f_PDDocument__resourceCache = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocument_resourceCache(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_resourceCache, "resourceCache","Lorg/apache/pdfbox/pdmodel/ResourceCache;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_resourceCache));
+JniResult get_PDDocument__resourceCache(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__resourceCache, "resourceCache",
+             "Lorg/apache/pdfbox/pdmodel/ResourceCache;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocument__resourceCache));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_resourceCache(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_resourceCache, "resourceCache","Lorg/apache/pdfbox/pdmodel/ResourceCache;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_resourceCache, value));
+JniResult set_PDDocument__resourceCache(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__resourceCache, "resourceCache",
+             "Lorg/apache/pdfbox/pdmodel/ResourceCache;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDDocument__resourceCache, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded = NULL;
+jfieldID _f_PDDocument__signatureAdded = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (uint8_t)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded, "signatureAdded","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded));
+JniResult get_PDDocument__signatureAdded(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__signatureAdded, "signatureAdded",
+             "Z");
+  uint8_t _result =
+      (*jniEnv)->GetBooleanField(jniEnv, self_, _f_PDDocument__signatureAdded);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocument == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocument, &_f_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded, "signatureAdded","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocument_signatureAdded, value));
+JniResult set_PDDocument__signatureAdded(jobject self_, uint8_t value) {
+  load_env();
+  load_class_gr(&_c_PDDocument, "org/apache/pdfbox/pdmodel/PDDocument");
+  if (_c_PDDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocument, &_f_PDDocument__signatureAdded, "signatureAdded",
+             "Z");
+  (*jniEnv)->SetBooleanField(jniEnv, self_, _f_PDDocument__signatureAdded,
+                             value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
 // org.apache.pdfbox.pdmodel.PDDocumentInformation
-jclass _c_org_apache_pdfbox_pdmodel_PDDocumentInformation = NULL;
+jclass _c_PDDocumentInformation = NULL;
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor = NULL;
+jmethodID _m_PDDocumentInformation__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor, "<init>", "()V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocumentInformation, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__ctor() {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__ctor,
+              "<init>", "()V");
+  if (_m_PDDocumentInformation__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocumentInformation,
+                                         _m_PDDocumentInformation__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor1 = NULL;
+jmethodID _m_PDDocumentInformation__ctor1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor1(jobject dic) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor1, "<init>", "(Lorg/apache/pdfbox/cos/COSDictionary;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_pdmodel_PDDocumentInformation, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_ctor1, dic);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__ctor1(jobject dic) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__ctor1,
+              "<init>", "(Lorg/apache/pdfbox/cos/COSDictionary;)V");
+  if (_m_PDDocumentInformation__ctor1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDDocumentInformation,
+                                         _m_PDDocumentInformation__ctor1, dic);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCOSObject = NULL;
+jmethodID _m_PDDocumentInformation__getCOSObject = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getCOSObject(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCOSObject, "getCOSObject", "()Lorg/apache/pdfbox/cos/COSDictionary;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCOSObject == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCOSObject);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getCOSObject(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getCOSObject,
+              "getCOSObject", "()Lorg/apache/pdfbox/cos/COSDictionary;");
+  if (_m_PDDocumentInformation__getCOSObject == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getCOSObject);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getPropertyStringValue = NULL;
+jmethodID _m_PDDocumentInformation__getPropertyStringValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getPropertyStringValue(jobject self_, jobject propertyKey) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getPropertyStringValue, "getPropertyStringValue", "(Ljava/lang/String;)Ljava/lang/Object;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getPropertyStringValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getPropertyStringValue, propertyKey);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getPropertyStringValue(jobject self_,
+                                                        jobject propertyKey) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__getPropertyStringValue,
+              "getPropertyStringValue",
+              "(Ljava/lang/String;)Ljava/lang/Object;");
+  if (_m_PDDocumentInformation__getPropertyStringValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getPropertyStringValue,
+      propertyKey);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTitle = NULL;
+jmethodID _m_PDDocumentInformation__getTitle = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getTitle(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTitle, "getTitle", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTitle == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTitle);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getTitle(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getTitle,
+              "getTitle", "()Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getTitle == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getTitle);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTitle = NULL;
+jmethodID _m_PDDocumentInformation__setTitle = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setTitle(jobject self_, jobject title) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTitle, "setTitle", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTitle == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTitle, title);
+JniResult PDDocumentInformation__setTitle(jobject self_, jobject title) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setTitle,
+              "setTitle", "(Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setTitle == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setTitle,
+                            title);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getAuthor = NULL;
+jmethodID _m_PDDocumentInformation__getAuthor = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getAuthor(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getAuthor, "getAuthor", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getAuthor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getAuthor);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getAuthor(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getAuthor,
+              "getAuthor", "()Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getAuthor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getAuthor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setAuthor = NULL;
+jmethodID _m_PDDocumentInformation__setAuthor = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setAuthor(jobject self_, jobject author) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setAuthor, "setAuthor", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setAuthor == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setAuthor, author);
+JniResult PDDocumentInformation__setAuthor(jobject self_, jobject author) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setAuthor,
+              "setAuthor", "(Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setAuthor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setAuthor,
+                            author);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getSubject = NULL;
+jmethodID _m_PDDocumentInformation__getSubject = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getSubject(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getSubject, "getSubject", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getSubject == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getSubject);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getSubject(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getSubject,
+              "getSubject", "()Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getSubject == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getSubject);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setSubject = NULL;
+jmethodID _m_PDDocumentInformation__setSubject = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setSubject(jobject self_, jobject subject) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setSubject, "setSubject", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setSubject == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setSubject, subject);
+JniResult PDDocumentInformation__setSubject(jobject self_, jobject subject) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setSubject,
+              "setSubject", "(Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setSubject == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setSubject,
+                            subject);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getKeywords = NULL;
+jmethodID _m_PDDocumentInformation__getKeywords = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getKeywords(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getKeywords, "getKeywords", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getKeywords == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getKeywords);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getKeywords(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getKeywords,
+              "getKeywords", "()Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getKeywords == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getKeywords);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setKeywords = NULL;
+jmethodID _m_PDDocumentInformation__setKeywords = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setKeywords(jobject self_, jobject keywords) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setKeywords, "setKeywords", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setKeywords == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setKeywords, keywords);
+JniResult PDDocumentInformation__setKeywords(jobject self_, jobject keywords) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setKeywords,
+              "setKeywords", "(Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setKeywords == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocumentInformation__setKeywords, keywords);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreator = NULL;
+jmethodID _m_PDDocumentInformation__getCreator = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreator, "getCreator", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreator);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getCreator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getCreator,
+              "getCreator", "()Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getCreator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getCreator);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreator = NULL;
+jmethodID _m_PDDocumentInformation__setCreator = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreator(jobject self_, jobject creator) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreator, "setCreator", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreator == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreator, creator);
+JniResult PDDocumentInformation__setCreator(jobject self_, jobject creator) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setCreator,
+              "setCreator", "(Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setCreator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setCreator,
+                            creator);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getProducer = NULL;
+jmethodID _m_PDDocumentInformation__getProducer = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getProducer(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getProducer, "getProducer", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getProducer == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getProducer);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getProducer(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getProducer,
+              "getProducer", "()Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getProducer == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getProducer);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setProducer = NULL;
+jmethodID _m_PDDocumentInformation__setProducer = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setProducer(jobject self_, jobject producer) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setProducer, "setProducer", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setProducer == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setProducer, producer);
+JniResult PDDocumentInformation__setProducer(jobject self_, jobject producer) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setProducer,
+              "setProducer", "(Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setProducer == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocumentInformation__setProducer, producer);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreationDate = NULL;
+jmethodID _m_PDDocumentInformation__getCreationDate = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreationDate(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreationDate, "getCreationDate", "()Ljava/util/Calendar;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreationDate == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCreationDate);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getCreationDate(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__getCreationDate, "getCreationDate",
+              "()Ljava/util/Calendar;");
+  if (_m_PDDocumentInformation__getCreationDate == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getCreationDate);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreationDate = NULL;
+jmethodID _m_PDDocumentInformation__setCreationDate = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreationDate(jobject self_, jobject date) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreationDate, "setCreationDate", "(Ljava/util/Calendar;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreationDate == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCreationDate, date);
+JniResult PDDocumentInformation__setCreationDate(jobject self_, jobject date) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__setCreationDate, "setCreationDate",
+              "(Ljava/util/Calendar;)V");
+  if (_m_PDDocumentInformation__setCreationDate == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocumentInformation__setCreationDate, date);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getModificationDate = NULL;
+jmethodID _m_PDDocumentInformation__getModificationDate = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getModificationDate(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getModificationDate, "getModificationDate", "()Ljava/util/Calendar;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getModificationDate == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getModificationDate);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getModificationDate(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__getModificationDate,
+              "getModificationDate", "()Ljava/util/Calendar;");
+  if (_m_PDDocumentInformation__getModificationDate == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getModificationDate);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setModificationDate = NULL;
+jmethodID _m_PDDocumentInformation__setModificationDate = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setModificationDate(jobject self_, jobject date) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setModificationDate, "setModificationDate", "(Ljava/util/Calendar;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setModificationDate == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setModificationDate, date);
+JniResult PDDocumentInformation__setModificationDate(jobject self_,
+                                                     jobject date) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__setModificationDate,
+              "setModificationDate", "(Ljava/util/Calendar;)V");
+  if (_m_PDDocumentInformation__setModificationDate == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(
+      jniEnv, self_, _m_PDDocumentInformation__setModificationDate, date);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTrapped = NULL;
+jmethodID _m_PDDocumentInformation__getTrapped = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getTrapped(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTrapped, "getTrapped", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTrapped == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getTrapped);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getTrapped(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__getTrapped,
+              "getTrapped", "()Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getTrapped == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getTrapped);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getMetadataKeys = NULL;
+jmethodID _m_PDDocumentInformation__getMetadataKeys = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getMetadataKeys(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getMetadataKeys, "getMetadataKeys", "()Ljava/util/Set;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getMetadataKeys == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getMetadataKeys);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getMetadataKeys(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__getMetadataKeys, "getMetadataKeys",
+              "()Ljava/util/Set;");
+  if (_m_PDDocumentInformation__getMetadataKeys == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getMetadataKeys);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCustomMetadataValue = NULL;
+jmethodID _m_PDDocumentInformation__getCustomMetadataValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_pdmodel_PDDocumentInformation_getCustomMetadataValue(jobject self_, jobject fieldName) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCustomMetadataValue, "getCustomMetadataValue", "(Ljava/lang/String;)Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCustomMetadataValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_getCustomMetadataValue, fieldName);
-    return to_global_ref(_result);
+JniResult PDDocumentInformation__getCustomMetadataValue(jobject self_,
+                                                        jobject fieldName) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__getCustomMetadataValue,
+              "getCustomMetadataValue",
+              "(Ljava/lang/String;)Ljava/lang/String;");
+  if (_m_PDDocumentInformation__getCustomMetadataValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDDocumentInformation__getCustomMetadataValue,
+      fieldName);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCustomMetadataValue = NULL;
+jmethodID _m_PDDocumentInformation__setCustomMetadataValue = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setCustomMetadataValue(jobject self_, jobject fieldName, jobject fieldValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCustomMetadataValue, "setCustomMetadataValue", "(Ljava/lang/String;Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCustomMetadataValue == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setCustomMetadataValue, fieldName, fieldValue);
+JniResult PDDocumentInformation__setCustomMetadataValue(jobject self_,
+                                                        jobject fieldName,
+                                                        jobject fieldValue) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation,
+              &_m_PDDocumentInformation__setCustomMetadataValue,
+              "setCustomMetadataValue",
+              "(Ljava/lang/String;Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setCustomMetadataValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDDocumentInformation__setCustomMetadataValue,
+                            fieldName, fieldValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTrapped = NULL;
+jmethodID _m_PDDocumentInformation__setTrapped = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_pdmodel_PDDocumentInformation_setTrapped(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTrapped, "setTrapped", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTrapped == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_pdmodel_PDDocumentInformation_setTrapped, value);
+JniResult PDDocumentInformation__setTrapped(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDDocumentInformation, &_m_PDDocumentInformation__setTrapped,
+              "setTrapped", "(Ljava/lang/String;)V");
+  if (_m_PDDocumentInformation__setTrapped == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDDocumentInformation__setTrapped,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jfieldID _f_org_apache_pdfbox_pdmodel_PDDocumentInformation_info = NULL;
+jfieldID _f_PDDocumentInformation__info = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_pdmodel_PDDocumentInformation_info(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, "org/apache/pdfbox/pdmodel/PDDocumentInformation");
-    if (_c_org_apache_pdfbox_pdmodel_PDDocumentInformation == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_pdmodel_PDDocumentInformation, &_f_org_apache_pdfbox_pdmodel_PDDocumentInformation_info, "info","Lorg/apache/pdfbox/cos/COSDictionary;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_pdmodel_PDDocumentInformation_info));
+JniResult get_PDDocumentInformation__info(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDDocumentInformation,
+                "org/apache/pdfbox/pdmodel/PDDocumentInformation");
+  if (_c_PDDocumentInformation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDDocumentInformation, &_f_PDDocumentInformation__info, "info",
+             "Lorg/apache/pdfbox/cos/COSDictionary;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDDocumentInformation__info));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
 // org.apache.pdfbox.text.PDFTextStripper
-jclass _c_org_apache_pdfbox_text_PDFTextStripper = NULL;
+jclass _c_PDFTextStripper = NULL;
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_ctor = NULL;
+jmethodID _m_PDFTextStripper__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_ctor() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_ctor, "<init>", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _m_org_apache_pdfbox_text_PDFTextStripper_ctor);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__ctor() {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__ctor, "<init>", "()V");
+  if (_m_PDFTextStripper__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_PDFTextStripper,
+                                         _m_PDFTextStripper__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getText = NULL;
+jmethodID _m_PDFTextStripper__getText = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getText(jobject self_, jobject doc) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getText, "getText", "(Lorg/apache/pdfbox/pdmodel/PDDocument;)Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getText == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getText, doc);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getText(jobject self_, jobject doc) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getText, "getText",
+              "(Lorg/apache/pdfbox/pdmodel/PDDocument;)Ljava/lang/String;");
+  if (_m_PDFTextStripper__getText == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getText, doc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_resetEngine = NULL;
+jmethodID _m_PDFTextStripper__resetEngine = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_resetEngine(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_resetEngine, "resetEngine", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_resetEngine == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_resetEngine);
+JniResult PDFTextStripper__resetEngine(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__resetEngine,
+              "resetEngine", "()V");
+  if (_m_PDFTextStripper__resetEngine == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__resetEngine);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeText = NULL;
+jmethodID _m_PDFTextStripper__writeText = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeText(jobject self_, jobject doc, jobject outputStream) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeText, "writeText", "(Lorg/apache/pdfbox/pdmodel/PDDocument;Ljava/io/Writer;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeText == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeText, doc, outputStream);
+JniResult PDFTextStripper__writeText(jobject self_,
+                                     jobject doc,
+                                     jobject outputStream) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeText, "writeText",
+              "(Lorg/apache/pdfbox/pdmodel/PDDocument;Ljava/io/Writer;)V");
+  if (_m_PDFTextStripper__writeText == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeText, doc,
+                            outputStream);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_processPages = NULL;
+jmethodID _m_PDFTextStripper__processPages = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_processPages(jobject self_, jobject pages) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_processPages, "processPages", "(Lorg/apache/pdfbox/pdmodel/PDPageTree;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_processPages == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_processPages, pages);
+JniResult PDFTextStripper__processPages(jobject self_, jobject pages) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__processPages,
+              "processPages", "(Lorg/apache/pdfbox/pdmodel/PDPageTree;)V");
+  if (_m_PDFTextStripper__processPages == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__processPages,
+                            pages);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_startDocument = NULL;
+jmethodID _m_PDFTextStripper__startDocument = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_startDocument(jobject self_, jobject document) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_startDocument, "startDocument", "(Lorg/apache/pdfbox/pdmodel/PDDocument;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_startDocument == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_startDocument, document);
+JniResult PDFTextStripper__startDocument(jobject self_, jobject document) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startDocument,
+              "startDocument", "(Lorg/apache/pdfbox/pdmodel/PDDocument;)V");
+  if (_m_PDFTextStripper__startDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startDocument,
+                            document);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_endDocument = NULL;
+jmethodID _m_PDFTextStripper__endDocument = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_endDocument(jobject self_, jobject document) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_endDocument, "endDocument", "(Lorg/apache/pdfbox/pdmodel/PDDocument;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_endDocument == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_endDocument, document);
+JniResult PDFTextStripper__endDocument(jobject self_, jobject document) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__endDocument,
+              "endDocument", "(Lorg/apache/pdfbox/pdmodel/PDDocument;)V");
+  if (_m_PDFTextStripper__endDocument == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__endDocument,
+                            document);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_processPage = NULL;
+jmethodID _m_PDFTextStripper__processPage = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_processPage(jobject self_, jobject page) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_processPage, "processPage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_processPage == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_processPage, page);
+JniResult PDFTextStripper__processPage(jobject self_, jobject page) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__processPage,
+              "processPage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
+  if (_m_PDFTextStripper__processPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__processPage,
+                            page);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_fillBeadRectangles = NULL;
+jmethodID _m_PDFTextStripper__fillBeadRectangles = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_fillBeadRectangles(jobject self_, jobject page) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_fillBeadRectangles, "fillBeadRectangles", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_fillBeadRectangles == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_fillBeadRectangles, page);
+JniResult PDFTextStripper__fillBeadRectangles(jobject self_, jobject page) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__fillBeadRectangles,
+              "fillBeadRectangles", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
+  if (_m_PDFTextStripper__fillBeadRectangles == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__fillBeadRectangles, page);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_startArticle = NULL;
+jmethodID _m_PDFTextStripper__startArticle = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_startArticle(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_startArticle, "startArticle", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_startArticle == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_startArticle);
+JniResult PDFTextStripper__startArticle(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startArticle,
+              "startArticle", "()V");
+  if (_m_PDFTextStripper__startArticle == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startArticle);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_startArticle1 = NULL;
+jmethodID _m_PDFTextStripper__startArticle1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_startArticle1(jobject self_, uint8_t isLTR) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_startArticle1, "startArticle", "(Z)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_startArticle1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_startArticle1, isLTR);
+JniResult PDFTextStripper__startArticle1(jobject self_, uint8_t isLTR) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startArticle1,
+              "startArticle", "(Z)V");
+  if (_m_PDFTextStripper__startArticle1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startArticle1,
+                            isLTR);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_endArticle = NULL;
+jmethodID _m_PDFTextStripper__endArticle = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_endArticle(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_endArticle, "endArticle", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_endArticle == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_endArticle);
+JniResult PDFTextStripper__endArticle(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__endArticle, "endArticle",
+              "()V");
+  if (_m_PDFTextStripper__endArticle == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__endArticle);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_startPage1 = NULL;
+jmethodID _m_PDFTextStripper__startPage1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_startPage1(jobject self_, jobject page) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_startPage1, "startPage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_startPage1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_startPage1, page);
+JniResult PDFTextStripper__startPage1(jobject self_, jobject page) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__startPage1, "startPage",
+              "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
+  if (_m_PDFTextStripper__startPage1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__startPage1,
+                            page);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_endPage1 = NULL;
+jmethodID _m_PDFTextStripper__endPage1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_endPage1(jobject self_, jobject page) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_endPage1, "endPage", "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_endPage1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_endPage1, page);
+JniResult PDFTextStripper__endPage1(jobject self_, jobject page) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__endPage1, "endPage",
+              "(Lorg/apache/pdfbox/pdmodel/PDPage;)V");
+  if (_m_PDFTextStripper__endPage1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__endPage1, page);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writePage = NULL;
+jmethodID _m_PDFTextStripper__writePage = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writePage(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writePage, "writePage", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writePage == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writePage);
+JniResult PDFTextStripper__writePage(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writePage, "writePage",
+              "()V");
+  if (_m_PDFTextStripper__writePage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writePage);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_overlap = NULL;
+jmethodID _m_PDFTextStripper__overlap = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_text_PDFTextStripper_overlap(jobject self_, float y1, float height1, float y2, float height2) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_overlap, "overlap", "(FFFF)Z");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_overlap == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_overlap, y1, height1, y2, height2);
-    return _result;
+JniResult PDFTextStripper__overlap(jobject self_,
+                                   float y1,
+                                   float height1,
+                                   float y2,
+                                   float height2) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__overlap, "overlap",
+              "(FFFF)Z");
+  if (_m_PDFTextStripper__overlap == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDFTextStripper__overlap, y1, height1, y2, height2);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeLineSeparator = NULL;
+jmethodID _m_PDFTextStripper__writeLineSeparator = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeLineSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeLineSeparator, "writeLineSeparator", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeLineSeparator == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeLineSeparator);
+JniResult PDFTextStripper__writeLineSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeLineSeparator,
+              "writeLineSeparator", "()V");
+  if (_m_PDFTextStripper__writeLineSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__writeLineSeparator);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeWordSeparator = NULL;
+jmethodID _m_PDFTextStripper__writeWordSeparator = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeWordSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeWordSeparator, "writeWordSeparator", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeWordSeparator == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeWordSeparator);
+JniResult PDFTextStripper__writeWordSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeWordSeparator,
+              "writeWordSeparator", "()V");
+  if (_m_PDFTextStripper__writeWordSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__writeWordSeparator);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeCharacters = NULL;
+jmethodID _m_PDFTextStripper__writeCharacters = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeCharacters(jobject self_, jobject text) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeCharacters, "writeCharacters", "(Lorg/apache/pdfbox/text/TextPosition;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeCharacters == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeCharacters, text);
+JniResult PDFTextStripper__writeCharacters(jobject self_, jobject text) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeCharacters,
+              "writeCharacters", "(Lorg/apache/pdfbox/text/TextPosition;)V");
+  if (_m_PDFTextStripper__writeCharacters == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeCharacters,
+                            text);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeString = NULL;
+jmethodID _m_PDFTextStripper__writeString = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeString(jobject self_, jobject text, jobject textPositions) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeString, "writeString", "(Ljava/lang/String;Ljava/util/List;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeString == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeString, text, textPositions);
+JniResult PDFTextStripper__writeString(jobject self_,
+                                       jobject text,
+                                       jobject textPositions) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeString,
+              "writeString", "(Ljava/lang/String;Ljava/util/List;)V");
+  if (_m_PDFTextStripper__writeString == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeString,
+                            text, textPositions);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeString1 = NULL;
+jmethodID _m_PDFTextStripper__writeString1 = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeString1(jobject self_, jobject text) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeString1, "writeString", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeString1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeString1, text);
+JniResult PDFTextStripper__writeString1(jobject self_, jobject text) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeString1,
+              "writeString", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__writeString1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeString1,
+                            text);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_within = NULL;
+jmethodID _m_PDFTextStripper__within = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_text_PDFTextStripper_within(jobject self_, float first, float second, float variance) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_within, "within", "(FFF)Z");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_within == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_within, first, second, variance);
-    return _result;
+JniResult PDFTextStripper__within(jobject self_,
+                                  float first,
+                                  float second,
+                                  float variance) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__within, "within",
+              "(FFF)Z");
+  if (_m_PDFTextStripper__within == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDFTextStripper__within, first, second, variance);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_processTextPosition = NULL;
+jmethodID _m_PDFTextStripper__processTextPosition = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_processTextPosition(jobject self_, jobject text) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_processTextPosition, "processTextPosition", "(Lorg/apache/pdfbox/text/TextPosition;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_processTextPosition == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_processTextPosition, text);
+JniResult PDFTextStripper__processTextPosition(jobject self_, jobject text) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__processTextPosition,
+              "processTextPosition",
+              "(Lorg/apache/pdfbox/text/TextPosition;)V");
+  if (_m_PDFTextStripper__processTextPosition == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__processTextPosition, text);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getStartPage = NULL;
+jmethodID _m_PDFTextStripper__getStartPage = NULL;
 FFI_PLUGIN_EXPORT
-int32_t org_apache_pdfbox_text_PDFTextStripper_getStartPage(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getStartPage, "getStartPage", "()I");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getStartPage == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getStartPage);
-    return _result;
+JniResult PDFTextStripper__getStartPage(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getStartPage,
+              "getStartPage", "()I");
+  if (_m_PDFTextStripper__getStartPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_PDFTextStripper__getStartPage);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setStartPage = NULL;
+jmethodID _m_PDFTextStripper__setStartPage = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setStartPage(jobject self_, int32_t startPageValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setStartPage, "setStartPage", "(I)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setStartPage == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setStartPage, startPageValue);
+JniResult PDFTextStripper__setStartPage(jobject self_, int32_t startPageValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setStartPage,
+              "setStartPage", "(I)V");
+  if (_m_PDFTextStripper__setStartPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setStartPage,
+                            startPageValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getEndPage = NULL;
+jmethodID _m_PDFTextStripper__getEndPage = NULL;
 FFI_PLUGIN_EXPORT
-int32_t org_apache_pdfbox_text_PDFTextStripper_getEndPage(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getEndPage, "getEndPage", "()I");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getEndPage == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getEndPage);
-    return _result;
+JniResult PDFTextStripper__getEndPage(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getEndPage, "getEndPage",
+              "()I");
+  if (_m_PDFTextStripper__getEndPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_PDFTextStripper__getEndPage);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setEndPage = NULL;
+jmethodID _m_PDFTextStripper__setEndPage = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setEndPage(jobject self_, int32_t endPageValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setEndPage, "setEndPage", "(I)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setEndPage == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setEndPage, endPageValue);
+JniResult PDFTextStripper__setEndPage(jobject self_, int32_t endPageValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setEndPage, "setEndPage",
+              "(I)V");
+  if (_m_PDFTextStripper__setEndPage == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setEndPage,
+                            endPageValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setLineSeparator = NULL;
+jmethodID _m_PDFTextStripper__setLineSeparator = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setLineSeparator(jobject self_, jobject separator) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setLineSeparator, "setLineSeparator", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setLineSeparator == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setLineSeparator, separator);
+JniResult PDFTextStripper__setLineSeparator(jobject self_, jobject separator) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setLineSeparator,
+              "setLineSeparator", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setLineSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setLineSeparator,
+                            separator);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getLineSeparator = NULL;
+jmethodID _m_PDFTextStripper__getLineSeparator = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getLineSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getLineSeparator, "getLineSeparator", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getLineSeparator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getLineSeparator);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getLineSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getLineSeparator,
+              "getLineSeparator", "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getLineSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getLineSeparator);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getWordSeparator = NULL;
+jmethodID _m_PDFTextStripper__getWordSeparator = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getWordSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getWordSeparator, "getWordSeparator", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getWordSeparator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getWordSeparator);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getWordSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getWordSeparator,
+              "getWordSeparator", "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getWordSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getWordSeparator);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setWordSeparator = NULL;
+jmethodID _m_PDFTextStripper__setWordSeparator = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setWordSeparator(jobject self_, jobject separator) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setWordSeparator, "setWordSeparator", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setWordSeparator == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setWordSeparator, separator);
+JniResult PDFTextStripper__setWordSeparator(jobject self_, jobject separator) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setWordSeparator,
+              "setWordSeparator", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setWordSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setWordSeparator,
+                            separator);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getSuppressDuplicateOverlappingText = NULL;
+jmethodID _m_PDFTextStripper__getSuppressDuplicateOverlappingText = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_text_PDFTextStripper_getSuppressDuplicateOverlappingText(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getSuppressDuplicateOverlappingText, "getSuppressDuplicateOverlappingText", "()Z");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getSuppressDuplicateOverlappingText == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getSuppressDuplicateOverlappingText);
-    return _result;
+JniResult PDFTextStripper__getSuppressDuplicateOverlappingText(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper,
+              &_m_PDFTextStripper__getSuppressDuplicateOverlappingText,
+              "getSuppressDuplicateOverlappingText", "()Z");
+  if (_m_PDFTextStripper__getSuppressDuplicateOverlappingText == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDFTextStripper__getSuppressDuplicateOverlappingText);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getCurrentPageNo = NULL;
+jmethodID _m_PDFTextStripper__getCurrentPageNo = NULL;
 FFI_PLUGIN_EXPORT
-int32_t org_apache_pdfbox_text_PDFTextStripper_getCurrentPageNo(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getCurrentPageNo, "getCurrentPageNo", "()I");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getCurrentPageNo == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getCurrentPageNo);
-    return _result;
+JniResult PDFTextStripper__getCurrentPageNo(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getCurrentPageNo,
+              "getCurrentPageNo", "()I");
+  if (_m_PDFTextStripper__getCurrentPageNo == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_PDFTextStripper__getCurrentPageNo);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getOutput = NULL;
+jmethodID _m_PDFTextStripper__getOutput = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getOutput(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getOutput, "getOutput", "()Ljava/io/Writer;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getOutput == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getOutput);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getOutput(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getOutput, "getOutput",
+              "()Ljava/io/Writer;");
+  if (_m_PDFTextStripper__getOutput == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_PDFTextStripper__getOutput);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getCharactersByArticle = NULL;
+jmethodID _m_PDFTextStripper__getCharactersByArticle = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getCharactersByArticle(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getCharactersByArticle, "getCharactersByArticle", "()Ljava/util/List;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getCharactersByArticle == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getCharactersByArticle);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getCharactersByArticle(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getCharactersByArticle,
+              "getCharactersByArticle", "()Ljava/util/List;");
+  if (_m_PDFTextStripper__getCharactersByArticle == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getCharactersByArticle);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setSuppressDuplicateOverlappingText = NULL;
+jmethodID _m_PDFTextStripper__setSuppressDuplicateOverlappingText = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setSuppressDuplicateOverlappingText(jobject self_, uint8_t suppressDuplicateOverlappingTextValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setSuppressDuplicateOverlappingText, "setSuppressDuplicateOverlappingText", "(Z)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setSuppressDuplicateOverlappingText == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setSuppressDuplicateOverlappingText, suppressDuplicateOverlappingTextValue);
+JniResult PDFTextStripper__setSuppressDuplicateOverlappingText(
+    jobject self_,
+    uint8_t suppressDuplicateOverlappingTextValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper,
+              &_m_PDFTextStripper__setSuppressDuplicateOverlappingText,
+              "setSuppressDuplicateOverlappingText", "(Z)V");
+  if (_m_PDFTextStripper__setSuppressDuplicateOverlappingText == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(
+      jniEnv, self_, _m_PDFTextStripper__setSuppressDuplicateOverlappingText,
+      suppressDuplicateOverlappingTextValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getSeparateByBeads = NULL;
+jmethodID _m_PDFTextStripper__getSeparateByBeads = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_text_PDFTextStripper_getSeparateByBeads(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getSeparateByBeads, "getSeparateByBeads", "()Z");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getSeparateByBeads == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getSeparateByBeads);
-    return _result;
+JniResult PDFTextStripper__getSeparateByBeads(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getSeparateByBeads,
+              "getSeparateByBeads", "()Z");
+  if (_m_PDFTextStripper__getSeparateByBeads == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDFTextStripper__getSeparateByBeads);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setShouldSeparateByBeads = NULL;
+jmethodID _m_PDFTextStripper__setShouldSeparateByBeads = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setShouldSeparateByBeads(jobject self_, uint8_t aShouldSeparateByBeads) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setShouldSeparateByBeads, "setShouldSeparateByBeads", "(Z)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setShouldSeparateByBeads == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setShouldSeparateByBeads, aShouldSeparateByBeads);
+JniResult PDFTextStripper__setShouldSeparateByBeads(
+    jobject self_,
+    uint8_t aShouldSeparateByBeads) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setShouldSeparateByBeads,
+              "setShouldSeparateByBeads", "(Z)V");
+  if (_m_PDFTextStripper__setShouldSeparateByBeads == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__setShouldSeparateByBeads,
+                            aShouldSeparateByBeads);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getEndBookmark = NULL;
+jmethodID _m_PDFTextStripper__getEndBookmark = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getEndBookmark(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getEndBookmark, "getEndBookmark", "()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getEndBookmark == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getEndBookmark);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getEndBookmark(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getEndBookmark,
+              "getEndBookmark",
+              "()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+              "outline/PDOutlineItem;");
+  if (_m_PDFTextStripper__getEndBookmark == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getEndBookmark);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setEndBookmark = NULL;
+jmethodID _m_PDFTextStripper__setEndBookmark = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setEndBookmark(jobject self_, jobject aEndBookmark) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setEndBookmark, "setEndBookmark", "(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setEndBookmark == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setEndBookmark, aEndBookmark);
+JniResult PDFTextStripper__setEndBookmark(jobject self_, jobject aEndBookmark) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setEndBookmark,
+              "setEndBookmark",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+              "outline/PDOutlineItem;)V");
+  if (_m_PDFTextStripper__setEndBookmark == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setEndBookmark,
+                            aEndBookmark);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getStartBookmark = NULL;
+jmethodID _m_PDFTextStripper__getStartBookmark = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getStartBookmark(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getStartBookmark, "getStartBookmark", "()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getStartBookmark == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getStartBookmark);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getStartBookmark(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getStartBookmark,
+              "getStartBookmark",
+              "()Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+              "outline/PDOutlineItem;");
+  if (_m_PDFTextStripper__getStartBookmark == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getStartBookmark);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setStartBookmark = NULL;
+jmethodID _m_PDFTextStripper__setStartBookmark = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setStartBookmark(jobject self_, jobject aStartBookmark) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setStartBookmark, "setStartBookmark", "(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setStartBookmark == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setStartBookmark, aStartBookmark);
+JniResult PDFTextStripper__setStartBookmark(jobject self_,
+                                            jobject aStartBookmark) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setStartBookmark,
+              "setStartBookmark",
+              "(Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+              "outline/PDOutlineItem;)V");
+  if (_m_PDFTextStripper__setStartBookmark == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setStartBookmark,
+                            aStartBookmark);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getAddMoreFormatting = NULL;
+jmethodID _m_PDFTextStripper__getAddMoreFormatting = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_text_PDFTextStripper_getAddMoreFormatting(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getAddMoreFormatting, "getAddMoreFormatting", "()Z");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getAddMoreFormatting == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getAddMoreFormatting);
-    return _result;
+JniResult PDFTextStripper__getAddMoreFormatting(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getAddMoreFormatting,
+              "getAddMoreFormatting", "()Z");
+  if (_m_PDFTextStripper__getAddMoreFormatting == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDFTextStripper__getAddMoreFormatting);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setAddMoreFormatting = NULL;
+jmethodID _m_PDFTextStripper__setAddMoreFormatting = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setAddMoreFormatting(jobject self_, uint8_t newAddMoreFormatting) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setAddMoreFormatting, "setAddMoreFormatting", "(Z)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setAddMoreFormatting == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setAddMoreFormatting, newAddMoreFormatting);
+JniResult PDFTextStripper__setAddMoreFormatting(jobject self_,
+                                                uint8_t newAddMoreFormatting) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setAddMoreFormatting,
+              "setAddMoreFormatting", "(Z)V");
+  if (_m_PDFTextStripper__setAddMoreFormatting == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__setAddMoreFormatting,
+                            newAddMoreFormatting);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getSortByPosition = NULL;
+jmethodID _m_PDFTextStripper__getSortByPosition = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t org_apache_pdfbox_text_PDFTextStripper_getSortByPosition(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getSortByPosition, "getSortByPosition", "()Z");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getSortByPosition == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getSortByPosition);
-    return _result;
+JniResult PDFTextStripper__getSortByPosition(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getSortByPosition,
+              "getSortByPosition", "()Z");
+  if (_m_PDFTextStripper__getSortByPosition == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_PDFTextStripper__getSortByPosition);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setSortByPosition = NULL;
+jmethodID _m_PDFTextStripper__setSortByPosition = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setSortByPosition(jobject self_, uint8_t newSortByPosition) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setSortByPosition, "setSortByPosition", "(Z)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setSortByPosition == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setSortByPosition, newSortByPosition);
+JniResult PDFTextStripper__setSortByPosition(jobject self_,
+                                             uint8_t newSortByPosition) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setSortByPosition,
+              "setSortByPosition", "(Z)V");
+  if (_m_PDFTextStripper__setSortByPosition == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(
+      jniEnv, self_, _m_PDFTextStripper__setSortByPosition, newSortByPosition);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getSpacingTolerance = NULL;
+jmethodID _m_PDFTextStripper__getSpacingTolerance = NULL;
 FFI_PLUGIN_EXPORT
-float org_apache_pdfbox_text_PDFTextStripper_getSpacingTolerance(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getSpacingTolerance, "getSpacingTolerance", "()F");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getSpacingTolerance == NULL) return (float)0;
-    float _result = (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getSpacingTolerance);
-    return _result;
+JniResult PDFTextStripper__getSpacingTolerance(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getSpacingTolerance,
+              "getSpacingTolerance", "()F");
+  if (_m_PDFTextStripper__getSpacingTolerance == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  float _result = (*jniEnv)->CallFloatMethod(
+      jniEnv, self_, _m_PDFTextStripper__getSpacingTolerance);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setSpacingTolerance = NULL;
+jmethodID _m_PDFTextStripper__setSpacingTolerance = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setSpacingTolerance(jobject self_, float spacingToleranceValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setSpacingTolerance, "setSpacingTolerance", "(F)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setSpacingTolerance == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setSpacingTolerance, spacingToleranceValue);
+JniResult PDFTextStripper__setSpacingTolerance(jobject self_,
+                                               float spacingToleranceValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setSpacingTolerance,
+              "setSpacingTolerance", "(F)V");
+  if (_m_PDFTextStripper__setSpacingTolerance == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__setSpacingTolerance,
+                            spacingToleranceValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getAverageCharTolerance = NULL;
+jmethodID _m_PDFTextStripper__getAverageCharTolerance = NULL;
 FFI_PLUGIN_EXPORT
-float org_apache_pdfbox_text_PDFTextStripper_getAverageCharTolerance(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getAverageCharTolerance, "getAverageCharTolerance", "()F");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getAverageCharTolerance == NULL) return (float)0;
-    float _result = (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getAverageCharTolerance);
-    return _result;
+JniResult PDFTextStripper__getAverageCharTolerance(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getAverageCharTolerance,
+              "getAverageCharTolerance", "()F");
+  if (_m_PDFTextStripper__getAverageCharTolerance == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  float _result = (*jniEnv)->CallFloatMethod(
+      jniEnv, self_, _m_PDFTextStripper__getAverageCharTolerance);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setAverageCharTolerance = NULL;
+jmethodID _m_PDFTextStripper__setAverageCharTolerance = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setAverageCharTolerance(jobject self_, float averageCharToleranceValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setAverageCharTolerance, "setAverageCharTolerance", "(F)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setAverageCharTolerance == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setAverageCharTolerance, averageCharToleranceValue);
+JniResult PDFTextStripper__setAverageCharTolerance(
+    jobject self_,
+    float averageCharToleranceValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setAverageCharTolerance,
+              "setAverageCharTolerance", "(F)V");
+  if (_m_PDFTextStripper__setAverageCharTolerance == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__setAverageCharTolerance,
+                            averageCharToleranceValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getIndentThreshold = NULL;
+jmethodID _m_PDFTextStripper__getIndentThreshold = NULL;
 FFI_PLUGIN_EXPORT
-float org_apache_pdfbox_text_PDFTextStripper_getIndentThreshold(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getIndentThreshold, "getIndentThreshold", "()F");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getIndentThreshold == NULL) return (float)0;
-    float _result = (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getIndentThreshold);
-    return _result;
+JniResult PDFTextStripper__getIndentThreshold(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getIndentThreshold,
+              "getIndentThreshold", "()F");
+  if (_m_PDFTextStripper__getIndentThreshold == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  float _result = (*jniEnv)->CallFloatMethod(
+      jniEnv, self_, _m_PDFTextStripper__getIndentThreshold);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setIndentThreshold = NULL;
+jmethodID _m_PDFTextStripper__setIndentThreshold = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setIndentThreshold(jobject self_, float indentThresholdValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setIndentThreshold, "setIndentThreshold", "(F)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setIndentThreshold == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setIndentThreshold, indentThresholdValue);
+JniResult PDFTextStripper__setIndentThreshold(jobject self_,
+                                              float indentThresholdValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setIndentThreshold,
+              "setIndentThreshold", "(F)V");
+  if (_m_PDFTextStripper__setIndentThreshold == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__setIndentThreshold,
+                            indentThresholdValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getDropThreshold = NULL;
+jmethodID _m_PDFTextStripper__getDropThreshold = NULL;
 FFI_PLUGIN_EXPORT
-float org_apache_pdfbox_text_PDFTextStripper_getDropThreshold(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getDropThreshold, "getDropThreshold", "()F");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getDropThreshold == NULL) return (float)0;
-    float _result = (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getDropThreshold);
-    return _result;
+JniResult PDFTextStripper__getDropThreshold(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getDropThreshold,
+              "getDropThreshold", "()F");
+  if (_m_PDFTextStripper__getDropThreshold == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  float _result = (*jniEnv)->CallFloatMethod(
+      jniEnv, self_, _m_PDFTextStripper__getDropThreshold);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setDropThreshold = NULL;
+jmethodID _m_PDFTextStripper__setDropThreshold = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setDropThreshold(jobject self_, float dropThresholdValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setDropThreshold, "setDropThreshold", "(F)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setDropThreshold == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setDropThreshold, dropThresholdValue);
+JniResult PDFTextStripper__setDropThreshold(jobject self_,
+                                            float dropThresholdValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setDropThreshold,
+              "setDropThreshold", "(F)V");
+  if (_m_PDFTextStripper__setDropThreshold == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setDropThreshold,
+                            dropThresholdValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getParagraphStart = NULL;
+jmethodID _m_PDFTextStripper__getParagraphStart = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getParagraphStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getParagraphStart, "getParagraphStart", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getParagraphStart == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getParagraphStart);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getParagraphStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getParagraphStart,
+              "getParagraphStart", "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getParagraphStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getParagraphStart);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setParagraphStart = NULL;
+jmethodID _m_PDFTextStripper__setParagraphStart = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setParagraphStart(jobject self_, jobject s) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setParagraphStart, "setParagraphStart", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setParagraphStart == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setParagraphStart, s);
+JniResult PDFTextStripper__setParagraphStart(jobject self_, jobject s) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setParagraphStart,
+              "setParagraphStart", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setParagraphStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__setParagraphStart, s);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getParagraphEnd = NULL;
+jmethodID _m_PDFTextStripper__getParagraphEnd = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getParagraphEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getParagraphEnd, "getParagraphEnd", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getParagraphEnd == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getParagraphEnd);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getParagraphEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getParagraphEnd,
+              "getParagraphEnd", "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getParagraphEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getParagraphEnd);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setParagraphEnd = NULL;
+jmethodID _m_PDFTextStripper__setParagraphEnd = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setParagraphEnd(jobject self_, jobject s) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setParagraphEnd, "setParagraphEnd", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setParagraphEnd == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setParagraphEnd, s);
+JniResult PDFTextStripper__setParagraphEnd(jobject self_, jobject s) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setParagraphEnd,
+              "setParagraphEnd", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setParagraphEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setParagraphEnd,
+                            s);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getPageStart = NULL;
+jmethodID _m_PDFTextStripper__getPageStart = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getPageStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getPageStart, "getPageStart", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getPageStart == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getPageStart);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getPageStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getPageStart,
+              "getPageStart", "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getPageStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getPageStart);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setPageStart = NULL;
+jmethodID _m_PDFTextStripper__setPageStart = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setPageStart(jobject self_, jobject pageStartValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setPageStart, "setPageStart", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setPageStart == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setPageStart, pageStartValue);
+JniResult PDFTextStripper__setPageStart(jobject self_, jobject pageStartValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setPageStart,
+              "setPageStart", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setPageStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setPageStart,
+                            pageStartValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getPageEnd = NULL;
+jmethodID _m_PDFTextStripper__getPageEnd = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getPageEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getPageEnd, "getPageEnd", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getPageEnd == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getPageEnd);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getPageEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getPageEnd, "getPageEnd",
+              "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getPageEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_PDFTextStripper__getPageEnd);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setPageEnd = NULL;
+jmethodID _m_PDFTextStripper__setPageEnd = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setPageEnd(jobject self_, jobject pageEndValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setPageEnd, "setPageEnd", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setPageEnd == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setPageEnd, pageEndValue);
+JniResult PDFTextStripper__setPageEnd(jobject self_, jobject pageEndValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setPageEnd, "setPageEnd",
+              "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setPageEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setPageEnd,
+                            pageEndValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getArticleStart = NULL;
+jmethodID _m_PDFTextStripper__getArticleStart = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getArticleStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getArticleStart, "getArticleStart", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getArticleStart == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getArticleStart);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getArticleStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getArticleStart,
+              "getArticleStart", "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getArticleStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getArticleStart);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setArticleStart = NULL;
+jmethodID _m_PDFTextStripper__setArticleStart = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setArticleStart(jobject self_, jobject articleStartValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setArticleStart, "setArticleStart", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setArticleStart == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setArticleStart, articleStartValue);
+JniResult PDFTextStripper__setArticleStart(jobject self_,
+                                           jobject articleStartValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setArticleStart,
+              "setArticleStart", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setArticleStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setArticleStart,
+                            articleStartValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getArticleEnd = NULL;
+jmethodID _m_PDFTextStripper__getArticleEnd = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getArticleEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getArticleEnd, "getArticleEnd", "()Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getArticleEnd == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getArticleEnd);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getArticleEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getArticleEnd,
+              "getArticleEnd", "()Ljava/lang/String;");
+  if (_m_PDFTextStripper__getArticleEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getArticleEnd);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setArticleEnd = NULL;
+jmethodID _m_PDFTextStripper__setArticleEnd = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setArticleEnd(jobject self_, jobject articleEndValue) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setArticleEnd, "setArticleEnd", "(Ljava/lang/String;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setArticleEnd == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setArticleEnd, articleEndValue);
+JniResult PDFTextStripper__setArticleEnd(jobject self_,
+                                         jobject articleEndValue) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setArticleEnd,
+              "setArticleEnd", "(Ljava/lang/String;)V");
+  if (_m_PDFTextStripper__setArticleEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__setArticleEnd,
+                            articleEndValue);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_handleLineSeparation = NULL;
+jmethodID _m_PDFTextStripper__handleLineSeparation = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_handleLineSeparation(jobject self_, jobject current, jobject lastPosition, jobject lastLineStartPosition, float maxHeightForLine) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_handleLineSeparation, "handleLineSeparation", "(Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;F)Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_handleLineSeparation == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_handleLineSeparation, current, lastPosition, lastLineStartPosition, maxHeightForLine);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__handleLineSeparation(jobject self_,
+                                                jobject current,
+                                                jobject lastPosition,
+                                                jobject lastLineStartPosition,
+                                                float maxHeightForLine) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__handleLineSeparation,
+              "handleLineSeparation",
+              "(Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/"
+              "apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/apache/"
+              "pdfbox/text/PDFTextStripper$PositionWrapper;F)Lorg/apache/"
+              "pdfbox/text/PDFTextStripper$PositionWrapper;");
+  if (_m_PDFTextStripper__handleLineSeparation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__handleLineSeparation, current,
+      lastPosition, lastLineStartPosition, maxHeightForLine);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_isParagraphSeparation = NULL;
+jmethodID _m_PDFTextStripper__isParagraphSeparation = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_isParagraphSeparation(jobject self_, jobject position, jobject lastPosition, jobject lastLineStartPosition, float maxHeightForLine) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_isParagraphSeparation, "isParagraphSeparation", "(Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;F)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_isParagraphSeparation == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_isParagraphSeparation, position, lastPosition, lastLineStartPosition, maxHeightForLine);
+JniResult PDFTextStripper__isParagraphSeparation(jobject self_,
+                                                 jobject position,
+                                                 jobject lastPosition,
+                                                 jobject lastLineStartPosition,
+                                                 float maxHeightForLine) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__isParagraphSeparation,
+              "isParagraphSeparation",
+              "(Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/"
+              "apache/pdfbox/text/PDFTextStripper$PositionWrapper;Lorg/apache/"
+              "pdfbox/text/PDFTextStripper$PositionWrapper;F)V");
+  if (_m_PDFTextStripper__isParagraphSeparation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(
+      jniEnv, self_, _m_PDFTextStripper__isParagraphSeparation, position,
+      lastPosition, lastLineStartPosition, maxHeightForLine);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_multiplyFloat = NULL;
+jmethodID _m_PDFTextStripper__multiplyFloat = NULL;
 FFI_PLUGIN_EXPORT
-float org_apache_pdfbox_text_PDFTextStripper_multiplyFloat(jobject self_, float value1, float value2) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_multiplyFloat, "multiplyFloat", "(FF)F");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_multiplyFloat == NULL) return (float)0;
-    float _result = (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_multiplyFloat, value1, value2);
-    return _result;
+JniResult PDFTextStripper__multiplyFloat(jobject self_,
+                                         float value1,
+                                         float value2) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__multiplyFloat,
+              "multiplyFloat", "(FF)F");
+  if (_m_PDFTextStripper__multiplyFloat == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  float _result = (*jniEnv)->CallFloatMethod(
+      jniEnv, self_, _m_PDFTextStripper__multiplyFloat, value1, value2);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphSeparator = NULL;
+jmethodID _m_PDFTextStripper__writeParagraphSeparator = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeParagraphSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphSeparator, "writeParagraphSeparator", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphSeparator == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphSeparator);
+JniResult PDFTextStripper__writeParagraphSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeParagraphSeparator,
+              "writeParagraphSeparator", "()V");
+  if (_m_PDFTextStripper__writeParagraphSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__writeParagraphSeparator);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphStart = NULL;
+jmethodID _m_PDFTextStripper__writeParagraphStart = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeParagraphStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphStart, "writeParagraphStart", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphStart == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphStart);
+JniResult PDFTextStripper__writeParagraphStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeParagraphStart,
+              "writeParagraphStart", "()V");
+  if (_m_PDFTextStripper__writeParagraphStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__writeParagraphStart);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphEnd = NULL;
+jmethodID _m_PDFTextStripper__writeParagraphEnd = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeParagraphEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphEnd, "writeParagraphEnd", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphEnd == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeParagraphEnd);
+JniResult PDFTextStripper__writeParagraphEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeParagraphEnd,
+              "writeParagraphEnd", "()V");
+  if (_m_PDFTextStripper__writeParagraphEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__writeParagraphEnd);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writePageStart = NULL;
+jmethodID _m_PDFTextStripper__writePageStart = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writePageStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writePageStart, "writePageStart", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writePageStart == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writePageStart);
+JniResult PDFTextStripper__writePageStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writePageStart,
+              "writePageStart", "()V");
+  if (_m_PDFTextStripper__writePageStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writePageStart);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writePageEnd = NULL;
+jmethodID _m_PDFTextStripper__writePageEnd = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writePageEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writePageEnd, "writePageEnd", "()V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writePageEnd == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writePageEnd);
+JniResult PDFTextStripper__writePageEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writePageEnd,
+              "writePageEnd", "()V");
+  if (_m_PDFTextStripper__writePageEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writePageEnd);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_matchListItemPattern = NULL;
+jmethodID _m_PDFTextStripper__matchListItemPattern = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_matchListItemPattern(jobject self_, jobject pw) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_matchListItemPattern, "matchListItemPattern", "(Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;)Ljava/util/regex/Pattern;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_matchListItemPattern == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_matchListItemPattern, pw);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__matchListItemPattern(jobject self_, jobject pw) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__matchListItemPattern,
+              "matchListItemPattern",
+              "(Lorg/apache/pdfbox/text/PDFTextStripper$PositionWrapper;)Ljava/"
+              "util/regex/Pattern;");
+  if (_m_PDFTextStripper__matchListItemPattern == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__matchListItemPattern, pw);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_setListItemPatterns = NULL;
+jmethodID _m_PDFTextStripper__setListItemPatterns = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_setListItemPatterns(jobject self_, jobject patterns) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_setListItemPatterns, "setListItemPatterns", "(Ljava/util/List;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_setListItemPatterns == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_setListItemPatterns, patterns);
+JniResult PDFTextStripper__setListItemPatterns(jobject self_,
+                                               jobject patterns) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__setListItemPatterns,
+              "setListItemPatterns", "(Ljava/util/List;)V");
+  if (_m_PDFTextStripper__setListItemPatterns == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_PDFTextStripper__setListItemPatterns, patterns);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_getListItemPatterns = NULL;
+jmethodID _m_PDFTextStripper__getListItemPatterns = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_getListItemPatterns(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_getListItemPatterns, "getListItemPatterns", "()Ljava/util/List;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_getListItemPatterns == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_getListItemPatterns);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__getListItemPatterns(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__getListItemPatterns,
+              "getListItemPatterns", "()Ljava/util/List;");
+  if (_m_PDFTextStripper__getListItemPatterns == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__getListItemPatterns);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_matchPattern = NULL;
+jmethodID _m_PDFTextStripper__matchPattern = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_matchPattern(jobject string, jobject patterns) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_static_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_matchPattern, "matchPattern", "(Ljava/lang/String;Ljava/util/List;)Ljava/util/regex/Pattern;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_matchPattern == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _m_org_apache_pdfbox_text_PDFTextStripper_matchPattern, string, patterns);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__matchPattern(jobject string, jobject patterns) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_PDFTextStripper, &_m_PDFTextStripper__matchPattern, "matchPattern",
+      "(Ljava/lang/String;Ljava/util/List;)Ljava/util/regex/Pattern;");
+  if (_m_PDFTextStripper__matchPattern == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_PDFTextStripper, _m_PDFTextStripper__matchPattern, string,
+      patterns);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_writeLine = NULL;
+jmethodID _m_PDFTextStripper__writeLine = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_writeLine(jobject self_, jobject line) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_writeLine, "writeLine", "(Ljava/util/List;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_writeLine == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_writeLine, line);
+JniResult PDFTextStripper__writeLine(jobject self_, jobject line) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__writeLine, "writeLine",
+              "(Ljava/util/List;)V");
+  if (_m_PDFTextStripper__writeLine == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_PDFTextStripper__writeLine, line);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_normalize = NULL;
+jmethodID _m_PDFTextStripper__normalize = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_normalize(jobject self_, jobject line) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_normalize, "normalize", "(Ljava/util/List;)Ljava/util/List;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_normalize == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_normalize, line);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__normalize(jobject self_, jobject line) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__normalize, "normalize",
+              "(Ljava/util/List;)Ljava/util/List;");
+  if (_m_PDFTextStripper__normalize == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__normalize, line);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_handleDirection = NULL;
+jmethodID _m_PDFTextStripper__handleDirection = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_handleDirection(jobject self_, jobject word) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_handleDirection, "handleDirection", "(Ljava/lang/String;)Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_handleDirection == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_handleDirection, word);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__handleDirection(jobject self_, jobject word) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__handleDirection,
+              "handleDirection", "(Ljava/lang/String;)Ljava/lang/String;");
+  if (_m_PDFTextStripper__handleDirection == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__handleDirection, word);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_parseBidiFile = NULL;
+jmethodID _m_PDFTextStripper__parseBidiFile = NULL;
 FFI_PLUGIN_EXPORT
-void org_apache_pdfbox_text_PDFTextStripper_parseBidiFile(jobject inputStream) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_static_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_parseBidiFile, "parseBidiFile", "(Ljava/io/InputStream;)V");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_parseBidiFile == NULL) return (void)0;
-    (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _m_org_apache_pdfbox_text_PDFTextStripper_parseBidiFile, inputStream);
+JniResult PDFTextStripper__parseBidiFile(jobject inputStream) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_PDFTextStripper, &_m_PDFTextStripper__parseBidiFile,
+                     "parseBidiFile", "(Ljava/io/InputStream;)V");
+  if (_m_PDFTextStripper__parseBidiFile == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_PDFTextStripper,
+                                  _m_PDFTextStripper__parseBidiFile,
+                                  inputStream);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_createWord = NULL;
+jmethodID _m_PDFTextStripper__createWord = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_createWord(jobject self_, jobject word, jobject wordPositions) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_createWord, "createWord", "(Ljava/lang/String;Ljava/util/List;)Lorg/apache/pdfbox/text/PDFTextStripper$WordWithTextPositions;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_createWord == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_createWord, word, wordPositions);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__createWord(jobject self_,
+                                      jobject word,
+                                      jobject wordPositions) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__createWord, "createWord",
+              "(Ljava/lang/String;Ljava/util/List;)Lorg/apache/pdfbox/text/"
+              "PDFTextStripper$WordWithTextPositions;");
+  if (_m_PDFTextStripper__createWord == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__createWord, word, wordPositions);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_normalizeWord = NULL;
+jmethodID _m_PDFTextStripper__normalizeWord = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_normalizeWord(jobject self_, jobject word) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_normalizeWord, "normalizeWord", "(Ljava/lang/String;)Ljava/lang/String;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_normalizeWord == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_normalizeWord, word);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__normalizeWord(jobject self_, jobject word) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_PDFTextStripper, &_m_PDFTextStripper__normalizeWord,
+              "normalizeWord", "(Ljava/lang/String;)Ljava/lang/String;");
+  if (_m_PDFTextStripper__normalizeWord == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__normalizeWord, word);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_org_apache_pdfbox_text_PDFTextStripper_normalizeAdd = NULL;
+jmethodID _m_PDFTextStripper__normalizeAdd = NULL;
 FFI_PLUGIN_EXPORT
-jobject org_apache_pdfbox_text_PDFTextStripper_normalizeAdd(jobject self_, jobject normalized, jobject lineBuilder, jobject wordPositions, jobject item) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_method(_c_org_apache_pdfbox_text_PDFTextStripper, &_m_org_apache_pdfbox_text_PDFTextStripper_normalizeAdd, "normalizeAdd", "(Ljava/util/List;Ljava/lang/StringBuilder;Ljava/util/List;Lorg/apache/pdfbox/text/PDFTextStripper$LineItem;)Ljava/lang/StringBuilder;");
-    if (_m_org_apache_pdfbox_text_PDFTextStripper_normalizeAdd == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_org_apache_pdfbox_text_PDFTextStripper_normalizeAdd, normalized, lineBuilder, wordPositions, item);
-    return to_global_ref(_result);
+JniResult PDFTextStripper__normalizeAdd(jobject self_,
+                                        jobject normalized,
+                                        jobject lineBuilder,
+                                        jobject wordPositions,
+                                        jobject item) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_PDFTextStripper, &_m_PDFTextStripper__normalizeAdd, "normalizeAdd",
+      "(Ljava/util/List;Ljava/lang/StringBuilder;Ljava/util/List;Lorg/apache/"
+      "pdfbox/text/PDFTextStripper$LineItem;)Ljava/lang/StringBuilder;");
+  if (_m_PDFTextStripper__normalizeAdd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_PDFTextStripper__normalizeAdd, normalized, lineBuilder,
+      wordPositions, item);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold = NULL;
+jfieldID _f_PDFTextStripper__defaultIndentThreshold = NULL;
 FFI_PLUGIN_EXPORT
-float get_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold, "defaultIndentThreshold","F");
-    return ((*jniEnv)->GetStaticFloatField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold));
+JniResult get_PDFTextStripper__defaultIndentThreshold() {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper,
+                    &_f_PDFTextStripper__defaultIndentThreshold,
+                    "defaultIndentThreshold", "F");
+  float _result = (*jniEnv)->GetStaticFloatField(
+      jniEnv, _c_PDFTextStripper, _f_PDFTextStripper__defaultIndentThreshold);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold(float value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold, "defaultIndentThreshold","F");
-    ((*jniEnv)->SetStaticFloatField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_defaultIndentThreshold, value));
+JniResult set_PDFTextStripper__defaultIndentThreshold(float value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper,
+                    &_f_PDFTextStripper__defaultIndentThreshold,
+                    "defaultIndentThreshold", "F");
+  (*jniEnv)->SetStaticFloatField(jniEnv, _c_PDFTextStripper,
+                                 _f_PDFTextStripper__defaultIndentThreshold,
+                                 value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold = NULL;
+jfieldID _f_PDFTextStripper__defaultDropThreshold = NULL;
 FFI_PLUGIN_EXPORT
-float get_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold, "defaultDropThreshold","F");
-    return ((*jniEnv)->GetStaticFloatField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold));
+JniResult get_PDFTextStripper__defaultDropThreshold() {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper,
+                    &_f_PDFTextStripper__defaultDropThreshold,
+                    "defaultDropThreshold", "F");
+  float _result = (*jniEnv)->GetStaticFloatField(
+      jniEnv, _c_PDFTextStripper, _f_PDFTextStripper__defaultDropThreshold);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold(float value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold, "defaultDropThreshold","F");
-    ((*jniEnv)->SetStaticFloatField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_defaultDropThreshold, value));
+JniResult set_PDFTextStripper__defaultDropThreshold(float value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper,
+                    &_f_PDFTextStripper__defaultDropThreshold,
+                    "defaultDropThreshold", "F");
+  (*jniEnv)->SetStaticFloatField(jniEnv, _c_PDFTextStripper,
+                                 _f_PDFTextStripper__defaultDropThreshold,
+                                 value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_LOG = NULL;
+jfieldID _f_PDFTextStripper__LOG = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_LOG() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_LOG, "LOG","Lorg/apache/commons/logging/Log;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_LOG));
+JniResult get_PDFTextStripper__LOG() {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper, &_f_PDFTextStripper__LOG, "LOG",
+                    "Lorg/apache/commons/logging/Log;");
+  jobject _result = to_global_ref((*jniEnv)->GetStaticObjectField(
+      jniEnv, _c_PDFTextStripper, _f_PDFTextStripper__LOG));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_LINE_SEPARATOR = NULL;
+jfieldID _f_PDFTextStripper__LINE_SEPARATOR = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_LINE_SEPARATOR(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_LINE_SEPARATOR, "LINE_SEPARATOR","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_LINE_SEPARATOR));
+JniResult get_PDFTextStripper__LINE_SEPARATOR(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__LINE_SEPARATOR,
+             "LINE_SEPARATOR", "Ljava/lang/String;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__LINE_SEPARATOR));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_lineSeparator = NULL;
+jfieldID _f_PDFTextStripper__lineSeparator = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_lineSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_lineSeparator, "lineSeparator","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_lineSeparator));
+JniResult get_PDFTextStripper__lineSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__lineSeparator,
+             "lineSeparator", "Ljava/lang/String;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__lineSeparator));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_lineSeparator(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_lineSeparator, "lineSeparator","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_lineSeparator, value));
+JniResult set_PDFTextStripper__lineSeparator(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__lineSeparator,
+             "lineSeparator", "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__lineSeparator,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_wordSeparator = NULL;
+jfieldID _f_PDFTextStripper__wordSeparator = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_wordSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_wordSeparator, "wordSeparator","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_wordSeparator));
+JniResult get_PDFTextStripper__wordSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__wordSeparator,
+             "wordSeparator", "Ljava/lang/String;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__wordSeparator));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_wordSeparator(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_wordSeparator, "wordSeparator","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_wordSeparator, value));
+JniResult set_PDFTextStripper__wordSeparator(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__wordSeparator,
+             "wordSeparator", "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__wordSeparator,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_paragraphStart = NULL;
+jfieldID _f_PDFTextStripper__paragraphStart = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_paragraphStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_paragraphStart, "paragraphStart","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_paragraphStart));
+JniResult get_PDFTextStripper__paragraphStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__paragraphStart,
+             "paragraphStart", "Ljava/lang/String;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__paragraphStart));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_paragraphStart(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_paragraphStart, "paragraphStart","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_paragraphStart, value));
+JniResult set_PDFTextStripper__paragraphStart(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__paragraphStart,
+             "paragraphStart", "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__paragraphStart,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd = NULL;
+jfieldID _f_PDFTextStripper__paragraphEnd = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd, "paragraphEnd","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd));
+JniResult get_PDFTextStripper__paragraphEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__paragraphEnd,
+             "paragraphEnd", "Ljava/lang/String;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__paragraphEnd));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd, "paragraphEnd","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_paragraphEnd, value));
+JniResult set_PDFTextStripper__paragraphEnd(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__paragraphEnd,
+             "paragraphEnd", "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__paragraphEnd,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_pageStart = NULL;
+jfieldID _f_PDFTextStripper__pageStart = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_pageStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_pageStart, "pageStart","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_pageStart));
+JniResult get_PDFTextStripper__pageStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__pageStart, "pageStart",
+             "Ljava/lang/String;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDFTextStripper__pageStart));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_pageStart(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_pageStart, "pageStart","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_pageStart, value));
+JniResult set_PDFTextStripper__pageStart(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__pageStart, "pageStart",
+             "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__pageStart,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_pageEnd = NULL;
+jfieldID _f_PDFTextStripper__pageEnd = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_pageEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_pageEnd, "pageEnd","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_pageEnd));
+JniResult get_PDFTextStripper__pageEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__pageEnd, "pageEnd",
+             "Ljava/lang/String;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDFTextStripper__pageEnd));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_pageEnd(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_pageEnd, "pageEnd","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_pageEnd, value));
+JniResult set_PDFTextStripper__pageEnd(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__pageEnd, "pageEnd",
+             "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__pageEnd, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_articleStart = NULL;
+jfieldID _f_PDFTextStripper__articleStart = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_articleStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_articleStart, "articleStart","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_articleStart));
+JniResult get_PDFTextStripper__articleStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__articleStart,
+             "articleStart", "Ljava/lang/String;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__articleStart));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_articleStart(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_articleStart, "articleStart","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_articleStart, value));
+JniResult set_PDFTextStripper__articleStart(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__articleStart,
+             "articleStart", "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__articleStart,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_articleEnd = NULL;
+jfieldID _f_PDFTextStripper__articleEnd = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_articleEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_articleEnd, "articleEnd","Ljava/lang/String;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_articleEnd));
+JniResult get_PDFTextStripper__articleEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__articleEnd, "articleEnd",
+             "Ljava/lang/String;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDFTextStripper__articleEnd));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_articleEnd(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_articleEnd, "articleEnd","Ljava/lang/String;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_articleEnd, value));
+JniResult set_PDFTextStripper__articleEnd(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__articleEnd, "articleEnd",
+             "Ljava/lang/String;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__articleEnd,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_currentPageNo = NULL;
+jfieldID _f_PDFTextStripper__currentPageNo = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_org_apache_pdfbox_text_PDFTextStripper_currentPageNo(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_currentPageNo, "currentPageNo","I");
-    return ((*jniEnv)->GetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_currentPageNo));
+JniResult get_PDFTextStripper__currentPageNo(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__currentPageNo,
+             "currentPageNo", "I");
+  int32_t _result =
+      (*jniEnv)->GetIntField(jniEnv, self_, _f_PDFTextStripper__currentPageNo);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_currentPageNo(jobject self_, int32_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_currentPageNo, "currentPageNo","I");
-    ((*jniEnv)->SetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_currentPageNo, value));
+JniResult set_PDFTextStripper__currentPageNo(jobject self_, int32_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__currentPageNo,
+             "currentPageNo", "I");
+  (*jniEnv)->SetIntField(jniEnv, self_, _f_PDFTextStripper__currentPageNo,
+                         value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_startPage = NULL;
+jfieldID _f_PDFTextStripper__startPage = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_org_apache_pdfbox_text_PDFTextStripper_startPage(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_startPage, "startPage","I");
-    return ((*jniEnv)->GetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_startPage));
+JniResult get_PDFTextStripper__startPage(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__startPage, "startPage",
+             "I");
+  int32_t _result =
+      (*jniEnv)->GetIntField(jniEnv, self_, _f_PDFTextStripper__startPage);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_startPage(jobject self_, int32_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_startPage, "startPage","I");
-    ((*jniEnv)->SetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_startPage, value));
+JniResult set_PDFTextStripper__startPage(jobject self_, int32_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__startPage, "startPage",
+             "I");
+  (*jniEnv)->SetIntField(jniEnv, self_, _f_PDFTextStripper__startPage, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_endPage = NULL;
+jfieldID _f_PDFTextStripper__endPage = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_org_apache_pdfbox_text_PDFTextStripper_endPage(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_endPage, "endPage","I");
-    return ((*jniEnv)->GetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_endPage));
+JniResult get_PDFTextStripper__endPage(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__endPage, "endPage", "I");
+  int32_t _result =
+      (*jniEnv)->GetIntField(jniEnv, self_, _f_PDFTextStripper__endPage);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_endPage(jobject self_, int32_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_endPage, "endPage","I");
-    ((*jniEnv)->SetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_endPage, value));
+JniResult set_PDFTextStripper__endPage(jobject self_, int32_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__endPage, "endPage", "I");
+  (*jniEnv)->SetIntField(jniEnv, self_, _f_PDFTextStripper__endPage, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_startBookmark = NULL;
+jfieldID _f_PDFTextStripper__startBookmark = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_startBookmark(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_startBookmark, "startBookmark","Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_startBookmark));
+JniResult get_PDFTextStripper__startBookmark(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__startBookmark,
+             "startBookmark",
+             "Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+             "outline/PDOutlineItem;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__startBookmark));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_startBookmark(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_startBookmark, "startBookmark","Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_startBookmark, value));
+JniResult set_PDFTextStripper__startBookmark(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__startBookmark,
+             "startBookmark",
+             "Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+             "outline/PDOutlineItem;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__startBookmark,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber = NULL;
+jfieldID _f_PDFTextStripper__startBookmarkPageNumber = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber, "startBookmarkPageNumber","I");
-    return ((*jniEnv)->GetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber));
+JniResult get_PDFTextStripper__startBookmarkPageNumber(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__startBookmarkPageNumber,
+             "startBookmarkPageNumber", "I");
+  int32_t _result = (*jniEnv)->GetIntField(
+      jniEnv, self_, _f_PDFTextStripper__startBookmarkPageNumber);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber(jobject self_, int32_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber, "startBookmarkPageNumber","I");
-    ((*jniEnv)->SetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_startBookmarkPageNumber, value));
+JniResult set_PDFTextStripper__startBookmarkPageNumber(jobject self_,
+                                                       int32_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__startBookmarkPageNumber,
+             "startBookmarkPageNumber", "I");
+  (*jniEnv)->SetIntField(jniEnv, self_,
+                         _f_PDFTextStripper__startBookmarkPageNumber, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber = NULL;
+jfieldID _f_PDFTextStripper__endBookmarkPageNumber = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (int32_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber, "endBookmarkPageNumber","I");
-    return ((*jniEnv)->GetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber));
+JniResult get_PDFTextStripper__endBookmarkPageNumber(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__endBookmarkPageNumber,
+             "endBookmarkPageNumber", "I");
+  int32_t _result = (*jniEnv)->GetIntField(
+      jniEnv, self_, _f_PDFTextStripper__endBookmarkPageNumber);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber(jobject self_, int32_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber, "endBookmarkPageNumber","I");
-    ((*jniEnv)->SetIntField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_endBookmarkPageNumber, value));
+JniResult set_PDFTextStripper__endBookmarkPageNumber(jobject self_,
+                                                     int32_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__endBookmarkPageNumber,
+             "endBookmarkPageNumber", "I");
+  (*jniEnv)->SetIntField(jniEnv, self_,
+                         _f_PDFTextStripper__endBookmarkPageNumber, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_endBookmark = NULL;
+jfieldID _f_PDFTextStripper__endBookmark = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_endBookmark(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_endBookmark, "endBookmark","Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_endBookmark));
+JniResult get_PDFTextStripper__endBookmark(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__endBookmark,
+             "endBookmark",
+             "Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+             "outline/PDOutlineItem;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__endBookmark));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_endBookmark(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_endBookmark, "endBookmark","Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/outline/PDOutlineItem;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_endBookmark, value));
+JniResult set_PDFTextStripper__endBookmark(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__endBookmark,
+             "endBookmark",
+             "Lorg/apache/pdfbox/pdmodel/interactive/documentnavigation/"
+             "outline/PDOutlineItem;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__endBookmark,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText = NULL;
+jfieldID _f_PDFTextStripper__suppressDuplicateOverlappingText = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText, "suppressDuplicateOverlappingText","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText));
+JniResult get_PDFTextStripper__suppressDuplicateOverlappingText(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper,
+             &_f_PDFTextStripper__suppressDuplicateOverlappingText,
+             "suppressDuplicateOverlappingText", "Z");
+  uint8_t _result = (*jniEnv)->GetBooleanField(
+      jniEnv, self_, _f_PDFTextStripper__suppressDuplicateOverlappingText);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText, "suppressDuplicateOverlappingText","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_suppressDuplicateOverlappingText, value));
+JniResult set_PDFTextStripper__suppressDuplicateOverlappingText(jobject self_,
+                                                                uint8_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper,
+             &_f_PDFTextStripper__suppressDuplicateOverlappingText,
+             "suppressDuplicateOverlappingText", "Z");
+  (*jniEnv)->SetBooleanField(
+      jniEnv, self_, _f_PDFTextStripper__suppressDuplicateOverlappingText,
+      value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads = NULL;
+jfieldID _f_PDFTextStripper__shouldSeparateByBeads = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads, "shouldSeparateByBeads","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads));
+JniResult get_PDFTextStripper__shouldSeparateByBeads(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__shouldSeparateByBeads,
+             "shouldSeparateByBeads", "Z");
+  uint8_t _result = (*jniEnv)->GetBooleanField(
+      jniEnv, self_, _f_PDFTextStripper__shouldSeparateByBeads);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads, "shouldSeparateByBeads","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_shouldSeparateByBeads, value));
+JniResult set_PDFTextStripper__shouldSeparateByBeads(jobject self_,
+                                                     uint8_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__shouldSeparateByBeads,
+             "shouldSeparateByBeads", "Z");
+  (*jniEnv)->SetBooleanField(jniEnv, self_,
+                             _f_PDFTextStripper__shouldSeparateByBeads, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_sortByPosition = NULL;
+jfieldID _f_PDFTextStripper__sortByPosition = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_org_apache_pdfbox_text_PDFTextStripper_sortByPosition(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_sortByPosition, "sortByPosition","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_sortByPosition));
+JniResult get_PDFTextStripper__sortByPosition(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__sortByPosition,
+             "sortByPosition", "Z");
+  uint8_t _result = (*jniEnv)->GetBooleanField(
+      jniEnv, self_, _f_PDFTextStripper__sortByPosition);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_sortByPosition(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_sortByPosition, "sortByPosition","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_sortByPosition, value));
+JniResult set_PDFTextStripper__sortByPosition(jobject self_, uint8_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__sortByPosition,
+             "sortByPosition", "Z");
+  (*jniEnv)->SetBooleanField(jniEnv, self_, _f_PDFTextStripper__sortByPosition,
+                             value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting = NULL;
+jfieldID _f_PDFTextStripper__addMoreFormatting = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting, "addMoreFormatting","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting));
+JniResult get_PDFTextStripper__addMoreFormatting(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__addMoreFormatting,
+             "addMoreFormatting", "Z");
+  uint8_t _result = (*jniEnv)->GetBooleanField(
+      jniEnv, self_, _f_PDFTextStripper__addMoreFormatting);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting, "addMoreFormatting","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_addMoreFormatting, value));
+JniResult set_PDFTextStripper__addMoreFormatting(jobject self_, uint8_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__addMoreFormatting,
+             "addMoreFormatting", "Z");
+  (*jniEnv)->SetBooleanField(jniEnv, self_,
+                             _f_PDFTextStripper__addMoreFormatting, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_indentThreshold = NULL;
+jfieldID _f_PDFTextStripper__indentThreshold = NULL;
 FFI_PLUGIN_EXPORT
-float get_org_apache_pdfbox_text_PDFTextStripper_indentThreshold(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_indentThreshold, "indentThreshold","F");
-    return ((*jniEnv)->GetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_indentThreshold));
+JniResult get_PDFTextStripper__indentThreshold(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__indentThreshold,
+             "indentThreshold", "F");
+  float _result = (*jniEnv)->GetFloatField(jniEnv, self_,
+                                           _f_PDFTextStripper__indentThreshold);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_indentThreshold(jobject self_, float value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_indentThreshold, "indentThreshold","F");
-    ((*jniEnv)->SetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_indentThreshold, value));
+JniResult set_PDFTextStripper__indentThreshold(jobject self_, float value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__indentThreshold,
+             "indentThreshold", "F");
+  (*jniEnv)->SetFloatField(jniEnv, self_, _f_PDFTextStripper__indentThreshold,
+                           value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_dropThreshold = NULL;
+jfieldID _f_PDFTextStripper__dropThreshold = NULL;
 FFI_PLUGIN_EXPORT
-float get_org_apache_pdfbox_text_PDFTextStripper_dropThreshold(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_dropThreshold, "dropThreshold","F");
-    return ((*jniEnv)->GetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_dropThreshold));
+JniResult get_PDFTextStripper__dropThreshold(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__dropThreshold,
+             "dropThreshold", "F");
+  float _result = (*jniEnv)->GetFloatField(jniEnv, self_,
+                                           _f_PDFTextStripper__dropThreshold);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_dropThreshold(jobject self_, float value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_dropThreshold, "dropThreshold","F");
-    ((*jniEnv)->SetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_dropThreshold, value));
+JniResult set_PDFTextStripper__dropThreshold(jobject self_, float value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__dropThreshold,
+             "dropThreshold", "F");
+  (*jniEnv)->SetFloatField(jniEnv, self_, _f_PDFTextStripper__dropThreshold,
+                           value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance = NULL;
+jfieldID _f_PDFTextStripper__spacingTolerance = NULL;
 FFI_PLUGIN_EXPORT
-float get_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance, "spacingTolerance","F");
-    return ((*jniEnv)->GetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance));
+JniResult get_PDFTextStripper__spacingTolerance(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__spacingTolerance,
+             "spacingTolerance", "F");
+  float _result = (*jniEnv)->GetFloatField(
+      jniEnv, self_, _f_PDFTextStripper__spacingTolerance);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance(jobject self_, float value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance, "spacingTolerance","F");
-    ((*jniEnv)->SetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_spacingTolerance, value));
+JniResult set_PDFTextStripper__spacingTolerance(jobject self_, float value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__spacingTolerance,
+             "spacingTolerance", "F");
+  (*jniEnv)->SetFloatField(jniEnv, self_, _f_PDFTextStripper__spacingTolerance,
+                           value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance = NULL;
+jfieldID _f_PDFTextStripper__averageCharTolerance = NULL;
 FFI_PLUGIN_EXPORT
-float get_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (float)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance, "averageCharTolerance","F");
-    return ((*jniEnv)->GetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance));
+JniResult get_PDFTextStripper__averageCharTolerance(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__averageCharTolerance,
+             "averageCharTolerance", "F");
+  float _result = (*jniEnv)->GetFloatField(
+      jniEnv, self_, _f_PDFTextStripper__averageCharTolerance);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance(jobject self_, float value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance, "averageCharTolerance","F");
-    ((*jniEnv)->SetFloatField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_averageCharTolerance, value));
+JniResult set_PDFTextStripper__averageCharTolerance(jobject self_,
+                                                    float value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__averageCharTolerance,
+             "averageCharTolerance", "F");
+  (*jniEnv)->SetFloatField(jniEnv, self_,
+                           _f_PDFTextStripper__averageCharTolerance, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_beadRectangles = NULL;
+jfieldID _f_PDFTextStripper__beadRectangles = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_beadRectangles(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_beadRectangles, "beadRectangles","Ljava/util/List;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_beadRectangles));
+JniResult get_PDFTextStripper__beadRectangles(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__beadRectangles,
+             "beadRectangles", "Ljava/util/List;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__beadRectangles));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_beadRectangles(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_beadRectangles, "beadRectangles","Ljava/util/List;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_beadRectangles, value));
+JniResult set_PDFTextStripper__beadRectangles(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__beadRectangles,
+             "beadRectangles", "Ljava/util/List;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__beadRectangles,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle = NULL;
+jfieldID _f_PDFTextStripper__charactersByArticle = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle, "charactersByArticle","Ljava/util/ArrayList;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle));
+JniResult get_PDFTextStripper__charactersByArticle(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__charactersByArticle,
+             "charactersByArticle", "Ljava/util/ArrayList;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__charactersByArticle));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle, "charactersByArticle","Ljava/util/ArrayList;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_charactersByArticle, value));
+JniResult set_PDFTextStripper__charactersByArticle(jobject self_,
+                                                   jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__charactersByArticle,
+             "charactersByArticle", "Ljava/util/ArrayList;");
+  (*jniEnv)->SetObjectField(jniEnv, self_,
+                            _f_PDFTextStripper__charactersByArticle, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_characterListMapping = NULL;
+jfieldID _f_PDFTextStripper__characterListMapping = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_characterListMapping(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_characterListMapping, "characterListMapping","Ljava/util/Map;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_characterListMapping));
+JniResult get_PDFTextStripper__characterListMapping(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__characterListMapping,
+             "characterListMapping", "Ljava/util/Map;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__characterListMapping));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_characterListMapping(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_characterListMapping, "characterListMapping","Ljava/util/Map;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_characterListMapping, value));
+JniResult set_PDFTextStripper__characterListMapping(jobject self_,
+                                                    jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__characterListMapping,
+             "characterListMapping", "Ljava/util/Map;");
+  (*jniEnv)->SetObjectField(jniEnv, self_,
+                            _f_PDFTextStripper__characterListMapping, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_document = NULL;
+jfieldID _f_PDFTextStripper__document = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_document(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_document, "document","Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_document));
+JniResult get_PDFTextStripper__document(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__document, "document",
+             "Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDFTextStripper__document));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_document(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_document, "document","Lorg/apache/pdfbox/pdmodel/PDDocument;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_document, value));
+JniResult set_PDFTextStripper__document(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__document, "document",
+             "Lorg/apache/pdfbox/pdmodel/PDDocument;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__document, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_output = NULL;
+jfieldID _f_PDFTextStripper__output = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_output(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_output, "output","Ljava/io/Writer;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_output));
+JniResult get_PDFTextStripper__output(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__output, "output",
+             "Ljava/io/Writer;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetObjectField(jniEnv, self_, _f_PDFTextStripper__output));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_output(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_output, "output","Ljava/io/Writer;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_output, value));
+JniResult set_PDFTextStripper__output(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__output, "output",
+             "Ljava/io/Writer;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__output, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_inParagraph = NULL;
+jfieldID _f_PDFTextStripper__inParagraph = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_org_apache_pdfbox_text_PDFTextStripper_inParagraph(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (uint8_t)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_inParagraph, "inParagraph","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_inParagraph));
+JniResult get_PDFTextStripper__inParagraph(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__inParagraph,
+             "inParagraph", "Z");
+  uint8_t _result = (*jniEnv)->GetBooleanField(jniEnv, self_,
+                                               _f_PDFTextStripper__inParagraph);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_inParagraph(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_inParagraph, "inParagraph","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_inParagraph, value));
+JniResult set_PDFTextStripper__inParagraph(jobject self_, uint8_t value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__inParagraph,
+             "inParagraph", "Z");
+  (*jniEnv)->SetBooleanField(jniEnv, self_, _f_PDFTextStripper__inParagraph,
+                             value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_LIST_ITEM_EXPRESSIONS = NULL;
+jfieldID _f_PDFTextStripper__LIST_ITEM_EXPRESSIONS = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_LIST_ITEM_EXPRESSIONS() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_LIST_ITEM_EXPRESSIONS, "LIST_ITEM_EXPRESSIONS","L[java/lang/String;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_LIST_ITEM_EXPRESSIONS));
+JniResult get_PDFTextStripper__LIST_ITEM_EXPRESSIONS() {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper,
+                    &_f_PDFTextStripper__LIST_ITEM_EXPRESSIONS,
+                    "LIST_ITEM_EXPRESSIONS", "L[java/lang/String;");
+  jobject _result = to_global_ref((*jniEnv)->GetStaticObjectField(
+      jniEnv, _c_PDFTextStripper, _f_PDFTextStripper__LIST_ITEM_EXPRESSIONS));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns = NULL;
+jfieldID _f_PDFTextStripper__listOfPatterns = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns(jobject self_) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns, "listOfPatterns","Ljava/util/List;");
-    return to_global_ref((*jniEnv)->GetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns));
+JniResult get_PDFTextStripper__listOfPatterns(jobject self_) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__listOfPatterns,
+             "listOfPatterns", "Ljava/util/List;");
+  jobject _result = to_global_ref((*jniEnv)->GetObjectField(
+      jniEnv, self_, _f_PDFTextStripper__listOfPatterns));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns(jobject self_, jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns, "listOfPatterns","Ljava/util/List;");
-    ((*jniEnv)->SetObjectField(jniEnv, self_, _f_org_apache_pdfbox_text_PDFTextStripper_listOfPatterns, value));
+JniResult set_PDFTextStripper__listOfPatterns(jobject self_, jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_PDFTextStripper, &_f_PDFTextStripper__listOfPatterns,
+             "listOfPatterns", "Ljava/util/List;");
+  (*jniEnv)->SetObjectField(jniEnv, self_, _f_PDFTextStripper__listOfPatterns,
+                            value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP = NULL;
+jfieldID _f_PDFTextStripper__MIRRORING_CHAR_MAP = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP() {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (jobject)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP, "MIRRORING_CHAR_MAP","Ljava/util/Map;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP));
+JniResult get_PDFTextStripper__MIRRORING_CHAR_MAP() {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper, &_f_PDFTextStripper__MIRRORING_CHAR_MAP,
+                    "MIRRORING_CHAR_MAP", "Ljava/util/Map;");
+  jobject _result = to_global_ref((*jniEnv)->GetStaticObjectField(
+      jniEnv, _c_PDFTextStripper, _f_PDFTextStripper__MIRRORING_CHAR_MAP));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP(jobject value) {
-    load_env();
-    load_class_gr(&_c_org_apache_pdfbox_text_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
-    if (_c_org_apache_pdfbox_text_PDFTextStripper == NULL) return (void)0;
-    load_static_field(_c_org_apache_pdfbox_text_PDFTextStripper, &_f_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP, "MIRRORING_CHAR_MAP","Ljava/util/Map;");
-    ((*jniEnv)->SetStaticObjectField(jniEnv, _c_org_apache_pdfbox_text_PDFTextStripper, _f_org_apache_pdfbox_text_PDFTextStripper_MIRRORING_CHAR_MAP, value));
+JniResult set_PDFTextStripper__MIRRORING_CHAR_MAP(jobject value) {
+  load_env();
+  load_class_gr(&_c_PDFTextStripper, "org/apache/pdfbox/text/PDFTextStripper");
+  if (_c_PDFTextStripper == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_PDFTextStripper, &_f_PDFTextStripper__MIRRORING_CHAR_MAP,
+                    "MIRRORING_CHAR_MAP", "Ljava/util/Map;");
+  (*jniEnv)->SetStaticObjectField(jniEnv, _c_PDFTextStripper,
+                                  _f_PDFTextStripper__MIRRORING_CHAR_MAP,
+                                  value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
-
-
diff --git a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/Main.java b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/Main.java
index eb1d0a4..bd54b3f 100644
--- a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/Main.java
+++ b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/Main.java
@@ -14,9 +14,7 @@
 import java.io.File;
 import java.io.FileFilter;
 import java.io.IOException;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 import javax.tools.DocumentationTool;
 import javax.tools.ToolProvider;
@@ -123,6 +121,7 @@
       if (list == null) {
         throw new IllegalArgumentException();
       }
+      Arrays.sort(list);
       for (var path : list) {
         if (path.isDirectory()) {
           queue.add(path);
diff --git a/pkgs/jnigen/lib/src/bindings/c_bindings.dart b/pkgs/jnigen/lib/src/bindings/c_bindings.dart
index bdf20bd..701a66b 100644
--- a/pkgs/jnigen/lib/src/bindings/c_bindings.dart
+++ b/pkgs/jnigen/lib/src/bindings/c_bindings.dart
@@ -7,17 +7,14 @@
 
 import 'common.dart';
 
-// TODO(#52): Do not use long names in C bindings. Use conflict-renamed short
-// name as class name; Use `__` between class & method name.
-
-// fullName / mangled name =
-// binaryName with replace('.', '_'), replace('$', '__');
-
 class CBindingGenerator {
-  static const _classVarPrefix = '_c';
-  static const _methodVarPrefix = '_m';
-  static const _fieldVarPrefix = '_f';
+  static const classVarPrefix = '_c';
+  static const methodVarPrefix = '_m';
+  static const fieldVarPrefix = '_f';
   static final indent = ' ' * 4;
+  static const jniResultType = 'JniResult';
+  static const ifError =
+      '(JniResult){.result = {.j = 0}, .exception = check_exception()}';
 
   // These should be avoided in parameter names.
   static const _cTypeKeywords = {
@@ -39,10 +36,10 @@
 
   String _class(ClassDecl c) {
     final s = StringBuffer();
-    final fullName = mangledClassName(c);
+    final classNameInC = getUniqueClassName(c);
 
     // global variable in C that holds the reference to class
-    final classVar = '${_classVarPrefix}_$fullName';
+    final classVar = '${classVarPrefix}_$classNameInC';
     s.write('// ${c.binaryName}\n');
     s.write('jclass $classVar = NULL;\n\n');
 
@@ -68,30 +65,26 @@
   }
 
   String _method(ClassDecl c, Method m) {
-    final cClassName = mangledClassName(c);
+    final classNameInC = getUniqueClassName(c);
     final isACtor = isCtor(m);
     final isStatic = isStaticMethod(m);
 
     final s = StringBuffer();
     final name = m.finalName;
-
-    final methodID = '${_methodVarPrefix}_${cClassName}_$name';
+    final functionName = memberNameInC(c, name);
+    final methodID = '${methodVarPrefix}_$functionName';
     s.write('jmethodID $methodID = NULL;\n');
 
-    final returnType = isCtor(m) ? 'jobject' : m.returnType.name;
-    final cReturnType = getCType(returnType);
-    final cMethodName = '${cClassName}_$name';
+    final cMethodName = memberNameInC(c, name);
     final cParams = _formalArgs(m);
     s.write('FFI_PLUGIN_EXPORT\n');
-    s.write('$cReturnType $cMethodName($cParams) {\n');
+    s.write('$jniResultType $cMethodName($cParams) {\n');
 
-    final classVar = '${_classVarPrefix}_$cClassName';
+    final classVar = '${classVarPrefix}_$classNameInC';
     final jniSignature = getJniSignature(m);
 
-    final ifError = '($cReturnType)0';
-
     s.write(_loadEnvCall);
-    s.write(_loadClassCall(classVar, getInternalName(c.binaryName), ifError));
+    s.write(_loadClassCall(classVar, getInternalName(c.binaryName)));
 
     final ifStatic = isStatic ? 'static_' : '';
     s.write('${indent}load_${ifStatic}method($classVar, '
@@ -107,7 +100,6 @@
     if (returnTypeName != 'void') {
       s.write('${getCType(returnTypeName)} _result = ');
     }
-
     final callType = _typeNameAtCallSite(m.returnType);
     final callArgs = _callArgs(m, classVar, methodID);
     if (isACtor) {
@@ -116,17 +108,14 @@
       final ifStatic = isStatic ? 'Static' : '';
       s.write('(*jniEnv)->Call$ifStatic${callType}Method($callArgs);\n');
     }
-    if (returnTypeName != 'void') {
-      s.write(_result(m));
-    }
+    s.write(_result(m));
     s.write('}\n');
     return s.toString();
   }
 
   String _field(ClassDecl c, Field f) {
-    final cClassName = mangledClassName(c);
+    final cClassName = getUniqueClassName(c);
     final isStatic = isStaticField(f);
-
     // If the field is final and default is assigned, then no need to wrap
     // this field. It should then be a constant in dart code.
     if (isStatic && isFinalField(f) && f.defaultValue != null) {
@@ -136,17 +125,16 @@
     final s = StringBuffer();
 
     final fieldName = f.finalName;
-    final fieldVar = "${_fieldVarPrefix}_${cClassName}_$fieldName";
-
+    final fieldNameInC = memberNameInC(c, fieldName);
+    final fieldVar = "${fieldVarPrefix}_$fieldNameInC";
     s.write('jfieldID $fieldVar = NULL;\n');
-    final classVar = '${_classVarPrefix}_$cClassName';
+    final classVar = '${classVarPrefix}_$cClassName';
 
     void writeAccessor({bool isSetter = false}) {
-      final ct = isSetter ? 'void' : getCType(f.type.name);
-      // Getter
       final prefix = isSetter ? 'set' : 'get';
       s.write('FFI_PLUGIN_EXPORT\n');
-      s.write('$ct ${prefix}_${memberNameInC(c, fieldName)}(');
+      const cReturnType = jniResultType;
+      s.write('$cReturnType ${prefix}_$fieldNameInC(');
       final formalArgs = <String>[
         if (!isStatic) 'jobject self_',
         if (isSetter) '${getCType(f.type.name)} value',
@@ -154,8 +142,7 @@
       s.write(formalArgs.join(', '));
       s.write(') {\n');
       s.write(_loadEnvCall);
-      s.write(
-          _loadClassCall(classVar, getInternalName(c.binaryName), '($ct)0'));
+      s.write(_loadClassCall(classVar, getInternalName(c.binaryName)));
 
       var ifStatic = isStatic ? 'static_' : '';
       s.write(
@@ -163,17 +150,24 @@
           '"${_fieldSignature(f)}");\n');
 
       ifStatic = isStatic ? 'Static' : '';
+      final self = isStatic ? classVar : 'self_';
       final callType = _typeNameAtCallSite(f.type);
-      final acc = isSetter ? 'Set' : 'Get';
-      final ret = isSetter ? '' : 'return ';
-      final conv = !isSetter && !isPrimitive(f.type) ? 'to_global_ref' : '';
-      s.write('$indent$ret$conv((*jniEnv)->$acc$ifStatic${callType}Field');
-      final secondArg = isStatic ? classVar : 'self_';
-      s.write('(jniEnv, $secondArg, $fieldVar');
       if (isSetter) {
-        s.write(', value');
+        s.write('$indent(*jniEnv)->Set$ifStatic${callType}Field(jniEnv, '
+            '$self, $fieldVar, value);\n');
+        s.write('${indent}return $ifError;\n');
+      } else {
+        var getterExpr = '(*jniEnv)->Get$ifStatic${callType}Field(jniEnv, '
+            '$self, $fieldVar)';
+        if (!isPrimitive(f.type)) {
+          getterExpr = 'to_global_ref($getterExpr)';
+        }
+        final cResultType = getCType(f.type.name);
+        s.write('$indent$cResultType _result = $getterExpr;\n');
+        final unionField = getJValueField(f.type);
+        s.write('${indent}return (JniResult){.result = '
+            '{.$unionField = _result}, .exception = check_exception()};\n');
       }
-      s.write('));\n');
       s.write('}\n\n');
     }
 
@@ -187,7 +181,7 @@
 
   final String _loadEnvCall = '${indent}load_env();\n';
 
-  String _loadClassCall(String classVar, String internalName, String ifError) {
+  String _loadClassCall(String classVar, String internalName) {
     return '${indent}load_class_gr(&$classVar, '
         '"$internalName");\n'
         '${indent}if ($classVar == NULL) return $ifError;\n';
@@ -209,6 +203,24 @@
     return args.join(", ");
   }
 
+  String getJValueField(TypeUsage type) {
+    const primitives = {
+      'boolean': 'z',
+      'byte': 'b',
+      'short': 's',
+      'char': 'c',
+      'int': 'i',
+      'long': 'j',
+      'float': 'f',
+      'double': 'd',
+      'void': 'j', // in case of void return, just write 0 to largest field.
+    };
+    if (isPrimitive(type)) {
+      return primitives[type.name]!;
+    }
+    return 'l';
+  }
+
   // Returns arguments at call site, concatenated by `,`.
   String _callArgs(Method m, String classVar, String methodVar) {
     final args = ['jniEnv'];
@@ -227,11 +239,21 @@
 
   String _result(Method m) {
     final cReturnType = getCType(m.returnType.name);
+    String valuePart;
+    String unionField;
     if (cReturnType == 'jobject' || isCtor(m)) {
-      return '${indent}return to_global_ref(_result);\n';
+      unionField = 'l';
+      valuePart = 'to_global_ref(_result)';
+    } else if (cReturnType == 'void') {
+      // in case of void return, just write 0 in result part of JniResult
+      unionField = 'j';
+      valuePart = '0';
     } else {
-      return '${indent}return _result;\n';
+      unionField = getJValueField(m.returnType);
+      valuePart = '_result';
     }
+    const exceptionPart = 'check_exception()';
+    return '${indent}return (JniResult){.result = {.$unionField = $valuePart}, .exception = $exceptionPart};\n';
   }
 
   String _fieldSignature(Field f) {
diff --git a/pkgs/jnigen/lib/src/bindings/common.dart b/pkgs/jnigen/lib/src/bindings/common.dart
index a8ecccb..5e40605 100644
--- a/pkgs/jnigen/lib/src/bindings/common.dart
+++ b/pkgs/jnigen/lib/src/bindings/common.dart
@@ -27,8 +27,14 @@
 
   static const String ffiVoidType = '${ffi}Void';
 
+  static const String jobjectType = '${jni}JObject';
+
+  static const String jthrowableType = '${jni}JThrowable';
+
   static const String jniObjectType = '${jni}JniObject';
 
+  static const String jniResultType = '${jni}JniResult';
+
   /// Formal parameters list of the generated function.
   ///
   /// This is the signature seen by the user.
@@ -53,12 +59,11 @@
   String dartSigForField(Field f,
       {bool isSetter = false, required bool isFfiSig}) {
     final conv = isFfiSig ? dartFfiType : dartInnerType;
-    final voidType = isFfiSig ? ffiVoidType : 'void';
-    final ref = f.modifiers.contains('static') ? '' : '$voidPointer, ';
+    final ref = f.modifiers.contains('static') ? '' : '$jobjectType, ';
     if (isSetter) {
-      return '$voidType Function($ref${conv(f.type)})';
+      return '$jthrowableType Function($ref${conv(f.type)})';
     }
-    return '${conv(f.type)} Function($ref)';
+    return '$jniResultType Function($ref)';
   }
 
   String dartSigForMethod(Method m, {required bool isFfiSig}) {
@@ -67,8 +72,7 @@
     for (var param in m.params) {
       argTypes.add(conv(param.type));
     }
-    final retType = isCtor(m) ? voidPointer : conv(m.returnType);
-    return '$retType Function (${argTypes.join(", ")})';
+    return '$jniResultType Function (${argTypes.join(", ")})';
   }
 
   String _dartType(TypeUsage t, {SymbolResolver? resolver}) {
@@ -146,6 +150,24 @@
     throw SkipException('Not a constant of a known type.');
   }
 
+  String getJValueAccessor(TypeUsage type) {
+    const primitives = {
+      'boolean': 'boolean',
+      'byte': 'byte',
+      'short': 'short',
+      'char': 'char',
+      'int': 'integer',
+      'long': 'long',
+      'float': 'float',
+      'double': 'doubleFloat',
+      'void': 'check()',
+    };
+    if (isPrimitive(type)) {
+      return primitives[type.name]!;
+    }
+    return 'object';
+  }
+
   String originalFieldDecl(Field f) {
     final declStmt = '${f.type.shorthand} ${f.name}';
     return [...f.modifiers, declStmt].join(' ');
@@ -170,7 +192,7 @@
 
   String toDartResult(String expr, TypeUsage type, String dartType) {
     if (isPrimitive(type)) {
-      return type.name == 'boolean' ? '$expr != 0' : expr;
+      return expr;
     }
     return '$dartType.fromRef($expr)';
   }
@@ -198,11 +220,15 @@
 
 /// class name canonicalized for C bindings, by replacing "." with "_" and
 /// "$" with "__".
-String mangledClassName(ClassDecl decl) =>
-    decl.binaryName.replaceAll('.', '_').replaceAll('\$', '__');
+String getUniqueClassName(ClassDecl decl) {
+  if (!decl.isPreprocessed) {
+    throw StateError("class not preprocessed: ${decl.binaryName}");
+  }
+  return decl.uniqueName;
+}
 
 String memberNameInC(ClassDecl decl, String name) =>
-    "${mangledClassName(decl)}_$name";
+    "${getUniqueClassName(decl)}__$name";
 
 String getCType(String binaryName) {
   switch (binaryName) {
@@ -288,6 +314,8 @@
 bool isFinalMethod(Method m) => m.modifiers.contains('final');
 
 bool isCtor(Method m) => m.name == '<init>';
+
+// static methods & constructors do not have self param.
 bool hasSelfParam(Method m) => !isStaticMethod(m) && !isCtor(m);
 
 bool isObjectField(Field f) => !isPrimitive(f.type);
diff --git a/pkgs/jnigen/lib/src/bindings/dart_bindings.dart b/pkgs/jnigen/lib/src/bindings/dart_bindings.dart
index d656745..f7741e5 100644
--- a/pkgs/jnigen/lib/src/bindings/dart_bindings.dart
+++ b/pkgs/jnigen/lib/src/bindings/dart_bindings.dart
@@ -119,17 +119,15 @@
       final className = _getSimpleName(c.binaryName);
       final ctorFnName = name == 'ctor' ? className : '$className.$name';
       s.write('$ctorFnName(${formalArgs(m)}) : '
-          'super.fromRef($wrapperExpr) { jni.Jni.env.checkException(); }\n');
+          'super.fromRef($wrapperExpr.object);\n');
       return s.toString();
     }
 
-    var wrapperExpr = '$sym(${actualArgs(m)})';
+    final resultGetter = getJValueAccessor(m.returnType);
+    var wrapperExpr = '$sym(${actualArgs(m)}).$resultGetter';
     wrapperExpr = toDartResult(wrapperExpr, m.returnType, returnType);
-    final depth = '$indent$indent';
-    s.write('$returnType $name(${formalArgs(m)}) {');
-    s.write('${depth}final result__ = $wrapperExpr;');
-    s.write('${depth}jni.Jni.env.checkException();');
-    s.write('${depth}return result__;\n$indent}');
+    s.write('$returnType $name(${formalArgs(m)}) => ');
+    s.write('$wrapperExpr;\n');
     return s.toString();
   }
 
@@ -175,7 +173,8 @@
         // getter
         final self = isStaticField(f) ? '' : selfPointer;
         final outer = dartOuterType(f.type);
-        final callExpr = '$sym($self)';
+        final resultGetter = getJValueAccessor(f.type);
+        final callExpr = '$sym($self).$resultGetter';
         final resultExpr = toDartResult(callExpr, f.type, outer);
         s.write('$outer get $name => $resultExpr;\n');
       }
@@ -200,6 +199,7 @@
   static const autoGeneratedNotice = '// Autogenerated by jnigen. '
       'DO NOT EDIT!\n\n';
   static const defaultImports = 'import "dart:ffi" as ffi;\n'
+      'import "package:jni/internal_helpers_for_jnigen.dart";\n'
       'import "package:jni/jni.dart" as jni;\n\n';
   static const defaultLintSuppressions =
       '// ignore_for_file: camel_case_types\n'
diff --git a/pkgs/jnigen/lib/src/bindings/preprocessor.dart b/pkgs/jnigen/lib/src/bindings/preprocessor.dart
index 8ddff1d..1d57471 100644
--- a/pkgs/jnigen/lib/src/bindings/preprocessor.dart
+++ b/pkgs/jnigen/lib/src/bindings/preprocessor.dart
@@ -14,10 +14,17 @@
   static void preprocessAll(Map<String, ClassDecl> classes, Config config,
       {bool renameClasses = false}) {
     final Map<String, int> classNameCounts = {};
+    final rootPackage = config.rootPackage;
     for (var c in classes.values) {
+      final packageName = c.packageName;
+      if (rootPackage != null && !packageName.startsWith('$rootPackage.')) {
+        throw ArgumentError("class ${c.binaryName} not in "
+            "root package $rootPackage");
+      }
       final className = getSimplifiedClassName(c.binaryName);
+      c.uniqueName = renameConflict(classNameCounts, className);
       if (renameClasses) {
-        c.finalName = renameConflict(classNameCounts, className);
+        c.finalName = c.uniqueName;
       } else {
         c.finalName = className;
       }
diff --git a/pkgs/jnigen/lib/src/config/config.dart b/pkgs/jnigen/lib/src/config/config.dart
index 12c32fe..78952e2 100644
--- a/pkgs/jnigen/lib/src/config/config.dart
+++ b/pkgs/jnigen/lib/src/config/config.dart
@@ -157,6 +157,7 @@
     this.cRoot,
     this.dartRoot,
     this.cSubdir,
+    this.rootPackage,
     this.exclude,
     this.sourcePath,
     this.classPath,
@@ -209,6 +210,16 @@
   /// Subfolder relative to [cRoot] to write generated C code.
   String? cSubdir;
 
+  /// Java package corresponding to the dart_root directory.
+  ///
+  /// By default, the complete java hierarchy is mirrored. For instance,
+  /// `org.apache.pdfbox.text` becomes `org/apache/pdfbox/text.dart`.
+  /// This is often undesirable, when all packages have a common package. In
+  /// such cases, a super-package name can be provided. This will be assumed as
+  /// the prefix of all packages and hierarchy will be created relative to this
+  /// package.
+  String? rootPackage;
+
   /// Output file or folder in non-legacy modes
   Uri? outputPath;
 
@@ -232,6 +243,15 @@
   final String? preamble;
 
   /// Additional java package -> dart package mappings (Experimental).
+  ///
+  /// a mapping com.abc.package -> 'package:my_package.dart/my_import.dart'
+  /// in this configuration suggests that any reference to a type from
+  /// com.abc.package shall resolve to an import of 'package:my_package.dart'.
+  ///
+  /// This can be as granular
+  /// `com.abc.package.Class -> 'package:abc/abc.dart'`
+  /// or coarse
+  /// `com.abc.package` -> 'package:abc/abc.dart'`
   final Map<String, String>? importMap;
 
   /// Configuration to search for Android SDK libraries (Experimental).
@@ -325,6 +345,7 @@
       dartRoot: directoryUri(prov.getString(_Props.dartRoot)),
       outputPath: fileUri(prov.getString(_Props.outputPath)),
       cSubdir: prov.getString(_Props.cSubdir),
+      rootPackage: prov.getString(_Props.rootPackage),
       preamble: prov.getString(_Props.preamble),
       libraryName: must(prov.getString, '', _Props.libraryName),
       importMap: prov.getStringMap(_Props.importMap),
@@ -392,9 +413,10 @@
   static const importMap = 'import_map';
   static const outputPath = 'output_path';
   static const bindingsType = 'bindings_type';
+  static const dartRoot = 'dart_root';
   static const cRoot = 'c_root';
   static const cSubdir = 'c_subdir';
-  static const dartRoot = 'dart_root';
+  static const rootPackage = 'root_package';
   static const preamble = 'preamble';
   static const libraryName = 'library_name';
   static const logLevel = 'log_level';
diff --git a/pkgs/jnigen/lib/src/elements/elements.dart b/pkgs/jnigen/lib/src/elements/elements.dart
index 879fade..664d66b 100644
--- a/pkgs/jnigen/lib/src/elements/elements.dart
+++ b/pkgs/jnigen/lib/src/elements/elements.dart
@@ -58,8 +58,8 @@
     this.modifiers = const {},
     required this.simpleName,
     required this.binaryName,
+    required this.packageName,
     this.parentName,
-    this.packageName,
     this.typeParams = const [],
     this.methods = const [],
     this.fields = const [],
@@ -75,7 +75,8 @@
 
   Set<String> modifiers;
   String simpleName, binaryName;
-  String? parentName, packageName;
+  String? parentName;
+  String packageName;
   List<TypeParam> typeParams;
   List<Method> methods;
   List<Field> fields;
@@ -94,9 +95,18 @@
   String get internalName => binaryName.replaceAll(".", "/");
 
   // synthesized attributes
+
+  /// Final name of this class
   @JsonKey(ignore: true)
   late String finalName;
 
+  /// Unique name obtained by renaming conflicting names with a number.
+  ///
+  /// This is used by C bindings instead of fully qualified name to reduce
+  /// the verbosity of generated bindings
+  @JsonKey(ignore: true)
+  late String uniqueName;
+
   @JsonKey(ignore: true)
   bool isPreprocessed = false;
   @JsonKey(ignore: true)
diff --git a/pkgs/jnigen/lib/src/elements/elements.g.dart b/pkgs/jnigen/lib/src/elements/elements.g.dart
index 95944de..e59d1bc 100644
--- a/pkgs/jnigen/lib/src/elements/elements.g.dart
+++ b/pkgs/jnigen/lib/src/elements/elements.g.dart
@@ -21,7 +21,7 @@
       simpleName: json['simpleName'] as String,
       binaryName: json['binaryName'] as String,
       parentName: json['parentName'] as String?,
-      packageName: json['packageName'] as String?,
+      packageName: json['packageName'] as String,
       typeParams: (json['typeParams'] as List<dynamic>?)
               ?.map((e) => TypeParam.fromJson(e as Map<String, dynamic>))
               .toList() ??
diff --git a/pkgs/jnigen/lib/src/writers/files_writer.dart b/pkgs/jnigen/lib/src/writers/files_writer.dart
index f8e724a..252fac1 100644
--- a/pkgs/jnigen/lib/src/writers/files_writer.dart
+++ b/pkgs/jnigen/lib/src/writers/files_writer.dart
@@ -85,34 +85,40 @@
     return '$importedName.$simpleTypeName';
   }
 
-  /// Returns import string, or `null` if package not found.
+  /// Returns import string for [packageToResolve], or `null` if package not
+  /// found.
+  ///
+  /// [binaryName] is the class name trying to be resolved. This parameter is
+  /// requested so that classes included in current bindings can be resolved
+  /// using relative path.
   String? getImport(String packageToResolve, String binaryName) {
-    final right = <String>[];
     var prefix = packageToResolve;
 
+    // short circuit if the requested class is specified directly in import map.
+    if (importMap.containsKey(binaryName)) {
+      return importMap[binaryName]!;
+    }
+
     if (prefix.isEmpty) {
       throw UnsupportedError('unexpected: empty package name.');
     }
 
     final dest = packageToResolve.split('.');
     final src = currentPackage.split('.');
+    // Use relative import when the required class is included in current set
+    // of bindings.
     if (inputClassNames.contains(binaryName)) {
       int common = 0;
-      for (int i = 0; i < src.length && i < dest.length; i++) {
+      // find the common prefix path directory of current package, and directory
+      // of target package
+      // src.length - 1 simply corresponds to directory of the package.
+      for (int i = 0; i < src.length - 1 && i < dest.length - 1; i++) {
         if (src[i] == dest[i]) {
           common++;
         }
       }
-      // a.b.c => a/b/c.dart
-      // from there
-      // a/b.dart => ../b.dart
-      // a.b.d => d.dart
-      // a.b.c.d => c/d.dart
-      var pathToCommon = '';
-      if (common < src.length) {
-        pathToCommon = '../' * (src.length - common);
-      }
-      final pathToPackage = dest.skip(max(common - 1, 0)).join('/');
+      final pathToCommon = '../' * ((src.length - 1) - common);
+      final pathToPackage = dest.sublist(max(common, 0)).join('/');
       relativeImportedPackages.add(packageToResolve);
       return '$pathToCommon$pathToPackage.dart';
     }
@@ -120,25 +126,14 @@
     while (prefix.isNotEmpty) {
       final split = cutFromLast(prefix, '.');
       final left = split[0];
-      right.add(split[1]);
-      // eg: packages[org.apache.pdfbox]/org/apache/pdfbox.dart
       if (importMap.containsKey(prefix)) {
-        final sub = packageToResolve.replaceAll('.', '/');
-        final pkg = _suffix(importMap[prefix]!, '/');
-        return '$pkg$sub.dart';
+        return importMap[prefix]!;
       }
       prefix = left;
     }
     return null;
   }
 
-  String _suffix(String str, String suffix) {
-    if (str.endsWith(suffix)) {
-      return str;
-    }
-    return str + suffix;
-  }
-
   @override
   List<String> getImportStrings() {
     return importStrings;
@@ -178,16 +173,11 @@
     final Map<String, ClassDecl> classesByName = {};
     for (var c in classes) {
       classesByName.putIfAbsent(c.binaryName, () => c);
-      packages.putIfAbsent(c.packageName!, () => <ClassDecl>[]);
-      packages[c.packageName!]!.add(c);
+      packages.putIfAbsent(c.packageName, () => <ClassDecl>[]);
+      packages[c.packageName]!.add(c);
     }
     final classNames = classesByName.keys.toSet();
 
-    if (config.bindingsType == BindingsType.packageStructured) {
-      throw UnimplementedError(
-          "Package structured bindings are not yet implemented");
-    }
-
     final cRoot = config.cRoot!;
     log.info("Using c root = $cRoot");
     final dartRoot = config.dartRoot!;
@@ -251,12 +241,24 @@
     await _copyFileFromPackage(
         'jni', 'src/dartjni.h', cRoot.resolve('$subdir/dartjni.h'));
     await _copyFileFromPackage(
+        'jni', 'src/.clang-format', cRoot.resolve('$subdir/.clang-format'));
+    await _copyFileFromPackage(
         'jnigen', 'cmake/CMakeLists.txt.tmpl', cRoot.resolve('CMakeLists.txt'),
         transform: (s) {
       return s
           .replaceAll('{{LIBRARY_NAME}}', libraryName)
           .replaceAll('{{SUBDIR}}', subdir);
     });
+    log.info('Running clang-format on C bindings');
+    try {
+      final clangFormat = Process.runSync('clang-format', ['-i', cFile.path]);
+      if (clangFormat.exitCode != 0) {
+        printError(clangFormat.stderr);
+        log.warning('clang-format exited with $exitCode');
+      }
+    } on ProcessException catch (e) {
+      log.warning('cannot run clang-format: $e');
+    }
     log.info('Completed.');
   }
 
diff --git a/pkgs/jnigen/test/bindings_test.dart b/pkgs/jnigen/test/bindings_test.dart
index f8d4cd3..015c1a3 100644
--- a/pkgs/jnigen/test/bindings_test.dart
+++ b/pkgs/jnigen/test/bindings_test.dart
@@ -17,7 +17,7 @@
 
 // ignore_for_file: avoid_relative_lib_imports
 import 'simple_package_test/lib/com/github/dart_lang/jnigen/simple_package.dart';
-import 'simple_package_test/lib/com/github/dart_lang/jnigen/pkg2.dart';
+import 'simple_package_test/lib/com/github/dart_lang/jnigen/pkg2.dart' as pkg2;
 import 'jackson_core_test/third_party/lib/com/fasterxml/jackson/core.dart';
 
 import 'test_util/test_util.dart';
@@ -37,7 +37,8 @@
       'javac',
       [
         join(group, 'simple_package', 'Example.java'),
-        join(group, 'pkg2', 'C2.java')
+        join(group, 'pkg2', 'C2.java'),
+        join(group, 'pkg2', 'Example.java'),
       ],
       workingDirectory: simplePackageTestJava);
   await runCommand('dart', [
@@ -69,7 +70,7 @@
     final aux = Example.aux;
     expect(aux.value, equals(true));
     aux.delete();
-    expect(C2.CONSTANT, equals(12));
+    expect(pkg2.C2.CONSTANT, equals(12));
   });
 
   test('static methods', () {
@@ -87,6 +88,12 @@
     aux.delete();
     ex.delete();
   });
+
+  test("Check bindings for same-named classes", () {
+    expect(Example().whichExample(), 0);
+    expect(pkg2.Example().whichExample(), 1);
+  });
+
   test('simple json parsing test', () {
     final json = JniString.fromString('[1, true, false, 2, 4]');
     JsonFactory factory;
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core.dart b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core.dart
index d106959..e0ed1ff 100644
--- a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core.dart
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core.dart
@@ -25,6 +25,7 @@
 // ignore_for_file: unused_element
 
 import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
 import "package:jni/jni.dart" as jni;
 
 import "../../../_init.dart" show jniLookup;
@@ -60,55 +61,54 @@
   /// (and returned by \#getFormatName()
   static const FORMAT_NAME_JSON = "JSON";
 
-  static final _get_DEFAULT_FACTORY_FEATURE_FLAGS = jniLookup<
-              ffi.NativeFunction<ffi.Int32 Function()>>(
-          "get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_FACTORY_FEATURE_FLAGS")
-      .asFunction<int Function()>();
+  static final _get_DEFAULT_FACTORY_FEATURE_FLAGS =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static protected final int DEFAULT_FACTORY_FEATURE_FLAGS
   ///
   /// Bitfield (set of flags) of all factory features that are enabled by default.
   static int get DEFAULT_FACTORY_FEATURE_FLAGS =>
-      _get_DEFAULT_FACTORY_FEATURE_FLAGS();
+      _get_DEFAULT_FACTORY_FEATURE_FLAGS().integer;
 
-  static final _get_DEFAULT_PARSER_FEATURE_FLAGS = jniLookup<
-              ffi.NativeFunction<ffi.Int32 Function()>>(
-          "get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_PARSER_FEATURE_FLAGS")
-      .asFunction<int Function()>();
+  static final _get_DEFAULT_PARSER_FEATURE_FLAGS =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static protected final int DEFAULT_PARSER_FEATURE_FLAGS
   ///
   /// Bitfield (set of flags) of all parser features that are enabled
   /// by default.
   static int get DEFAULT_PARSER_FEATURE_FLAGS =>
-      _get_DEFAULT_PARSER_FEATURE_FLAGS();
+      _get_DEFAULT_PARSER_FEATURE_FLAGS().integer;
 
-  static final _get_DEFAULT_GENERATOR_FEATURE_FLAGS = jniLookup<
-              ffi.NativeFunction<ffi.Int32 Function()>>(
-          "get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_GENERATOR_FEATURE_FLAGS")
-      .asFunction<int Function()>();
+  static final _get_DEFAULT_GENERATOR_FEATURE_FLAGS =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static protected final int DEFAULT_GENERATOR_FEATURE_FLAGS
   ///
   /// Bitfield (set of flags) of all generator features that are enabled
   /// by default.
   static int get DEFAULT_GENERATOR_FEATURE_FLAGS =>
-      _get_DEFAULT_GENERATOR_FEATURE_FLAGS();
+      _get_DEFAULT_GENERATOR_FEATURE_FLAGS().integer;
 
-  static final _get_DEFAULT_ROOT_VALUE_SEPARATOR = jniLookup<
-              ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-          "get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_ROOT_VALUE_SEPARATOR")
-      .asFunction<ffi.Pointer<ffi.Void> Function()>();
+  static final _get_DEFAULT_ROOT_VALUE_SEPARATOR =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public final com.fasterxml.jackson.core.SerializableString DEFAULT_ROOT_VALUE_SEPARATOR
   /// The returned object must be deleted after use, by calling the `delete` method.
   static jni.JniObject get DEFAULT_ROOT_VALUE_SEPARATOR =>
-      jni.JniObject.fromRef(_get_DEFAULT_ROOT_VALUE_SEPARATOR());
+      jni.JniObject.fromRef(_get_DEFAULT_ROOT_VALUE_SEPARATOR().object);
 
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonFactory_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "JsonFactory__ctor")
+      .asFunction<jni.JniResult Function()>();
 
   /// from: public void <init>()
   ///
@@ -120,28 +120,24 @@
   /// processing objects (such as symbol tables parsers use)
   /// and this reuse only works within context of a single
   /// factory instance.
-  JsonFactory() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
+  JsonFactory() : super.fromRef(_ctor().object);
 
   static final _ctor1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_ctor1")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__ctor1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public void <init>(com.fasterxml.jackson.core.ObjectCodec oc)
-  JsonFactory.ctor1(jni.JniObject oc) : super.fromRef(_ctor1(oc.reference)) {
-    jni.Jni.env.checkException();
-  }
+  JsonFactory.ctor1(jni.JniObject oc)
+      : super.fromRef(_ctor1(oc.reference).object);
 
   static final _ctor2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_ctor2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__ctor2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: protected void <init>(com.fasterxml.jackson.core.JsonFactory src, com.fasterxml.jackson.core.ObjectCodec codec)
@@ -151,30 +147,27 @@
   ///@param codec Databinding-level codec to use, if any
   ///@since 2.2.1
   JsonFactory.ctor2(JsonFactory src, jni.JniObject codec)
-      : super.fromRef(_ctor2(src.reference, codec.reference)) {
-    jni.Jni.env.checkException();
-  }
+      : super.fromRef(_ctor2(src.reference, codec.reference).object);
 
   static final _ctor3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_ctor3")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__ctor3")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public void <init>(com.fasterxml.jackson.core.JsonFactoryBuilder b)
   ///
   /// Constructor used by JsonFactoryBuilder for instantiation.
   ///@param b Builder that contains settings to use
   ///@since 2.10
-  JsonFactory.ctor3(jni.JniObject b) : super.fromRef(_ctor3(b.reference)) {
-    jni.Jni.env.checkException();
-  }
+  JsonFactory.ctor3(jni.JniObject b)
+      : super.fromRef(_ctor3(b.reference).object);
 
   static final _ctor4 = jniLookup<
           ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                  ffi.Uint8)>>("com_fasterxml_jackson_core_JsonFactory_ctor4")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>, int)>();
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__ctor4")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: protected void <init>(com.fasterxml.jackson.core.TSFBuilder<?,?> b, boolean bogus)
   ///
@@ -184,15 +177,13 @@
   ///@param b Builder that contains settings to use
   ///@param bogus Argument only needed to separate constructor signature; ignored
   JsonFactory.ctor4(jni.JniObject b, bool bogus)
-      : super.fromRef(_ctor4(b.reference, bogus ? 1 : 0)) {
-    jni.Jni.env.checkException();
-  }
+      : super.fromRef(_ctor4(b.reference, bogus ? 1 : 0).object);
 
   static final _rebuild = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_rebuild")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__rebuild")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.TSFBuilder<?,?> rebuild()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -201,16 +192,12 @@
   /// with settings of this factory.
   ///@return Builder instance to use
   ///@since 2.10
-  jni.JniObject rebuild() {
-    final result__ = jni.JniObject.fromRef(_rebuild(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject rebuild() => jni.JniObject.fromRef(_rebuild(reference).object);
 
   static final _builder =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonFactory_builder")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "JsonFactory__builder")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public com.fasterxml.jackson.core.TSFBuilder<?,?> builder()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -223,17 +210,13 @@
   /// NOTE: signature unfortunately does not expose true implementation type; this
   /// will be fixed in 3.0.
   ///@return Builder instance to use
-  static jni.JniObject builder() {
-    final result__ = jni.JniObject.fromRef(_builder());
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static jni.JniObject builder() => jni.JniObject.fromRef(_builder().object);
 
   static final _copy = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_copy")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__copy")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory copy()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -250,17 +233,13 @@
   /// set codec after making the copy.
   ///@return Copy of this factory instance
   ///@since 2.1
-  JsonFactory copy() {
-    final result__ = JsonFactory.fromRef(_copy(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory copy() => JsonFactory.fromRef(_copy(reference).object);
 
   static final _readResolve = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_readResolve")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__readResolve")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: protected java.lang.Object readResolve()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -271,16 +250,14 @@
   ///
   /// Note: must be overridden by sub-classes as well.
   ///@return Newly constructed instance
-  jni.JniObject readResolve() {
-    final result__ = jni.JniObject.fromRef(_readResolve(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject readResolve() =>
+      jni.JniObject.fromRef(_readResolve(reference).object);
 
-  static final _requiresPropertyOrdering =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_requiresPropertyOrdering")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _requiresPropertyOrdering = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory__requiresPropertyOrdering")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean requiresPropertyOrdering()
   ///
@@ -298,16 +275,14 @@
   ///@return Whether format supported by this factory
   ///   requires Object properties to be ordered.
   ///@since 2.3
-  bool requiresPropertyOrdering() {
-    final result__ = _requiresPropertyOrdering(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool requiresPropertyOrdering() =>
+      _requiresPropertyOrdering(reference).boolean;
 
-  static final _canHandleBinaryNatively =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_canHandleBinaryNatively")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _canHandleBinaryNatively = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory__canHandleBinaryNatively")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canHandleBinaryNatively()
   ///
@@ -322,16 +297,13 @@
   ///@return Whether format supported by this factory
   ///    supports native binary content
   ///@since 2.3
-  bool canHandleBinaryNatively() {
-    final result__ = _canHandleBinaryNatively(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canHandleBinaryNatively() => _canHandleBinaryNatively(reference).boolean;
 
-  static final _canUseCharArrays =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_canUseCharArrays")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _canUseCharArrays = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__canUseCharArrays")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canUseCharArrays()
   ///
@@ -346,16 +318,13 @@
   ///@return Whether access to decoded textual content can be efficiently
   ///   accessed using parser method {@code getTextCharacters()}.
   ///@since 2.4
-  bool canUseCharArrays() {
-    final result__ = _canUseCharArrays(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canUseCharArrays() => _canUseCharArrays(reference).boolean;
 
-  static final _canParseAsync =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_canParseAsync")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _canParseAsync = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__canParseAsync")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canParseAsync()
   ///
@@ -366,48 +335,37 @@
   ///@return Whether this factory supports non-blocking ("async") parsing or
   ///    not (and consequently whether {@code createNonBlockingXxx()} method(s) work)
   ///@since 2.9
-  bool canParseAsync() {
-    final result__ = _canParseAsync(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canParseAsync() => _canParseAsync(reference).boolean;
 
   static final _getFormatReadFeatureType = jniLookup<
               ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getFormatReadFeatureType")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory__getFormatReadFeatureType")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Class<? extends com.fasterxml.jackson.core.FormatFeature> getFormatReadFeatureType()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject getFormatReadFeatureType() {
-    final result__ =
-        jni.JniObject.fromRef(_getFormatReadFeatureType(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getFormatReadFeatureType() =>
+      jni.JniObject.fromRef(_getFormatReadFeatureType(reference).object);
 
   static final _getFormatWriteFeatureType = jniLookup<
               ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getFormatWriteFeatureType")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory__getFormatWriteFeatureType")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Class<? extends com.fasterxml.jackson.core.FormatFeature> getFormatWriteFeatureType()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject getFormatWriteFeatureType() {
-    final result__ =
-        jni.JniObject.fromRef(_getFormatWriteFeatureType(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getFormatWriteFeatureType() =>
+      jni.JniObject.fromRef(_getFormatWriteFeatureType(reference).object);
 
   static final _canUseSchema = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_canUseSchema")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__canUseSchema")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
   ///
@@ -420,17 +378,14 @@
   ///@param schema Schema instance to check
   ///@return Whether parsers and generators constructed by this factory
   ///   can use specified format schema instance
-  bool canUseSchema(jni.JniObject schema) {
-    final result__ = _canUseSchema(reference, schema.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canUseSchema(jni.JniObject schema) =>
+      _canUseSchema(reference, schema.reference).boolean;
 
   static final _getFormatName = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getFormatName")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getFormatName")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.String getFormatName()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -441,34 +396,27 @@
   /// Note: sub-classes should override this method; default
   /// implementation will return null for all sub-classes
   ///@return Name of the format handled by parsers, generators this factory creates
-  jni.JniString getFormatName() {
-    final result__ = jni.JniString.fromRef(_getFormatName(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString getFormatName() =>
+      jni.JniString.fromRef(_getFormatName(reference).object);
 
   static final _hasFormat = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_hasFormat")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__hasFormat")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject hasFormat(jni.JniObject acc) {
-    final result__ =
-        jni.JniObject.fromRef(_hasFormat(reference, acc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject hasFormat(jni.JniObject acc) =>
+      jni.JniObject.fromRef(_hasFormat(reference, acc.reference).object);
 
-  static final _requiresCustomCodec =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_requiresCustomCodec")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _requiresCustomCodec = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__requiresCustomCodec")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean requiresCustomCodec()
   ///
@@ -481,51 +429,37 @@
   ///   generators created by this factory; false if a general
   ///   ObjectCodec is enough
   ///@since 2.1
-  bool requiresCustomCodec() {
-    final result__ = _requiresCustomCodec(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool requiresCustomCodec() => _requiresCustomCodec(reference).boolean;
 
   static final _hasJSONFormat = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_hasJSONFormat")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__hasJSONFormat")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: protected com.fasterxml.jackson.core.format.MatchStrength hasJSONFormat(com.fasterxml.jackson.core.format.InputAccessor acc)
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject hasJSONFormat(jni.JniObject acc) {
-    final result__ =
-        jni.JniObject.fromRef(_hasJSONFormat(reference, acc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject hasJSONFormat(jni.JniObject acc) =>
+      jni.JniObject.fromRef(_hasJSONFormat(reference, acc.reference).object);
 
   static final _version = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_version")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__version")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.Version version()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject version() {
-    final result__ = jni.JniObject.fromRef(_version(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject version() => jni.JniObject.fromRef(_version(reference).object);
 
   static final _configure = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "com_fasterxml_jackson_core_JsonFactory_configure")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__configure")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonFactory.Feature f, boolean state)
@@ -537,20 +471,16 @@
   ///@param state Whether to enable or disable the feature
   ///@return This factory instance (to allow call chaining)
   ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead
-  JsonFactory configure(JsonFactory_Feature f, bool state) {
-    final result__ =
-        JsonFactory.fromRef(_configure(reference, f.reference, state ? 1 : 0));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory configure(JsonFactory_Feature f, bool state) =>
+      JsonFactory.fromRef(
+          _configure(reference, f.reference, state ? 1 : 0).object);
 
   static final _enable = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_enable")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__enable")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonFactory.Feature f)
@@ -561,19 +491,15 @@
   ///@param f Feature to enable
   ///@return This factory instance (to allow call chaining)
   ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead
-  JsonFactory enable(JsonFactory_Feature f) {
-    final result__ = JsonFactory.fromRef(_enable(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory enable(JsonFactory_Feature f) =>
+      JsonFactory.fromRef(_enable(reference, f.reference).object);
 
   static final _disable = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_disable")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__disable")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonFactory.Feature f)
@@ -584,85 +510,68 @@
   ///@param f Feature to disable
   ///@return This factory instance (to allow call chaining)
   ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead
-  JsonFactory disable(JsonFactory_Feature f) {
-    final result__ = JsonFactory.fromRef(_disable(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory disable(JsonFactory_Feature f) =>
+      JsonFactory.fromRef(_disable(reference, f.reference).object);
 
   static final _isEnabled = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_isEnabled")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__isEnabled")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonFactory.Feature f)
   ///
   /// Checked whether specified parser feature is enabled.
   ///@param f Feature to check
   ///@return True if the specified feature is enabled
-  bool isEnabled(JsonFactory_Feature f) {
-    final result__ = _isEnabled(reference, f.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isEnabled(JsonFactory_Feature f) =>
+      _isEnabled(reference, f.reference).boolean;
 
-  static final _getParserFeatures =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_getParserFeatures")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getParserFeatures = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getParserFeatures")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final int getParserFeatures()
-  int getParserFeatures() {
-    final result__ = _getParserFeatures(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getParserFeatures() => _getParserFeatures(reference).integer;
 
-  static final _getGeneratorFeatures =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_getGeneratorFeatures")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getGeneratorFeatures = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getGeneratorFeatures")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final int getGeneratorFeatures()
-  int getGeneratorFeatures() {
-    final result__ = _getGeneratorFeatures(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getGeneratorFeatures() => _getGeneratorFeatures(reference).integer;
 
-  static final _getFormatParserFeatures =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory_getFormatParserFeatures")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getFormatParserFeatures = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory__getFormatParserFeatures")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getFormatParserFeatures()
-  int getFormatParserFeatures() {
-    final result__ = _getFormatParserFeatures(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getFormatParserFeatures() => _getFormatParserFeatures(reference).integer;
 
   static final _getFormatGeneratorFeatures = jniLookup<
-              ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getFormatGeneratorFeatures")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory__getFormatGeneratorFeatures")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getFormatGeneratorFeatures()
-  int getFormatGeneratorFeatures() {
-    final result__ = _getFormatGeneratorFeatures(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getFormatGeneratorFeatures() =>
+      _getFormatGeneratorFeatures(reference).integer;
 
   static final _configure1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "com_fasterxml_jackson_core_JsonFactory_configure1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__configure1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state)
@@ -673,20 +582,16 @@
   ///@param f Feature to enable/disable
   ///@param state Whether to enable or disable the feature
   ///@return This factory instance (to allow call chaining)
-  JsonFactory configure1(JsonParser_Feature f, bool state) {
-    final result__ =
-        JsonFactory.fromRef(_configure1(reference, f.reference, state ? 1 : 0));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory configure1(JsonParser_Feature f, bool state) =>
+      JsonFactory.fromRef(
+          _configure1(reference, f.reference, state ? 1 : 0).object);
 
   static final _enable1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_enable1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__enable1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonParser.Feature f)
@@ -696,19 +601,15 @@
   /// (check JsonParser.Feature for list of features)
   ///@param f Feature to enable
   ///@return This factory instance (to allow call chaining)
-  JsonFactory enable1(JsonParser_Feature f) {
-    final result__ = JsonFactory.fromRef(_enable1(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory enable1(JsonParser_Feature f) =>
+      JsonFactory.fromRef(_enable1(reference, f.reference).object);
 
   static final _disable1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_disable1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__disable1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonParser.Feature f)
@@ -718,36 +619,32 @@
   /// (check JsonParser.Feature for list of features)
   ///@param f Feature to disable
   ///@return This factory instance (to allow call chaining)
-  JsonFactory disable1(JsonParser_Feature f) {
-    final result__ = JsonFactory.fromRef(_disable1(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory disable1(JsonParser_Feature f) =>
+      JsonFactory.fromRef(_disable1(reference, f.reference).object);
 
   static final _isEnabled1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_isEnabled1")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__isEnabled1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature f)
   ///
   /// Method for checking if the specified parser feature is enabled.
   ///@param f Feature to check
   ///@return True if specified feature is enabled
-  bool isEnabled1(JsonParser_Feature f) {
-    final result__ = _isEnabled1(reference, f.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isEnabled1(JsonParser_Feature f) =>
+      _isEnabled1(reference, f.reference).boolean;
 
   static final _isEnabled2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_isEnabled2")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__isEnabled2")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f)
   ///
@@ -755,17 +652,14 @@
   ///@param f Feature to check
   ///@return True if specified feature is enabled
   ///@since 2.10
-  bool isEnabled2(jni.JniObject f) {
-    final result__ = _isEnabled2(reference, f.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isEnabled2(jni.JniObject f) =>
+      _isEnabled2(reference, f.reference).boolean;
 
   static final _getInputDecorator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getInputDecorator")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getInputDecorator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.io.InputDecorator getInputDecorator()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -773,19 +667,15 @@
   /// Method for getting currently configured input decorator (if any;
   /// there is no default decorator).
   ///@return InputDecorator configured, if any
-  jni.JniObject getInputDecorator() {
-    final result__ = jni.JniObject.fromRef(_getInputDecorator(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getInputDecorator() =>
+      jni.JniObject.fromRef(_getInputDecorator(reference).object);
 
   static final _setInputDecorator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_setInputDecorator")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__setInputDecorator")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory setInputDecorator(com.fasterxml.jackson.core.io.InputDecorator d)
@@ -795,20 +685,15 @@
   ///@param d Decorator to configure for this factory, if any ({@code null} if none)
   ///@return This factory instance (to allow call chaining)
   ///@deprecated Since 2.10 use JsonFactoryBuilder\#inputDecorator(InputDecorator) instead
-  JsonFactory setInputDecorator(jni.JniObject d) {
-    final result__ =
-        JsonFactory.fromRef(_setInputDecorator(reference, d.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory setInputDecorator(jni.JniObject d) =>
+      JsonFactory.fromRef(_setInputDecorator(reference, d.reference).object);
 
   static final _configure2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "com_fasterxml_jackson_core_JsonFactory_configure2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__configure2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonGenerator.Feature f, boolean state)
@@ -819,20 +704,15 @@
   ///@param f Feature to enable/disable
   ///@param state Whether to enable or disable the feature
   ///@return This factory instance (to allow call chaining)
-  JsonFactory configure2(jni.JniObject f, bool state) {
-    final result__ =
-        JsonFactory.fromRef(_configure2(reference, f.reference, state ? 1 : 0));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory configure2(jni.JniObject f, bool state) => JsonFactory.fromRef(
+      _configure2(reference, f.reference, state ? 1 : 0).object);
 
   static final _enable2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_enable2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__enable2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonGenerator.Feature f)
@@ -842,19 +722,15 @@
   /// (check JsonGenerator.Feature for list of features)
   ///@param f Feature to enable
   ///@return This factory instance (to allow call chaining)
-  JsonFactory enable2(jni.JniObject f) {
-    final result__ = JsonFactory.fromRef(_enable2(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory enable2(jni.JniObject f) =>
+      JsonFactory.fromRef(_enable2(reference, f.reference).object);
 
   static final _disable2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_disable2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__disable2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonGenerator.Feature f)
@@ -864,36 +740,32 @@
   /// (check JsonGenerator.Feature for list of features)
   ///@param f Feature to disable
   ///@return This factory instance (to allow call chaining)
-  JsonFactory disable2(jni.JniObject f) {
-    final result__ = JsonFactory.fromRef(_disable2(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory disable2(jni.JniObject f) =>
+      JsonFactory.fromRef(_disable2(reference, f.reference).object);
 
   static final _isEnabled3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_isEnabled3")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__isEnabled3")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f)
   ///
   /// Check whether specified generator feature is enabled.
   ///@param f Feature to check
   ///@return Whether specified feature is enabled
-  bool isEnabled3(jni.JniObject f) {
-    final result__ = _isEnabled3(reference, f.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isEnabled3(jni.JniObject f) =>
+      _isEnabled3(reference, f.reference).boolean;
 
   static final _isEnabled4 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_isEnabled4")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__isEnabled4")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamWriteFeature f)
   ///
@@ -901,17 +773,14 @@
   ///@param f Feature to check
   ///@return Whether specified feature is enabled
   ///@since 2.10
-  bool isEnabled4(jni.JniObject f) {
-    final result__ = _isEnabled4(reference, f.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isEnabled4(jni.JniObject f) =>
+      _isEnabled4(reference, f.reference).boolean;
 
   static final _getCharacterEscapes = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getCharacterEscapes")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getCharacterEscapes")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.io.CharacterEscapes getCharacterEscapes()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -919,19 +788,15 @@
   /// Method for accessing custom escapes factory uses for JsonGenerators
   /// it creates.
   ///@return Configured {@code CharacterEscapes}, if any; {@code null} if none
-  jni.JniObject getCharacterEscapes() {
-    final result__ = jni.JniObject.fromRef(_getCharacterEscapes(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getCharacterEscapes() =>
+      jni.JniObject.fromRef(_getCharacterEscapes(reference).object);
 
   static final _setCharacterEscapes = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_setCharacterEscapes")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__setCharacterEscapes")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory setCharacterEscapes(com.fasterxml.jackson.core.io.CharacterEscapes esc)
@@ -941,18 +806,14 @@
   /// it creates.
   ///@param esc CharaterEscapes to set (or {@code null} for "none")
   ///@return This factory instance (to allow call chaining)
-  JsonFactory setCharacterEscapes(jni.JniObject esc) {
-    final result__ =
-        JsonFactory.fromRef(_setCharacterEscapes(reference, esc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory setCharacterEscapes(jni.JniObject esc) => JsonFactory.fromRef(
+      _setCharacterEscapes(reference, esc.reference).object);
 
   static final _getOutputDecorator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getOutputDecorator")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getOutputDecorator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.io.OutputDecorator getOutputDecorator()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -961,19 +822,15 @@
   /// there is no default decorator).
   ///@return OutputDecorator configured for generators factory creates, if any;
   ///    {@code null} if none.
-  jni.JniObject getOutputDecorator() {
-    final result__ = jni.JniObject.fromRef(_getOutputDecorator(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getOutputDecorator() =>
+      jni.JniObject.fromRef(_getOutputDecorator(reference).object);
 
   static final _setOutputDecorator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_setOutputDecorator")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__setOutputDecorator")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory setOutputDecorator(com.fasterxml.jackson.core.io.OutputDecorator d)
@@ -983,20 +840,15 @@
   ///@return This factory instance (to allow call chaining)
   ///@param d Output decorator to use, if any
   ///@deprecated Since 2.10 use JsonFactoryBuilder\#outputDecorator(OutputDecorator) instead
-  JsonFactory setOutputDecorator(jni.JniObject d) {
-    final result__ =
-        JsonFactory.fromRef(_setOutputDecorator(reference, d.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory setOutputDecorator(jni.JniObject d) =>
+      JsonFactory.fromRef(_setOutputDecorator(reference, d.reference).object);
 
   static final _setRootValueSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_setRootValueSeparator")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__setRootValueSeparator")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory setRootValueSeparator(java.lang.String sep)
@@ -1007,36 +859,28 @@
   ///@param sep Separator to use, if any; null means that no separator is
   ///   automatically added
   ///@return This factory instance (to allow call chaining)
-  JsonFactory setRootValueSeparator(jni.JniString sep) {
-    final result__ =
-        JsonFactory.fromRef(_setRootValueSeparator(reference, sep.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory setRootValueSeparator(jni.JniString sep) => JsonFactory.fromRef(
+      _setRootValueSeparator(reference, sep.reference).object);
 
   static final _getRootValueSeparator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getRootValueSeparator")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getRootValueSeparator")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.String getRootValueSeparator()
   /// The returned object must be deleted after use, by calling the `delete` method.
   ///
   /// @return Root value separator configured, if any
-  jni.JniString getRootValueSeparator() {
-    final result__ = jni.JniString.fromRef(_getRootValueSeparator(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString getRootValueSeparator() =>
+      jni.JniString.fromRef(_getRootValueSeparator(reference).object);
 
   static final _setCodec = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_setCodec")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__setCodec")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonFactory setCodec(com.fasterxml.jackson.core.ObjectCodec oc)
@@ -1049,33 +893,26 @@
   /// of JsonParser and JsonGenerator instances.
   ///@param oc Codec to use
   ///@return This factory instance (to allow call chaining)
-  JsonFactory setCodec(jni.JniObject oc) {
-    final result__ = JsonFactory.fromRef(_setCodec(reference, oc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonFactory setCodec(jni.JniObject oc) =>
+      JsonFactory.fromRef(_setCodec(reference, oc.reference).object);
 
   static final _getCodec = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_getCodec")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__getCodec")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.ObjectCodec getCodec()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject getCodec() {
-    final result__ = jni.JniObject.fromRef(_getCodec(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getCodec() =>
+      jni.JniObject.fromRef(_getCodec(reference).object);
 
   static final _createParser = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.File f)
@@ -1097,19 +934,15 @@
   /// the parser, since caller has no access to it.
   ///@param f File that contains JSON content to parse
   ///@since 2.1
-  JsonParser createParser(jni.JniObject f) {
-    final result__ = JsonParser.fromRef(_createParser(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser(jni.JniObject f) =>
+      JsonParser.fromRef(_createParser(reference, f.reference).object);
 
   static final _createParser1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.net.URL url)
@@ -1129,20 +962,15 @@
   /// the parser, since caller has no access to it.
   ///@param url URL pointing to resource that contains JSON content to parse
   ///@since 2.1
-  JsonParser createParser1(jni.JniObject url) {
-    final result__ =
-        JsonParser.fromRef(_createParser1(reference, url.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser1(jni.JniObject url) =>
+      JsonParser.fromRef(_createParser1(reference, url.reference).object);
 
   static final _createParser2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.InputStream in)
@@ -1165,20 +993,15 @@
   /// For other charsets use \#createParser(java.io.Reader).
   ///@param in InputStream to use for reading JSON content to parse
   ///@since 2.1
-  JsonParser createParser2(jni.JniObject in0) {
-    final result__ =
-        JsonParser.fromRef(_createParser2(reference, in0.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser2(jni.JniObject in0) =>
+      JsonParser.fromRef(_createParser2(reference, in0.reference).object);
 
   static final _createParser3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser3")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser3")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.Reader r)
@@ -1194,19 +1017,15 @@
   /// is enabled.
   ///@param r Reader to use for reading JSON content to parse
   ///@since 2.1
-  JsonParser createParser3(jni.JniObject r) {
-    final result__ = JsonParser.fromRef(_createParser3(reference, r.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser3(jni.JniObject r) =>
+      JsonParser.fromRef(_createParser3(reference, r.reference).object);
 
   static final _createParser4 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser4")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser4")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data)
@@ -1215,20 +1034,18 @@
   /// Method for constructing parser for parsing
   /// the contents of given byte array.
   ///@since 2.1
-  JsonParser createParser4(jni.JniObject data) {
-    final result__ =
-        JsonParser.fromRef(_createParser4(reference, data.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser4(jni.JniObject data) =>
+      JsonParser.fromRef(_createParser4(reference, data.reference).object);
 
   static final _createParser5 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Int32, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser5")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Int32,
+                  ffi.Int32)>>("JsonFactory__createParser5")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data, int offset, int len)
@@ -1240,20 +1057,16 @@
   ///@param offset Offset of the first data byte within buffer
   ///@param len Length of contents to parse within buffer
   ///@since 2.1
-  JsonParser createParser5(jni.JniObject data, int offset, int len) {
-    final result__ = JsonParser.fromRef(
-        _createParser5(reference, data.reference, offset, len));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser5(jni.JniObject data, int offset, int len) =>
+      JsonParser.fromRef(
+          _createParser5(reference, data.reference, offset, len).object);
 
   static final _createParser6 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser6")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser6")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.lang.String content)
@@ -1262,20 +1075,15 @@
   /// Method for constructing parser for parsing
   /// contents of given String.
   ///@since 2.1
-  JsonParser createParser6(jni.JniString content) {
-    final result__ =
-        JsonParser.fromRef(_createParser6(reference, content.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser6(jni.JniString content) =>
+      JsonParser.fromRef(_createParser6(reference, content.reference).object);
 
   static final _createParser7 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser7")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser7")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content)
@@ -1284,20 +1092,18 @@
   /// Method for constructing parser for parsing
   /// contents of given char array.
   ///@since 2.4
-  JsonParser createParser7(jni.JniObject content) {
-    final result__ =
-        JsonParser.fromRef(_createParser7(reference, content.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser7(jni.JniObject content) =>
+      JsonParser.fromRef(_createParser7(reference, content.reference).object);
 
   static final _createParser8 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Int32, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser8")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Int32,
+                  ffi.Int32)>>("JsonFactory__createParser8")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content, int offset, int len)
@@ -1305,20 +1111,16 @@
   ///
   /// Method for constructing parser for parsing contents of given char array.
   ///@since 2.4
-  JsonParser createParser8(jni.JniObject content, int offset, int len) {
-    final result__ = JsonParser.fromRef(
-        _createParser8(reference, content.reference, offset, len));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser8(jni.JniObject content, int offset, int len) =>
+      JsonParser.fromRef(
+          _createParser8(reference, content.reference, offset, len).object);
 
   static final _createParser9 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createParser9")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser9")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.DataInput in)
@@ -1330,18 +1132,14 @@
   /// If this factory does not support DataInput as source,
   /// will throw UnsupportedOperationException
   ///@since 2.8
-  JsonParser createParser9(jni.JniObject in0) {
-    final result__ =
-        JsonParser.fromRef(_createParser9(reference, in0.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createParser9(jni.JniObject in0) =>
+      JsonParser.fromRef(_createParser9(reference, in0.reference).object);
 
   static final _createNonBlockingByteArrayParser = jniLookup<
               ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createNonBlockingByteArrayParser")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory__createNonBlockingByteArrayParser")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createNonBlockingByteArrayParser()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -1359,21 +1157,18 @@
   /// (and US-ASCII since it is proper subset); other encodings are not supported
   /// at this point.
   ///@since 2.9
-  JsonParser createNonBlockingByteArrayParser() {
-    final result__ =
-        JsonParser.fromRef(_createNonBlockingByteArrayParser(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createNonBlockingByteArrayParser() =>
+      JsonParser.fromRef(_createNonBlockingByteArrayParser(reference).object);
 
   static final _createGenerator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createGenerator")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc)
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -1396,20 +1191,16 @@
   ///@param out OutputStream to use for writing JSON content
   ///@param enc Character encoding to use
   ///@since 2.1
-  jni.JniObject createGenerator(jni.JniObject out, jni.JniObject enc) {
-    final result__ = jni.JniObject.fromRef(
-        _createGenerator(reference, out.reference, enc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createGenerator(jni.JniObject out, jni.JniObject enc) =>
+      jni.JniObject.fromRef(
+          _createGenerator(reference, out.reference, enc.reference).object);
 
   static final _createGenerator1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createGenerator1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.OutputStream out)
@@ -1420,20 +1211,15 @@
   ///
   /// Note: there are formats that use fixed encoding (like most binary data formats).
   ///@since 2.1
-  jni.JniObject createGenerator1(jni.JniObject out) {
-    final result__ =
-        jni.JniObject.fromRef(_createGenerator1(reference, out.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createGenerator1(jni.JniObject out) =>
+      jni.JniObject.fromRef(_createGenerator1(reference, out.reference).object);
 
   static final _createGenerator2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createGenerator2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.Writer w)
@@ -1450,21 +1236,18 @@
   /// Using application needs to close it explicitly.
   ///@since 2.1
   ///@param w Writer to use for writing JSON content
-  jni.JniObject createGenerator2(jni.JniObject w) {
-    final result__ =
-        jni.JniObject.fromRef(_createGenerator2(reference, w.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createGenerator2(jni.JniObject w) =>
+      jni.JniObject.fromRef(_createGenerator2(reference, w.reference).object);
 
   static final _createGenerator3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createGenerator3")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator3")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.File f, com.fasterxml.jackson.core.JsonEncoding enc)
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -1481,21 +1264,19 @@
   ///@param f File to write contents to
   ///@param enc Character encoding to use
   ///@since 2.1
-  jni.JniObject createGenerator3(jni.JniObject f, jni.JniObject enc) {
-    final result__ = jni.JniObject.fromRef(
-        _createGenerator3(reference, f.reference, enc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createGenerator3(jni.JniObject f, jni.JniObject enc) =>
+      jni.JniObject.fromRef(
+          _createGenerator3(reference, f.reference, enc.reference).object);
 
   static final _createGenerator4 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createGenerator4")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator4")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.DataOutput out, com.fasterxml.jackson.core.JsonEncoding enc)
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -1503,20 +1284,16 @@
   /// Method for constructing generator for writing content using specified
   /// DataOutput instance.
   ///@since 2.8
-  jni.JniObject createGenerator4(jni.JniObject out, jni.JniObject enc) {
-    final result__ = jni.JniObject.fromRef(
-        _createGenerator4(reference, out.reference, enc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createGenerator4(jni.JniObject out, jni.JniObject enc) =>
+      jni.JniObject.fromRef(
+          _createGenerator4(reference, out.reference, enc.reference).object);
 
   static final _createGenerator5 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createGenerator5")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator5")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.DataOutput out)
@@ -1527,20 +1304,15 @@
   ///
   /// Note: there are formats that use fixed encoding (like most binary data formats).
   ///@since 2.8
-  jni.JniObject createGenerator5(jni.JniObject out) {
-    final result__ =
-        jni.JniObject.fromRef(_createGenerator5(reference, out.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createGenerator5(jni.JniObject out) =>
+      jni.JniObject.fromRef(_createGenerator5(reference, out.reference).object);
 
   static final _createJsonParser = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonParser")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.File f)
@@ -1564,20 +1336,15 @@
   ///@throws IOException if parser initialization fails due to I/O (read) problem
   ///@throws JsonParseException if parser initialization fails due to content decoding problem
   ///@deprecated Since 2.2, use \#createParser(File) instead.
-  JsonParser createJsonParser(jni.JniObject f) {
-    final result__ =
-        JsonParser.fromRef(_createJsonParser(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createJsonParser(jni.JniObject f) =>
+      JsonParser.fromRef(_createJsonParser(reference, f.reference).object);
 
   static final _createJsonParser1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonParser1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.net.URL url)
@@ -1600,20 +1367,15 @@
   ///@throws IOException if parser initialization fails due to I/O (read) problem
   ///@throws JsonParseException if parser initialization fails due to content decoding problem
   ///@deprecated Since 2.2, use \#createParser(URL) instead.
-  JsonParser createJsonParser1(jni.JniObject url) {
-    final result__ =
-        JsonParser.fromRef(_createJsonParser1(reference, url.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createJsonParser1(jni.JniObject url) =>
+      JsonParser.fromRef(_createJsonParser1(reference, url.reference).object);
 
   static final _createJsonParser2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonParser2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.InputStream in)
@@ -1639,20 +1401,15 @@
   ///@throws IOException if parser initialization fails due to I/O (read) problem
   ///@throws JsonParseException if parser initialization fails due to content decoding problem
   ///@deprecated Since 2.2, use \#createParser(InputStream) instead.
-  JsonParser createJsonParser2(jni.JniObject in0) {
-    final result__ =
-        JsonParser.fromRef(_createJsonParser2(reference, in0.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createJsonParser2(jni.JniObject in0) =>
+      JsonParser.fromRef(_createJsonParser2(reference, in0.reference).object);
 
   static final _createJsonParser3 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonParser3")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser3")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.Reader r)
@@ -1671,20 +1428,15 @@
   ///@throws IOException if parser initialization fails due to I/O (read) problem
   ///@throws JsonParseException if parser initialization fails due to content decoding problem
   ///@deprecated Since 2.2, use \#createParser(Reader) instead.
-  JsonParser createJsonParser3(jni.JniObject r) {
-    final result__ =
-        JsonParser.fromRef(_createJsonParser3(reference, r.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createJsonParser3(jni.JniObject r) =>
+      JsonParser.fromRef(_createJsonParser3(reference, r.reference).object);
 
   static final _createJsonParser4 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonParser4")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser4")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data)
@@ -1696,20 +1448,18 @@
   ///@throws IOException if parser initialization fails due to I/O (read) problem
   ///@throws JsonParseException if parser initialization fails due to content decoding problem
   ///@deprecated Since 2.2, use \#createParser(byte[]) instead.
-  JsonParser createJsonParser4(jni.JniObject data) {
-    final result__ =
-        JsonParser.fromRef(_createJsonParser4(reference, data.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createJsonParser4(jni.JniObject data) =>
+      JsonParser.fromRef(_createJsonParser4(reference, data.reference).object);
 
   static final _createJsonParser5 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Int32, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonParser5")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Int32,
+                  ffi.Int32)>>("JsonFactory__createJsonParser5")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data, int offset, int len)
@@ -1724,20 +1474,16 @@
   ///@throws IOException if parser initialization fails due to I/O (read) problem
   ///@throws JsonParseException if parser initialization fails due to content decoding problem
   ///@deprecated Since 2.2, use \#createParser(byte[],int,int) instead.
-  JsonParser createJsonParser5(jni.JniObject data, int offset, int len) {
-    final result__ = JsonParser.fromRef(
-        _createJsonParser5(reference, data.reference, offset, len));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createJsonParser5(jni.JniObject data, int offset, int len) =>
+      JsonParser.fromRef(
+          _createJsonParser5(reference, data.reference, offset, len).object);
 
   static final _createJsonParser6 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonParser6")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser6")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.lang.String content)
@@ -1750,21 +1496,18 @@
   ///@throws IOException if parser initialization fails due to I/O (read) problem
   ///@throws JsonParseException if parser initialization fails due to content decoding problem
   ///@deprecated Since 2.2, use \#createParser(String) instead.
-  JsonParser createJsonParser6(jni.JniString content) {
-    final result__ =
-        JsonParser.fromRef(_createJsonParser6(reference, content.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser createJsonParser6(jni.JniString content) => JsonParser.fromRef(
+      _createJsonParser6(reference, content.reference).object);
 
   static final _createJsonGenerator = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonGenerator")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonGenerator")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+              ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.OutputStream out, com.fasterxml.jackson.core.JsonEncoding enc)
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -1789,20 +1532,16 @@
   ///@return Generator constructed
   ///@throws IOException if parser initialization fails due to I/O (write) problem
   ///@deprecated Since 2.2, use \#createGenerator(OutputStream, JsonEncoding) instead.
-  jni.JniObject createJsonGenerator(jni.JniObject out, jni.JniObject enc) {
-    final result__ = jni.JniObject.fromRef(
-        _createJsonGenerator(reference, out.reference, enc.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createJsonGenerator(jni.JniObject out, jni.JniObject enc) =>
+      jni.JniObject.fromRef(
+          _createJsonGenerator(reference, out.reference, enc.reference).object);
 
   static final _createJsonGenerator1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonGenerator1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonGenerator1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.Writer out)
@@ -1821,20 +1560,16 @@
   ///@return Generator constructed
   ///@throws IOException if parser initialization fails due to I/O (write) problem
   ///@deprecated Since 2.2, use \#createGenerator(Writer) instead.
-  jni.JniObject createJsonGenerator1(jni.JniObject out) {
-    final result__ =
-        jni.JniObject.fromRef(_createJsonGenerator1(reference, out.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createJsonGenerator1(jni.JniObject out) =>
+      jni.JniObject.fromRef(
+          _createJsonGenerator1(reference, out.reference).object);
 
   static final _createJsonGenerator2 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory_createJsonGenerator2")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonGenerator2")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.OutputStream out)
@@ -1848,12 +1583,9 @@
   ///@return Generator constructed
   ///@throws IOException if parser initialization fails due to I/O (write) problem
   ///@deprecated Since 2.2, use \#createGenerator(OutputStream) instead.
-  jni.JniObject createJsonGenerator2(jni.JniObject out) {
-    final result__ =
-        jni.JniObject.fromRef(_createJsonGenerator2(reference, out.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject createJsonGenerator2(jni.JniObject out) =>
+      jni.JniObject.fromRef(
+          _createJsonGenerator2(reference, out.reference).object);
 }
 
 /// from: com.fasterxml.jackson.core.JsonFactory$Feature
@@ -1864,95 +1596,72 @@
   JsonFactory_Feature.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
 
   static final _values =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonFactory__Feature_values")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "JsonFactory_Feature__values")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public com.fasterxml.jackson.core.JsonFactory.Feature[] values()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static jni.JniObject values() {
-    final result__ = jni.JniObject.fromRef(_values());
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static jni.JniObject values() => jni.JniObject.fromRef(_values().object);
 
   static final _valueOf = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory__Feature_valueOf")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory_Feature__valueOf")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: static public com.fasterxml.jackson.core.JsonFactory.Feature valueOf(java.lang.String name)
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static JsonFactory_Feature valueOf(jni.JniString name) {
-    final result__ = JsonFactory_Feature.fromRef(_valueOf(name.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static JsonFactory_Feature valueOf(jni.JniString name) =>
+      JsonFactory_Feature.fromRef(_valueOf(name.reference).object);
 
   static final _collectDefaults =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function()>>(
-              "com_fasterxml_jackson_core_JsonFactory__Feature_collectDefaults")
-          .asFunction<int Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "JsonFactory_Feature__collectDefaults")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public int collectDefaults()
   ///
   /// Method that calculates bit set (flags) of all features that
   /// are enabled by default.
   ///@return Bit field of features enabled by default
-  static int collectDefaults() {
-    final result__ = _collectDefaults();
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static int collectDefaults() => _collectDefaults().integer;
 
   static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function(ffi.Uint8)>>(
-              "com_fasterxml_jackson_core_JsonFactory__Feature_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function(int)>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function(ffi.Uint8)>>(
+              "JsonFactory_Feature__ctor")
+          .asFunction<jni.JniResult Function(int)>();
 
   /// from: private void <init>(boolean defaultState)
   JsonFactory_Feature(bool defaultState)
-      : super.fromRef(_ctor(defaultState ? 1 : 0)) {
-    jni.Jni.env.checkException();
-  }
+      : super.fromRef(_ctor(defaultState ? 1 : 0).object);
 
   static final _enabledByDefault = jniLookup<
-              ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonFactory__Feature_enabledByDefault")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonFactory_Feature__enabledByDefault")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean enabledByDefault()
-  bool enabledByDefault() {
-    final result__ = _enabledByDefault(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool enabledByDefault() => _enabledByDefault(reference).boolean;
 
   static final _enabledIn = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonFactory__Feature_enabledIn")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int32)>>("JsonFactory_Feature__enabledIn")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public boolean enabledIn(int flags)
-  bool enabledIn(int flags) {
-    final result__ = _enabledIn(reference, flags) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool enabledIn(int flags) => _enabledIn(reference, flags).boolean;
 
-  static final _getMask =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonFactory__Feature_getMask")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getMask = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonFactory_Feature__getMask")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getMask()
-  int getMask() {
-    final result__ = _getMask(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getMask() => _getMask(reference).integer;
 }
 
 /// from: com.fasterxml.jackson.core.JsonParser
@@ -1976,10 +1685,10 @@
   /// from: private static final int MAX_SHORT_I
   static const MAX_SHORT_I = 32767;
 
-  static final _get_DEFAULT_READ_CAPABILITIES = jniLookup<
-              ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-          "get_com_fasterxml_jackson_core_JsonParser_DEFAULT_READ_CAPABILITIES")
-      .asFunction<ffi.Pointer<ffi.Void> Function()>();
+  static final _get_DEFAULT_READ_CAPABILITIES =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_JsonParser__DEFAULT_READ_CAPABILITIES")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static protected final com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> DEFAULT_READ_CAPABILITIES
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -1989,33 +1698,28 @@
   /// set needs to be passed).
   ///@since 2.12
   static jni.JniObject get DEFAULT_READ_CAPABILITIES =>
-      jni.JniObject.fromRef(_get_DEFAULT_READ_CAPABILITIES());
+      jni.JniObject.fromRef(_get_DEFAULT_READ_CAPABILITIES().object);
 
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonParser_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "JsonParser__ctor")
+      .asFunction<jni.JniResult Function()>();
 
   /// from: protected void <init>()
-  JsonParser() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
+  JsonParser() : super.fromRef(_ctor().object);
 
   static final _ctor1 =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function(ffi.Int32)>>(
-              "com_fasterxml_jackson_core_JsonParser_ctor1")
-          .asFunction<ffi.Pointer<ffi.Void> Function(int)>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function(ffi.Int32)>>(
+              "JsonParser__ctor1")
+          .asFunction<jni.JniResult Function(int)>();
 
   /// from: protected void <init>(int features)
-  JsonParser.ctor1(int features) : super.fromRef(_ctor1(features)) {
-    jni.Jni.env.checkException();
-  }
+  JsonParser.ctor1(int features) : super.fromRef(_ctor1(features).object);
 
   static final _getCodec = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getCodec")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getCodec")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.ObjectCodec getCodec()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2024,19 +1728,16 @@
   /// parser, if any. Codec is used by \#readValueAs(Class)
   /// method (and its variants).
   ///@return Codec assigned to this parser, if any; {@code null} if none
-  jni.JniObject getCodec() {
-    final result__ = jni.JniObject.fromRef(_getCodec(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getCodec() =>
+      jni.JniObject.fromRef(_getCodec(reference).object);
 
   static final _setCodec = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_setCodec")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__setCodec")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract void setCodec(com.fasterxml.jackson.core.ObjectCodec oc)
   ///
@@ -2044,17 +1745,13 @@
   /// parser, if any. Codec is used by \#readValueAs(Class)
   /// method (and its variants).
   ///@param oc Codec to assign, if any; {@code null} if none
-  void setCodec(jni.JniObject oc) {
-    final result__ = _setCodec(reference, oc.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setCodec(jni.JniObject oc) => _setCodec(reference, oc.reference).check();
 
   static final _getInputSource = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getInputSource")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getInputSource")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Object getInputSource()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2073,38 +1770,33 @@
   /// In general use of this accessor should be considered as
   /// "last effort", i.e. only used if no other mechanism is applicable.
   ///@return Input source this parser was configured with
-  jni.JniObject getInputSource() {
-    final result__ = jni.JniObject.fromRef(_getInputSource(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getInputSource() =>
+      jni.JniObject.fromRef(_getInputSource(reference).object);
 
   static final _setRequestPayloadOnError = jniLookup<
               ffi.NativeFunction<
-                  ffi.Void Function(
+                  jni.JniResult Function(
                       ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError")
+          "JsonParser__setRequestPayloadOnError")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public void setRequestPayloadOnError(com.fasterxml.jackson.core.util.RequestPayload payload)
   ///
   /// Sets the payload to be passed if JsonParseException is thrown.
   ///@param payload Payload to pass
   ///@since 2.8
-  void setRequestPayloadOnError(jni.JniObject payload) {
-    final result__ = _setRequestPayloadOnError(reference, payload.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setRequestPayloadOnError(jni.JniObject payload) =>
+      _setRequestPayloadOnError(reference, payload.reference).check();
 
   static final _setRequestPayloadOnError1 = jniLookup<
               ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>,
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>,
                       ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError1")
+          "JsonParser__setRequestPayloadOnError1")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
               ffi.Pointer<ffi.Void>)>();
 
   /// from: public void setRequestPayloadOnError(byte[] payload, java.lang.String charset)
@@ -2113,39 +1805,36 @@
   ///@param payload Payload to pass
   ///@param charset Character encoding for (lazily) decoding payload
   ///@since 2.8
-  void setRequestPayloadOnError1(jni.JniObject payload, jni.JniString charset) {
-    final result__ = _setRequestPayloadOnError1(
-        reference, payload.reference, charset.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setRequestPayloadOnError1(
+          jni.JniObject payload, jni.JniString charset) =>
+      _setRequestPayloadOnError1(
+              reference, payload.reference, charset.reference)
+          .check();
 
   static final _setRequestPayloadOnError2 = jniLookup<
               ffi.NativeFunction<
-                  ffi.Void Function(
+                  jni.JniResult Function(
                       ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError2")
+          "JsonParser__setRequestPayloadOnError2")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public void setRequestPayloadOnError(java.lang.String payload)
   ///
   /// Sets the String request payload
   ///@param payload Payload to pass
   ///@since 2.8
-  void setRequestPayloadOnError2(jni.JniString payload) {
-    final result__ = _setRequestPayloadOnError2(reference, payload.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setRequestPayloadOnError2(jni.JniString payload) =>
+      _setRequestPayloadOnError2(reference, payload.reference).check();
 
   static final _setSchema = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_setSchema")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__setSchema")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public void setSchema(com.fasterxml.jackson.core.FormatSchema schema)
   ///
@@ -2159,17 +1848,14 @@
   /// is thrown.
   ///@param schema Schema to use
   ///@throws UnsupportedOperationException if parser does not support schema
-  void setSchema(jni.JniObject schema) {
-    final result__ = _setSchema(reference, schema.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setSchema(jni.JniObject schema) =>
+      _setSchema(reference, schema.reference).check();
 
   static final _getSchema = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getSchema")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getSchema")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.FormatSchema getSchema()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2178,18 +1864,16 @@
   /// Default implementation returns null.
   ///@return Schema in use by this parser, if any; {@code null} if none
   ///@since 2.1
-  jni.JniObject getSchema() {
-    final result__ = jni.JniObject.fromRef(_getSchema(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getSchema() =>
+      jni.JniObject.fromRef(_getSchema(reference).object);
 
   static final _canUseSchema = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_canUseSchema")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__canUseSchema")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
   ///
@@ -2197,16 +1881,14 @@
   /// this parser (using \#setSchema).
   ///@param schema Schema to check
   ///@return True if this parser can use given schema; false if not
-  bool canUseSchema(jni.JniObject schema) {
-    final result__ = _canUseSchema(reference, schema.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canUseSchema(jni.JniObject schema) =>
+      _canUseSchema(reference, schema.reference).boolean;
 
-  static final _requiresCustomCodec =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_requiresCustomCodec")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _requiresCustomCodec = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__requiresCustomCodec")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean requiresCustomCodec()
   ///
@@ -2218,16 +1900,13 @@
   ///@return True if format-specific codec is needed with this parser; false if a general
   ///   ObjectCodec is enough
   ///@since 2.1
-  bool requiresCustomCodec() {
-    final result__ = _requiresCustomCodec(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool requiresCustomCodec() => _requiresCustomCodec(reference).boolean;
 
-  static final _canParseAsync =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_canParseAsync")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _canParseAsync = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__canParseAsync")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canParseAsync()
   ///
@@ -2242,17 +1921,13 @@
   /// input is read by blocking
   ///@return True if this is a non-blocking ("asynchronous") parser
   ///@since 2.9
-  bool canParseAsync() {
-    final result__ = _canParseAsync(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canParseAsync() => _canParseAsync(reference).boolean;
 
   static final _getNonBlockingInputFeeder = jniLookup<
               ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getNonBlockingInputFeeder")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonParser__getNonBlockingInputFeeder")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.async.NonBlockingInputFeeder getNonBlockingInputFeeder()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2262,18 +1937,14 @@
   /// parsers that use blocking I/O.
   ///@return Input feeder to use with non-blocking (async) parsing
   ///@since 2.9
-  jni.JniObject getNonBlockingInputFeeder() {
-    final result__ =
-        jni.JniObject.fromRef(_getNonBlockingInputFeeder(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getNonBlockingInputFeeder() =>
+      jni.JniObject.fromRef(_getNonBlockingInputFeeder(reference).object);
 
   static final _getReadCapabilities = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getReadCapabilities")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getReadCapabilities")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.util.JacksonFeatureSet<com.fasterxml.jackson.core.StreamReadCapability> getReadCapabilities()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2282,17 +1953,14 @@
   /// underlying data format being read (directly or indirectly).
   ///@return Set of read capabilities for content to read via this parser
   ///@since 2.12
-  jni.JniObject getReadCapabilities() {
-    final result__ = jni.JniObject.fromRef(_getReadCapabilities(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getReadCapabilities() =>
+      jni.JniObject.fromRef(_getReadCapabilities(reference).object);
 
   static final _version = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_version")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__version")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.Version version()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2301,16 +1969,13 @@
   /// Left for sub-classes to implement.
   ///@return Version of this generator (derived from version declared for
   ///   {@code jackson-core} jar that contains the class
-  jni.JniObject version() {
-    final result__ = jni.JniObject.fromRef(_version(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject version() => jni.JniObject.fromRef(_version(reference).object);
 
-  static final _close =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_close")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
+  static final _close = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__close")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract void close()
   ///
@@ -2328,16 +1993,13 @@
   /// java.io.File or java.net.URL and creates
   /// stream or reader it does own them.
   ///@throws IOException if there is either an underlying I/O problem
-  void close() {
-    final result__ = _close(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void close() => _close(reference).check();
 
-  static final _isClosed =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_isClosed")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isClosed = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__isClosed")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract boolean isClosed()
   ///
@@ -2348,17 +2010,13 @@
   /// call to \#close or because parser has encountered
   /// end of input.
   ///@return {@code True} if this parser instance has been closed
-  bool isClosed() {
-    final result__ = _isClosed(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isClosed() => _isClosed(reference).boolean;
 
   static final _getParsingContext = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getParsingContext")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getParsingContext")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonStreamContext getParsingContext()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2372,17 +2030,14 @@
   /// Contexts can also be used for simple xpath-like matching of
   /// input, if so desired.
   ///@return Stream input context (JsonStreamContext) associated with this parser
-  jni.JniObject getParsingContext() {
-    final result__ = jni.JniObject.fromRef(_getParsingContext(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getParsingContext() =>
+      jni.JniObject.fromRef(_getParsingContext(reference).object);
 
   static final _currentLocation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_currentLocation")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__currentLocation")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonLocation currentLocation()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2399,17 +2054,14 @@
   /// to other library)
   ///@return Location of the last processed input unit (byte or character)
   ///@since 2.13
-  jni.JniObject currentLocation() {
-    final result__ = jni.JniObject.fromRef(_currentLocation(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject currentLocation() =>
+      jni.JniObject.fromRef(_currentLocation(reference).object);
 
   static final _currentTokenLocation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_currentTokenLocation")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__currentTokenLocation")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonLocation currentTokenLocation()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2426,17 +2078,14 @@
   /// to other library)
   ///@return Starting location of the token parser currently points to
   ///@since 2.13 (will eventually replace \#getTokenLocation)
-  jni.JniObject currentTokenLocation() {
-    final result__ = jni.JniObject.fromRef(_currentTokenLocation(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject currentTokenLocation() =>
+      jni.JniObject.fromRef(_currentTokenLocation(reference).object);
 
   static final _getCurrentLocation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getCurrentLocation")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentLocation")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2444,17 +2093,14 @@
   /// Alias for \#currentLocation(), to be deprecated in later
   /// Jackson 2.x versions (and removed from Jackson 3.0).
   ///@return Location of the last processed input unit (byte or character)
-  jni.JniObject getCurrentLocation() {
-    final result__ = jni.JniObject.fromRef(_getCurrentLocation(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getCurrentLocation() =>
+      jni.JniObject.fromRef(_getCurrentLocation(reference).object);
 
   static final _getTokenLocation = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getTokenLocation")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getTokenLocation")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonLocation getTokenLocation()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2462,17 +2108,14 @@
   /// Alias for \#currentTokenLocation(), to be deprecated in later
   /// Jackson 2.x versions (and removed from Jackson 3.0).
   ///@return Starting location of the token parser currently points to
-  jni.JniObject getTokenLocation() {
-    final result__ = jni.JniObject.fromRef(_getTokenLocation(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getTokenLocation() =>
+      jni.JniObject.fromRef(_getTokenLocation(reference).object);
 
   static final _currentValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_currentValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__currentValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Object currentValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2488,19 +2131,16 @@
   /// and gets passed through data-binding.
   ///@return "Current value" associated with the current input context (state) of this parser
   ///@since 2.13 (added as replacement for older \#getCurrentValue()
-  jni.JniObject currentValue() {
-    final result__ = jni.JniObject.fromRef(_currentValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject currentValue() =>
+      jni.JniObject.fromRef(_currentValue(reference).object);
 
   static final _assignCurrentValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_assignCurrentValue")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__assignCurrentValue")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public void assignCurrentValue(java.lang.Object v)
   ///
@@ -2510,17 +2150,14 @@
   ///</code>
   ///@param v Current value to assign for the current input context of this parser
   ///@since 2.13 (added as replacement for older \#setCurrentValue
-  void assignCurrentValue(jni.JniObject v) {
-    final result__ = _assignCurrentValue(reference, v.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void assignCurrentValue(jni.JniObject v) =>
+      _assignCurrentValue(reference, v.reference).check();
 
   static final _getCurrentValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getCurrentValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Object getCurrentValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2528,37 +2165,32 @@
   /// Alias for \#currentValue(), to be deprecated in later
   /// Jackson 2.x versions (and removed from Jackson 3.0).
   ///@return Location of the last processed input unit (byte or character)
-  jni.JniObject getCurrentValue() {
-    final result__ = jni.JniObject.fromRef(_getCurrentValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getCurrentValue() =>
+      jni.JniObject.fromRef(_getCurrentValue(reference).object);
 
   static final _setCurrentValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_setCurrentValue")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__setCurrentValue")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public void setCurrentValue(java.lang.Object v)
   ///
   /// Alias for \#assignCurrentValue, to be deprecated in later
   /// Jackson 2.x versions (and removed from Jackson 3.0).
   ///@param v Current value to assign for the current input context of this parser
-  void setCurrentValue(jni.JniObject v) {
-    final result__ = _setCurrentValue(reference, v.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setCurrentValue(jni.JniObject v) =>
+      _setCurrentValue(reference, v.reference).check();
 
   static final _releaseBuffered = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int32 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_releaseBuffered")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__releaseBuffered")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public int releaseBuffered(java.io.OutputStream out)
   ///
@@ -2573,18 +2205,16 @@
   ///    (that is, input can not be sent to OutputStream;
   ///    otherwise number of bytes released (0 if there was nothing to release)
   ///@throws IOException if write to stream threw exception
-  int releaseBuffered(jni.JniObject out) {
-    final result__ = _releaseBuffered(reference, out.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int releaseBuffered(jni.JniObject out) =>
+      _releaseBuffered(reference, out.reference).integer;
 
   static final _releaseBuffered1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int32 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_releaseBuffered1")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__releaseBuffered1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public int releaseBuffered(java.io.Writer w)
   ///
@@ -2600,19 +2230,15 @@
   ///    (that is, input can not be sent to Writer;
   ///    otherwise number of chars released (0 if there was nothing to release)
   ///@throws IOException if write using Writer threw exception
-  int releaseBuffered1(jni.JniObject w) {
-    final result__ = _releaseBuffered1(reference, w.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int releaseBuffered1(jni.JniObject w) =>
+      _releaseBuffered1(reference, w.reference).integer;
 
   static final _enable = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_enable")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__enable")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser enable(com.fasterxml.jackson.core.JsonParser.Feature f)
@@ -2622,19 +2248,15 @@
   /// (check Feature for list of features)
   ///@param f Feature to enable
   ///@return This parser, to allow call chaining
-  JsonParser enable(JsonParser_Feature f) {
-    final result__ = JsonParser.fromRef(_enable(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser enable(JsonParser_Feature f) =>
+      JsonParser.fromRef(_enable(reference, f.reference).object);
 
   static final _disable = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_disable")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__disable")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser disable(com.fasterxml.jackson.core.JsonParser.Feature f)
@@ -2644,19 +2266,15 @@
   /// (check Feature for list of features)
   ///@param f Feature to disable
   ///@return This parser, to allow call chaining
-  JsonParser disable(JsonParser_Feature f) {
-    final result__ = JsonParser.fromRef(_disable(reference, f.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser disable(JsonParser_Feature f) =>
+      JsonParser.fromRef(_disable(reference, f.reference).object);
 
   static final _configure = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "com_fasterxml_jackson_core_JsonParser_configure")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonParser__configure")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state)
@@ -2667,37 +2285,32 @@
   ///@param f Feature to enable or disable
   ///@param state Whether to enable feature ({@code true}) or disable ({@code false})
   ///@return This parser, to allow call chaining
-  JsonParser configure(JsonParser_Feature f, bool state) {
-    final result__ =
-        JsonParser.fromRef(_configure(reference, f.reference, state ? 1 : 0));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser configure(JsonParser_Feature f, bool state) => JsonParser.fromRef(
+      _configure(reference, f.reference, state ? 1 : 0).object);
 
   static final _isEnabled = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_isEnabled")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__isEnabled")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature f)
   ///
   /// Method for checking whether specified Feature is enabled.
   ///@param f Feature to check
   ///@return {@code True} if feature is enabled; {@code false} otherwise
-  bool isEnabled(JsonParser_Feature f) {
-    final result__ = _isEnabled(reference, f.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isEnabled(JsonParser_Feature f) =>
+      _isEnabled(reference, f.reference).boolean;
 
   static final _isEnabled1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_isEnabled1")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__isEnabled1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f)
   ///
@@ -2705,34 +2318,27 @@
   ///@param f Feature to check
   ///@return {@code True} if feature is enabled; {@code false} otherwise
   ///@since 2.10
-  bool isEnabled1(jni.JniObject f) {
-    final result__ = _isEnabled1(reference, f.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isEnabled1(jni.JniObject f) =>
+      _isEnabled1(reference, f.reference).boolean;
 
-  static final _getFeatureMask =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getFeatureMask")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getFeatureMask = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getFeatureMask")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getFeatureMask()
   ///
   /// Bulk access method for getting state of all standard Features.
   ///@return Bit mask that defines current states of all standard Features.
   ///@since 2.3
-  int getFeatureMask() {
-    final result__ = _getFeatureMask(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getFeatureMask() => _getFeatureMask(reference).integer;
 
   static final _setFeatureMask = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonParser_setFeatureMask")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int32)>>("JsonParser__setFeatureMask")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser setFeatureMask(int mask)
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2742,19 +2348,14 @@
   ///@return This parser, to allow call chaining
   ///@since 2.3
   ///@deprecated Since 2.7, use \#overrideStdFeatures(int, int) instead
-  JsonParser setFeatureMask(int mask) {
-    final result__ = JsonParser.fromRef(_setFeatureMask(reference, mask));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser setFeatureMask(int mask) =>
+      JsonParser.fromRef(_setFeatureMask(reference, mask).object);
 
   static final _overrideStdFeatures = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Int32, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonParser_overrideStdFeatures")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>, int, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Int32,
+                  ffi.Int32)>>("JsonParser__overrideStdFeatures")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int, int)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser overrideStdFeatures(int values, int mask)
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2771,17 +2372,14 @@
   ///@param mask Bit mask of features to change
   ///@return This parser, to allow call chaining
   ///@since 2.6
-  JsonParser overrideStdFeatures(int values, int mask) {
-    final result__ =
-        JsonParser.fromRef(_overrideStdFeatures(reference, values, mask));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser overrideStdFeatures(int values, int mask) =>
+      JsonParser.fromRef(_overrideStdFeatures(reference, values, mask).object);
 
-  static final _getFormatFeatures =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getFormatFeatures")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getFormatFeatures = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getFormatFeatures")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getFormatFeatures()
   ///
@@ -2789,19 +2387,13 @@
   /// on/off configuration settings.
   ///@return Bit mask that defines current states of all standard FormatFeatures.
   ///@since 2.6
-  int getFormatFeatures() {
-    final result__ = _getFormatFeatures(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getFormatFeatures() => _getFormatFeatures(reference).integer;
 
   static final _overrideFormatFeatures = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Int32, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonParser_overrideFormatFeatures")
-      .asFunction<
-          ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>, int, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Int32,
+                  ffi.Int32)>>("JsonParser__overrideFormatFeatures")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int, int)>();
 
   /// from: public com.fasterxml.jackson.core.JsonParser overrideFormatFeatures(int values, int mask)
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2816,18 +2408,14 @@
   ///@param mask Bit mask of features to change
   ///@return This parser, to allow call chaining
   ///@since 2.6
-  JsonParser overrideFormatFeatures(int values, int mask) {
-    final result__ =
-        JsonParser.fromRef(_overrideFormatFeatures(reference, values, mask));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser overrideFormatFeatures(int values, int mask) => JsonParser.fromRef(
+      _overrideFormatFeatures(reference, values, mask).object);
 
   static final _nextToken = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextToken")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__nextToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonToken nextToken()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2840,17 +2428,13 @@
   ///   to indicate end-of-input
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  JsonToken nextToken() {
-    final result__ = JsonToken.fromRef(_nextToken(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonToken nextToken() => JsonToken.fromRef(_nextToken(reference).object);
 
   static final _nextValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__nextValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonToken nextValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2871,18 +2455,15 @@
   ///   available yet)
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  JsonToken nextValue() {
-    final result__ = JsonToken.fromRef(_nextValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonToken nextValue() => JsonToken.fromRef(_nextValue(reference).object);
 
   static final _nextFieldName = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextFieldName")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__nextFieldName")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean nextFieldName(com.fasterxml.jackson.core.SerializableString str)
   ///
@@ -2901,17 +2482,14 @@
   ///    specified name; {@code false} otherwise (different token or non-matching name)
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  bool nextFieldName(jni.JniObject str) {
-    final result__ = _nextFieldName(reference, str.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool nextFieldName(jni.JniObject str) =>
+      _nextFieldName(reference, str.reference).boolean;
 
   static final _nextFieldName1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextFieldName1")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__nextFieldName1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.String nextFieldName()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2924,17 +2502,14 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.5
-  jni.JniString nextFieldName1() {
-    final result__ = jni.JniString.fromRef(_nextFieldName1(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString nextFieldName1() =>
+      jni.JniString.fromRef(_nextFieldName1(reference).object);
 
   static final _nextTextValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextTextValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__nextTextValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.String nextTextValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -2952,17 +2527,14 @@
   ///   to; or {@code null} if next token is of some other type
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniString nextTextValue() {
-    final result__ = jni.JniString.fromRef(_nextTextValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString nextTextValue() =>
+      jni.JniString.fromRef(_nextTextValue(reference).object);
 
   static final _nextIntValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int32 Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextIntValue")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int32)>>("JsonParser__nextIntValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public int nextIntValue(int defaultValue)
   ///
@@ -2983,17 +2555,14 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@throws InputCoercionException if integer number does not fit in Java {@code int}
-  int nextIntValue(int defaultValue) {
-    final result__ = _nextIntValue(reference, defaultValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int nextIntValue(int defaultValue) =>
+      _nextIntValue(reference, defaultValue).integer;
 
   static final _nextLongValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int64 Function(ffi.Pointer<ffi.Void>, ffi.Int64)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextLongValue")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int64)>>("JsonParser__nextLongValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public long nextLongValue(long defaultValue)
   ///
@@ -3014,17 +2583,14 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@throws InputCoercionException if integer number does not fit in Java {@code long}
-  int nextLongValue(int defaultValue) {
-    final result__ = _nextLongValue(reference, defaultValue);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int nextLongValue(int defaultValue) =>
+      _nextLongValue(reference, defaultValue).long;
 
   static final _nextBooleanValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_nextBooleanValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__nextBooleanValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Boolean nextBooleanValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3045,17 +2611,14 @@
   ///   token parser advanced to; or {@code null} if next token is of some other type
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniObject nextBooleanValue() {
-    final result__ = jni.JniObject.fromRef(_nextBooleanValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject nextBooleanValue() =>
+      jni.JniObject.fromRef(_nextBooleanValue(reference).object);
 
   static final _skipChildren = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_skipChildren")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__skipChildren")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonParser skipChildren()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3075,16 +2638,14 @@
   ///@return This parser, to allow call chaining
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  JsonParser skipChildren() {
-    final result__ = JsonParser.fromRef(_skipChildren(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser skipChildren() =>
+      JsonParser.fromRef(_skipChildren(reference).object);
 
-  static final _finishToken =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_finishToken")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
+  static final _finishToken = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__finishToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public void finishToken()
   ///
@@ -3101,17 +2662,13 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.8
-  void finishToken() {
-    final result__ = _finishToken(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void finishToken() => _finishToken(reference).check();
 
   static final _currentToken = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_currentToken")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__currentToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.fasterxml.jackson.core.JsonToken currentToken()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3125,16 +2682,14 @@
   ///   after end-of-input has been encountered, as well as
   ///   if the current token has been explicitly cleared.
   ///@since 2.8
-  JsonToken currentToken() {
-    final result__ = JsonToken.fromRef(_currentToken(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonToken currentToken() =>
+      JsonToken.fromRef(_currentToken(reference).object);
 
-  static final _currentTokenId =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_currentTokenId")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _currentTokenId = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__currentTokenId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int currentTokenId()
   ///
@@ -3147,17 +2702,13 @@
   /// to profile performance before deciding to use this method.
   ///@since 2.8
   ///@return {@code int} matching one of constants from JsonTokenId.
-  int currentTokenId() {
-    final result__ = _currentTokenId(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int currentTokenId() => _currentTokenId(reference).integer;
 
   static final _getCurrentToken = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getCurrentToken")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonToken getCurrentToken()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3166,32 +2717,27 @@
   /// Jackson 2.13 (will be removed from 3.0).
   ///@return Type of the token this parser currently points to,
   ///   if any: null before any tokens have been read, and
-  JsonToken getCurrentToken() {
-    final result__ = JsonToken.fromRef(_getCurrentToken(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonToken getCurrentToken() =>
+      JsonToken.fromRef(_getCurrentToken(reference).object);
 
-  static final _getCurrentTokenId =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getCurrentTokenId")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getCurrentTokenId = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentTokenId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract int getCurrentTokenId()
   ///
   /// Deprecated alias for \#currentTokenId().
   ///@return {@code int} matching one of constants from JsonTokenId.
   ///@deprecated Since 2.12 use \#currentTokenId instead
-  int getCurrentTokenId() {
-    final result__ = _getCurrentTokenId(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getCurrentTokenId() => _getCurrentTokenId(reference).integer;
 
-  static final _hasCurrentToken =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_hasCurrentToken")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _hasCurrentToken = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__hasCurrentToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract boolean hasCurrentToken()
   ///
@@ -3203,17 +2749,13 @@
   ///   was just constructed, encountered end-of-input
   ///   and returned null from \#nextToken, or the token
   ///   has been consumed)
-  bool hasCurrentToken() {
-    final result__ = _hasCurrentToken(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool hasCurrentToken() => _hasCurrentToken(reference).boolean;
 
   static final _hasTokenId = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonParser_hasTokenId")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Int32)>>("JsonParser__hasTokenId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public abstract boolean hasTokenId(int id)
   ///
@@ -3229,18 +2771,15 @@
   ///@param id Token id to match (from (@link JsonTokenId})
   ///@return {@code True} if the parser current points to specified token
   ///@since 2.5
-  bool hasTokenId(int id) {
-    final result__ = _hasTokenId(reference, id) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool hasTokenId(int id) => _hasTokenId(reference, id).boolean;
 
   static final _hasToken = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_hasToken")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__hasToken")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract boolean hasToken(com.fasterxml.jackson.core.JsonToken t)
   ///
@@ -3256,16 +2795,13 @@
   ///@param t Token to match
   ///@return {@code True} if the parser current points to specified token
   ///@since 2.6
-  bool hasToken(JsonToken t) {
-    final result__ = _hasToken(reference, t.reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool hasToken(JsonToken t) => _hasToken(reference, t.reference).boolean;
 
-  static final _isExpectedStartArrayToken =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_isExpectedStartArrayToken")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isExpectedStartArrayToken = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonParser__isExpectedStartArrayToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean isExpectedStartArrayToken()
   ///
@@ -3285,16 +2821,14 @@
   ///@return True if the current token can be considered as a
   ///   start-array marker (such JsonToken\#START_ARRAY);
   ///   {@code false} if not
-  bool isExpectedStartArrayToken() {
-    final result__ = _isExpectedStartArrayToken(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isExpectedStartArrayToken() =>
+      _isExpectedStartArrayToken(reference).boolean;
 
   static final _isExpectedStartObjectToken = jniLookup<
-              ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_isExpectedStartObjectToken")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonParser__isExpectedStartObjectToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean isExpectedStartObjectToken()
   ///
@@ -3304,16 +2838,14 @@
   ///   start-array marker (such JsonToken\#START_OBJECT);
   ///   {@code false} if not
   ///@since 2.5
-  bool isExpectedStartObjectToken() {
-    final result__ = _isExpectedStartObjectToken(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isExpectedStartObjectToken() =>
+      _isExpectedStartObjectToken(reference).boolean;
 
-  static final _isExpectedNumberIntToken =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_isExpectedNumberIntToken")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isExpectedNumberIntToken = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonParser__isExpectedNumberIntToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean isExpectedNumberIntToken()
   ///
@@ -3326,16 +2858,14 @@
   ///   start-array marker (such JsonToken\#VALUE_NUMBER_INT);
   ///   {@code false} if not
   ///@since 2.12
-  bool isExpectedNumberIntToken() {
-    final result__ = _isExpectedNumberIntToken(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isExpectedNumberIntToken() =>
+      _isExpectedNumberIntToken(reference).boolean;
 
-  static final _isNaN =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_isNaN")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isNaN = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__isNaN")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean isNaN()
   ///
@@ -3351,16 +2881,13 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.9
-  bool isNaN() {
-    final result__ = _isNaN(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isNaN() => _isNaN(reference).boolean;
 
-  static final _clearCurrentToken =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_clearCurrentToken")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
+  static final _clearCurrentToken = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__clearCurrentToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract void clearCurrentToken()
   ///
@@ -3374,17 +2901,13 @@
   /// Method was added to be used by the optional data binder, since
   /// it has to be able to consume last token used for binding (so that
   /// it will not be used again).
-  void clearCurrentToken() {
-    final result__ = _clearCurrentToken(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void clearCurrentToken() => _clearCurrentToken(reference).check();
 
   static final _getLastClearedToken = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getLastClearedToken")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getLastClearedToken")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonToken getLastClearedToken()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3395,19 +2918,16 @@
   /// Will return null if no tokens have been cleared,
   /// or if parser has been closed.
   ///@return Last cleared token, if any; {@code null} otherwise
-  JsonToken getLastClearedToken() {
-    final result__ = JsonToken.fromRef(_getLastClearedToken(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonToken getLastClearedToken() =>
+      JsonToken.fromRef(_getLastClearedToken(reference).object);
 
   static final _overrideCurrentName = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_overrideCurrentName")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__overrideCurrentName")
       .asFunction<
-          void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract void overrideCurrentName(java.lang.String name)
   ///
@@ -3419,17 +2939,14 @@
   /// Note that use of this method should only be done as sort of last
   /// resort, as it is a work-around for regular operation.
   ///@param name Name to use as the current name; may be null.
-  void overrideCurrentName(jni.JniString name) {
-    final result__ = _overrideCurrentName(reference, name.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void overrideCurrentName(jni.JniString name) =>
+      _overrideCurrentName(reference, name.reference).check();
 
   static final _getCurrentName = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getCurrentName")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentName")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract java.lang.String getCurrentName()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3438,17 +2955,14 @@
   ///@return Name of the current field in the parsing context
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniString getCurrentName() {
-    final result__ = jni.JniString.fromRef(_getCurrentName(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString getCurrentName() =>
+      jni.JniString.fromRef(_getCurrentName(reference).object);
 
   static final _currentName = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_currentName")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__currentName")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.String currentName()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3462,17 +2976,14 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.10
-  jni.JniString currentName() {
-    final result__ = jni.JniString.fromRef(_currentName(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString currentName() =>
+      jni.JniString.fromRef(_currentName(reference).object);
 
   static final _getText = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getText")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getText")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract java.lang.String getText()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3485,18 +2996,15 @@
   ///   by \#nextToken() or other iteration methods)
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniString getText() {
-    final result__ = jni.JniString.fromRef(_getText(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString getText() => jni.JniString.fromRef(_getText(reference).object);
 
   static final _getText1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int32 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getText1")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getText1")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getText(java.io.Writer writer)
   ///
@@ -3515,17 +3023,14 @@
   ///   {@code writer}, or
   ///   JsonParseException for decoding problems
   ///@since 2.8
-  int getText1(jni.JniObject writer) {
-    final result__ = _getText1(reference, writer.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getText1(jni.JniObject writer) =>
+      _getText1(reference, writer.reference).integer;
 
   static final _getTextCharacters = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getTextCharacters")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getTextCharacters")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract char[] getTextCharacters()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3557,16 +3062,14 @@
   ///    at offset 0, and not necessarily until the end of buffer)
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniObject getTextCharacters() {
-    final result__ = jni.JniObject.fromRef(_getTextCharacters(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getTextCharacters() =>
+      jni.JniObject.fromRef(_getTextCharacters(reference).object);
 
-  static final _getTextLength =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getTextLength")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getTextLength = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getTextLength")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract int getTextLength()
   ///
@@ -3577,16 +3080,13 @@
   ///   textual content of the current token.
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getTextLength() {
-    final result__ = _getTextLength(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getTextLength() => _getTextLength(reference).integer;
 
-  static final _getTextOffset =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getTextOffset")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getTextOffset = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getTextOffset")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract int getTextOffset()
   ///
@@ -3597,16 +3097,13 @@
   ///   textual content of the current token.
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getTextOffset() {
-    final result__ = _getTextOffset(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getTextOffset() => _getTextOffset(reference).integer;
 
-  static final _hasTextCharacters =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_hasTextCharacters")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _hasTextCharacters = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__hasTextCharacters")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract boolean hasTextCharacters()
   ///
@@ -3624,17 +3121,13 @@
   ///@return True if parser currently has character array that can
   ///   be efficiently returned via \#getTextCharacters; false
   ///   means that it may or may not exist
-  bool hasTextCharacters() {
-    final result__ = _hasTextCharacters(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool hasTextCharacters() => _hasTextCharacters(reference).boolean;
 
   static final _getNumberValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getNumberValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getNumberValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract java.lang.Number getNumberValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3649,17 +3142,14 @@
   ///    the current token is not numeric, or if decoding of the value fails
   ///    (invalid format for numbers); plain IOException if underlying
   ///    content read fails (possible if values are extracted lazily)
-  jni.JniObject getNumberValue() {
-    final result__ = jni.JniObject.fromRef(_getNumberValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getNumberValue() =>
+      jni.JniObject.fromRef(_getNumberValue(reference).object);
 
   static final _getNumberValueExact = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getNumberValueExact")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getNumberValueExact")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Number getNumberValueExact()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3678,17 +3168,14 @@
   ///    (invalid format for numbers); plain IOException if underlying
   ///    content read fails (possible if values are extracted lazily)
   ///@since 2.12
-  jni.JniObject getNumberValueExact() {
-    final result__ = jni.JniObject.fromRef(_getNumberValueExact(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getNumberValueExact() =>
+      jni.JniObject.fromRef(_getNumberValueExact(reference).object);
 
   static final _getNumberType = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getNumberType")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getNumberType")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract com.fasterxml.jackson.core.JsonParser.NumberType getNumberType()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3700,16 +3187,14 @@
   ///@return Type of current number, if parser points to numeric token; {@code null} otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  JsonParser_NumberType getNumberType() {
-    final result__ = JsonParser_NumberType.fromRef(_getNumberType(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  JsonParser_NumberType getNumberType() =>
+      JsonParser_NumberType.fromRef(_getNumberType(reference).object);
 
-  static final _getByteValue =
-      jniLookup<ffi.NativeFunction<ffi.Int8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getByteValue")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getByteValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getByteValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public byte getByteValue()
   ///
@@ -3734,16 +3219,13 @@
   ///   range of {@code [-128, 255]}); otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getByteValue() {
-    final result__ = _getByteValue(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getByteValue() => _getByteValue(reference).byte;
 
-  static final _getShortValue =
-      jniLookup<ffi.NativeFunction<ffi.Int16 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getShortValue")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getShortValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getShortValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public short getShortValue()
   ///
@@ -3762,16 +3244,13 @@
   ///   Java 16-bit signed {@code short} range); otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getShortValue() {
-    final result__ = _getShortValue(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getShortValue() => _getShortValue(reference).short;
 
-  static final _getIntValue =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getIntValue")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getIntValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getIntValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract int getIntValue()
   ///
@@ -3790,16 +3269,13 @@
   ///   Java 32-bit signed {@code int} range); otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getIntValue() {
-    final result__ = _getIntValue(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getIntValue() => _getIntValue(reference).integer;
 
-  static final _getLongValue =
-      jniLookup<ffi.NativeFunction<ffi.Int64 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getLongValue")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getLongValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getLongValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract long getLongValue()
   ///
@@ -3818,17 +3294,13 @@
   ///   Java 32-bit signed {@code long} range); otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getLongValue() {
-    final result__ = _getLongValue(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getLongValue() => _getLongValue(reference).long;
 
   static final _getBigIntegerValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getBigIntegerValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getBigIntegerValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract java.math.BigInteger getBigIntegerValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3844,16 +3316,14 @@
   ///     otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniObject getBigIntegerValue() {
-    final result__ = jni.JniObject.fromRef(_getBigIntegerValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getBigIntegerValue() =>
+      jni.JniObject.fromRef(_getBigIntegerValue(reference).object);
 
-  static final _getFloatValue =
-      jniLookup<ffi.NativeFunction<ffi.Float Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getFloatValue")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
+  static final _getFloatValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getFloatValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract float getFloatValue()
   ///
@@ -3872,16 +3342,13 @@
   ///   Java {@code float} range); otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  double getFloatValue() {
-    final result__ = _getFloatValue(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  double getFloatValue() => _getFloatValue(reference).float;
 
-  static final _getDoubleValue =
-      jniLookup<ffi.NativeFunction<ffi.Double Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getDoubleValue")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
+  static final _getDoubleValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getDoubleValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract double getDoubleValue()
   ///
@@ -3900,17 +3367,13 @@
   ///   Java {@code double} range); otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  double getDoubleValue() {
-    final result__ = _getDoubleValue(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  double getDoubleValue() => _getDoubleValue(reference).doubleFloat;
 
   static final _getDecimalValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getDecimalValue")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getDecimalValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract java.math.BigDecimal getDecimalValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3923,16 +3386,14 @@
   ///   otherwise exception thrown
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniObject getDecimalValue() {
-    final result__ = jni.JniObject.fromRef(_getDecimalValue(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getDecimalValue() =>
+      jni.JniObject.fromRef(_getDecimalValue(reference).object);
 
-  static final _getBooleanValue =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getBooleanValue")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getBooleanValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getBooleanValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean getBooleanValue()
   ///
@@ -3947,17 +3408,13 @@
   ///   otherwise throws JsonParseException
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  bool getBooleanValue() {
-    final result__ = _getBooleanValue(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool getBooleanValue() => _getBooleanValue(reference).boolean;
 
   static final _getEmbeddedObject = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getEmbeddedObject")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getEmbeddedObject")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Object getEmbeddedObject()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -3976,19 +3433,15 @@
   ///   for the current token, if any; {@code null otherwise}
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniObject getEmbeddedObject() {
-    final result__ = jni.JniObject.fromRef(_getEmbeddedObject(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getEmbeddedObject() =>
+      jni.JniObject.fromRef(_getEmbeddedObject(reference).object);
 
   static final _getBinaryValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getBinaryValue")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getBinaryValue")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant bv)
@@ -4014,18 +3467,14 @@
   ///@return Decoded binary data
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniObject getBinaryValue(jni.JniObject bv) {
-    final result__ =
-        jni.JniObject.fromRef(_getBinaryValue(reference, bv.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getBinaryValue(jni.JniObject bv) =>
+      jni.JniObject.fromRef(_getBinaryValue(reference, bv.reference).object);
 
   static final _getBinaryValue1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getBinaryValue1")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getBinaryValue1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public byte[] getBinaryValue()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -4036,18 +3485,16 @@
   ///@return Decoded binary data
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  jni.JniObject getBinaryValue1() {
-    final result__ = jni.JniObject.fromRef(_getBinaryValue1(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getBinaryValue1() =>
+      jni.JniObject.fromRef(_getBinaryValue1(reference).object);
 
   static final _readBinaryValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int32 Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_readBinaryValue")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__readBinaryValue")
+      .asFunction<
+          jni.JniResult Function(
+              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public int readBinaryValue(java.io.OutputStream out)
   ///
@@ -4062,19 +3509,17 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.1
-  int readBinaryValue(jni.JniObject out) {
-    final result__ = _readBinaryValue(reference, out.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int readBinaryValue(jni.JniObject out) =>
+      _readBinaryValue(reference, out.reference).integer;
 
   static final _readBinaryValue1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int32 Function(ffi.Pointer<ffi.Void>,
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_readBinaryValue1")
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__readBinaryValue1")
       .asFunction<
-          int Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
+          jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
               ffi.Pointer<ffi.Void>)>();
 
   /// from: public int readBinaryValue(com.fasterxml.jackson.core.Base64Variant bv, java.io.OutputStream out)
@@ -4087,16 +3532,14 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.1
-  int readBinaryValue1(jni.JniObject bv, jni.JniObject out) {
-    final result__ = _readBinaryValue1(reference, bv.reference, out.reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int readBinaryValue1(jni.JniObject bv, jni.JniObject out) =>
+      _readBinaryValue1(reference, bv.reference, out.reference).integer;
 
-  static final _getValueAsInt =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getValueAsInt")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getValueAsInt = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsInt")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getValueAsInt()
   ///
@@ -4113,17 +3556,13 @@
   ///    otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getValueAsInt() {
-    final result__ = _getValueAsInt(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getValueAsInt() => _getValueAsInt(reference).integer;
 
   static final _getValueAsInt1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int32 Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonParser_getValueAsInt1")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int32)>>("JsonParser__getValueAsInt1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public int getValueAsInt(int def)
   ///
@@ -4140,16 +3579,13 @@
   ///@return {@code int} value current token is converted to, if possible; {@code def} otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getValueAsInt1(int def) {
-    final result__ = _getValueAsInt1(reference, def);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getValueAsInt1(int def) => _getValueAsInt1(reference, def).integer;
 
-  static final _getValueAsLong =
-      jniLookup<ffi.NativeFunction<ffi.Int64 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getValueAsLong")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getValueAsLong = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsLong")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public long getValueAsLong()
   ///
@@ -4166,17 +3602,13 @@
   ///    otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getValueAsLong() {
-    final result__ = _getValueAsLong(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getValueAsLong() => _getValueAsLong(reference).long;
 
   static final _getValueAsLong1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Int64 Function(ffi.Pointer<ffi.Void>, ffi.Int64)>>(
-          "com_fasterxml_jackson_core_JsonParser_getValueAsLong1")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int64)>>("JsonParser__getValueAsLong1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public long getValueAsLong(long def)
   ///
@@ -4193,16 +3625,13 @@
   ///@return {@code long} value current token is converted to, if possible; {@code def} otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  int getValueAsLong1(int def) {
-    final result__ = _getValueAsLong1(reference, def);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getValueAsLong1(int def) => _getValueAsLong1(reference, def).long;
 
-  static final _getValueAsDouble =
-      jniLookup<ffi.NativeFunction<ffi.Double Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getValueAsDouble")
-          .asFunction<double Function(ffi.Pointer<ffi.Void>)>();
+  static final _getValueAsDouble = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsDouble")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public double getValueAsDouble()
   ///
@@ -4219,17 +3648,13 @@
   ///    otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  double getValueAsDouble() {
-    final result__ = _getValueAsDouble(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  double getValueAsDouble() => _getValueAsDouble(reference).doubleFloat;
 
   static final _getValueAsDouble1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Double Function(ffi.Pointer<ffi.Void>, ffi.Double)>>(
-          "com_fasterxml_jackson_core_JsonParser_getValueAsDouble1")
-      .asFunction<double Function(ffi.Pointer<ffi.Void>, double)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Double)>>("JsonParser__getValueAsDouble1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, double)>();
 
   /// from: public double getValueAsDouble(double def)
   ///
@@ -4246,16 +3671,14 @@
   ///@return {@code double} value current token is converted to, if possible; {@code def} otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  double getValueAsDouble1(double def) {
-    final result__ = _getValueAsDouble1(reference, def);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  double getValueAsDouble1(double def) =>
+      _getValueAsDouble1(reference, def).doubleFloat;
 
-  static final _getValueAsBoolean =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_getValueAsBoolean")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getValueAsBoolean = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsBoolean")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean getValueAsBoolean()
   ///
@@ -4272,17 +3695,13 @@
   ///    otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  bool getValueAsBoolean() {
-    final result__ = _getValueAsBoolean(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool getValueAsBoolean() => _getValueAsBoolean(reference).boolean;
 
   static final _getValueAsBoolean1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "com_fasterxml_jackson_core_JsonParser_getValueAsBoolean1")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Uint8)>>("JsonParser__getValueAsBoolean1")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public boolean getValueAsBoolean(boolean def)
   ///
@@ -4299,17 +3718,14 @@
   ///@return {@code boolean} value current token is converted to, if possible; {@code def} otherwise
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
-  bool getValueAsBoolean1(bool def) {
-    final result__ = _getValueAsBoolean1(reference, def ? 1 : 0) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool getValueAsBoolean1(bool def) =>
+      _getValueAsBoolean1(reference, def ? 1 : 0).boolean;
 
   static final _getValueAsString = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getValueAsString")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsString")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.String getValueAsString()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -4325,19 +3741,15 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.1
-  jni.JniString getValueAsString() {
-    final result__ = jni.JniString.fromRef(_getValueAsString(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString getValueAsString() =>
+      jni.JniString.fromRef(_getValueAsString(reference).object);
 
   static final _getValueAsString1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getValueAsString1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsString1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public abstract java.lang.String getValueAsString(java.lang.String def)
@@ -4355,17 +3767,14 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.1
-  jni.JniString getValueAsString1(jni.JniString def) {
-    final result__ =
-        jni.JniString.fromRef(_getValueAsString1(reference, def.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString getValueAsString1(jni.JniString def) => jni.JniString.fromRef(
+      _getValueAsString1(reference, def.reference).object);
 
-  static final _canReadObjectId =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_canReadObjectId")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _canReadObjectId = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__canReadObjectId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canReadObjectId()
   ///
@@ -4380,16 +3789,13 @@
   ///@return {@code True} if the format being read supports native Object Ids;
   ///    {@code false} if not
   ///@since 2.3
-  bool canReadObjectId() {
-    final result__ = _canReadObjectId(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canReadObjectId() => _canReadObjectId(reference).boolean;
 
-  static final _canReadTypeId =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser_canReadTypeId")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _canReadTypeId = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__canReadTypeId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean canReadTypeId()
   ///
@@ -4404,17 +3810,13 @@
   ///@return {@code True} if the format being read supports native Type Ids;
   ///    {@code false} if not
   ///@since 2.3
-  bool canReadTypeId() {
-    final result__ = _canReadTypeId(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool canReadTypeId() => _canReadTypeId(reference).boolean;
 
   static final _getObjectId = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getObjectId")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getObjectId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Object getObjectId()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -4432,17 +3834,14 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.3
-  jni.JniObject getObjectId() {
-    final result__ = jni.JniObject.fromRef(_getObjectId(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getObjectId() =>
+      jni.JniObject.fromRef(_getObjectId(reference).object);
 
   static final _getTypeId = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_getTypeId")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__getTypeId")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.lang.Object getTypeId()
   /// The returned object must be deleted after use, by calling the `delete` method.
@@ -4460,19 +3859,15 @@
   ///@throws IOException for low-level read issues, or
   ///   JsonParseException for decoding problems
   ///@since 2.3
-  jni.JniObject getTypeId() {
-    final result__ = jni.JniObject.fromRef(_getTypeId(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject getTypeId() =>
+      jni.JniObject.fromRef(_getTypeId(reference).object);
 
   static final _readValuesAs = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_readValuesAs")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__readValuesAs")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.util.Iterator<T> readValuesAs(java.lang.Class<T> valueType)
@@ -4486,20 +3881,15 @@
   ///@return Iterator for reading multiple Java values from content
   ///@throws IOException if there is either an underlying I/O problem or decoding
   ///    issue at format layer
-  jni.JniObject readValuesAs(jni.JniObject valueType) {
-    final result__ =
-        jni.JniObject.fromRef(_readValuesAs(reference, valueType.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject readValuesAs(jni.JniObject valueType) => jni.JniObject.fromRef(
+      _readValuesAs(reference, valueType.reference).object);
 
   static final _readValuesAs1 = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(
-                      ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser_readValuesAs1")
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Pointer<ffi.Void>)>>("JsonParser__readValuesAs1")
       .asFunction<
-          ffi.Pointer<ffi.Void> Function(
+          jni.JniResult Function(
               ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
 
   /// from: public java.util.Iterator<T> readValuesAs(com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
@@ -4513,12 +3903,9 @@
   ///@return Iterator for reading multiple Java values from content
   ///@throws IOException if there is either an underlying I/O problem or decoding
   ///    issue at format layer
-  jni.JniObject readValuesAs1(jni.JniObject valueTypeRef) {
-    final result__ = jni.JniObject.fromRef(
-        _readValuesAs1(reference, valueTypeRef.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject readValuesAs1(jni.JniObject valueTypeRef) =>
+      jni.JniObject.fromRef(
+          _readValuesAs1(reference, valueTypeRef.reference).object);
 }
 
 /// from: com.fasterxml.jackson.core.JsonParser$Feature
@@ -4528,95 +3915,72 @@
   JsonParser_Feature.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
 
   static final _values =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonParser__Feature_values")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "JsonParser_Feature__values")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public com.fasterxml.jackson.core.JsonParser.Feature[] values()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static jni.JniObject values() {
-    final result__ = jni.JniObject.fromRef(_values());
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static jni.JniObject values() => jni.JniObject.fromRef(_values().object);
 
   static final _valueOf = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser__Feature_valueOf")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser_Feature__valueOf")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: static public com.fasterxml.jackson.core.JsonParser.Feature valueOf(java.lang.String name)
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static JsonParser_Feature valueOf(jni.JniString name) {
-    final result__ = JsonParser_Feature.fromRef(_valueOf(name.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static JsonParser_Feature valueOf(jni.JniString name) =>
+      JsonParser_Feature.fromRef(_valueOf(name.reference).object);
 
   static final _collectDefaults =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function()>>(
-              "com_fasterxml_jackson_core_JsonParser__Feature_collectDefaults")
-          .asFunction<int Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "JsonParser_Feature__collectDefaults")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public int collectDefaults()
   ///
   /// Method that calculates bit set (flags) of all features that
   /// are enabled by default.
   ///@return Bit mask of all features that are enabled by default
-  static int collectDefaults() {
-    final result__ = _collectDefaults();
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static int collectDefaults() => _collectDefaults().integer;
 
   static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function(ffi.Uint8)>>(
-              "com_fasterxml_jackson_core_JsonParser__Feature_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function(int)>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function(ffi.Uint8)>>(
+              "JsonParser_Feature__ctor")
+          .asFunction<jni.JniResult Function(int)>();
 
   /// from: private void <init>(boolean defaultState)
   JsonParser_Feature(bool defaultState)
-      : super.fromRef(_ctor(defaultState ? 1 : 0)) {
-    jni.Jni.env.checkException();
-  }
+      : super.fromRef(_ctor(defaultState ? 1 : 0).object);
 
-  static final _enabledByDefault =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser__Feature_enabledByDefault")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _enabledByDefault = jniLookup<
+              ffi.NativeFunction<
+                  jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
+          "JsonParser_Feature__enabledByDefault")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean enabledByDefault()
-  bool enabledByDefault() {
-    final result__ = _enabledByDefault(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool enabledByDefault() => _enabledByDefault(reference).boolean;
 
   static final _enabledIn = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Uint8 Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "com_fasterxml_jackson_core_JsonParser__Feature_enabledIn")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>,
+                  ffi.Int32)>>("JsonParser_Feature__enabledIn")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public boolean enabledIn(int flags)
-  bool enabledIn(int flags) {
-    final result__ = _enabledIn(reference, flags) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool enabledIn(int flags) => _enabledIn(reference, flags).boolean;
 
-  static final _getMask =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonParser__Feature_getMask")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getMask = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser_Feature__getMask")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getMask()
-  int getMask() {
-    final result__ = _getMask(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getMask() => _getMask(reference).integer;
 }
 
 /// from: com.fasterxml.jackson.core.JsonParser$NumberType
@@ -4627,41 +3991,31 @@
   JsonParser_NumberType.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
 
   static final _values =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonParser__NumberType_values")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "JsonParser_NumberType__values")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public com.fasterxml.jackson.core.JsonParser.NumberType[] values()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static jni.JniObject values() {
-    final result__ = jni.JniObject.fromRef(_values());
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static jni.JniObject values() => jni.JniObject.fromRef(_values().object);
 
   static final _valueOf = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonParser__NumberType_valueOf")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonParser_NumberType__valueOf")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: static public com.fasterxml.jackson.core.JsonParser.NumberType valueOf(java.lang.String name)
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static JsonParser_NumberType valueOf(jni.JniString name) {
-    final result__ = JsonParser_NumberType.fromRef(_valueOf(name.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static JsonParser_NumberType valueOf(jni.JniString name) =>
+      JsonParser_NumberType.fromRef(_valueOf(name.reference).object);
 
-  static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonParser__NumberType_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+  static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+          "JsonParser_NumberType__ctor")
+      .asFunction<jni.JniResult Function()>();
 
   /// from: private void <init>()
-  JsonParser_NumberType() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
+  JsonParser_NumberType() : super.fromRef(_ctor().object);
 }
 
 /// from: com.fasterxml.jackson.core.JsonToken
@@ -4672,37 +4026,30 @@
   JsonToken.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
 
   static final _values =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_fasterxml_jackson_core_JsonToken_values")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "JsonToken__values")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public com.fasterxml.jackson.core.JsonToken[] values()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static jni.JniObject values() {
-    final result__ = jni.JniObject.fromRef(_values());
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static jni.JniObject values() => jni.JniObject.fromRef(_values().object);
 
   static final _valueOf = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonToken_valueOf")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__valueOf")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: static public com.fasterxml.jackson.core.JsonToken valueOf(java.lang.String name)
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static JsonToken valueOf(jni.JniString name) {
-    final result__ = JsonToken.fromRef(_valueOf(name.reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static JsonToken valueOf(jni.JniString name) =>
+      JsonToken.fromRef(_valueOf(name.reference).object);
 
   static final _ctor = jniLookup<
           ffi.NativeFunction<
-              ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>,
-                  ffi.Int32)>>("com_fasterxml_jackson_core_JsonToken_ctor")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>, int)>();
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Int32)>>("JsonToken__ctor")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: private void <init>(java.lang.String token, int id)
   ///
@@ -4710,83 +4057,66 @@
   ///   single static representation; null otherwise
   ///@param id Numeric id from JsonTokenId
   JsonToken(jni.JniString token, int id)
-      : super.fromRef(_ctor(token.reference, id)) {
-    jni.Jni.env.checkException();
-  }
+      : super.fromRef(_ctor(token.reference, id).object);
 
-  static final _id =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonToken_id")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _id = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>)>>("JsonToken__id")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final int id()
-  int id() {
-    final result__ = _id(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int id() => _id(reference).integer;
 
   static final _asString = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonToken_asString")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__asString")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final java.lang.String asString()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniString asString() {
-    final result__ = jni.JniString.fromRef(_asString(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniString asString() =>
+      jni.JniString.fromRef(_asString(reference).object);
 
   static final _asCharArray = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonToken_asCharArray")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__asCharArray")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final char[] asCharArray()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject asCharArray() {
-    final result__ = jni.JniObject.fromRef(_asCharArray(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject asCharArray() =>
+      jni.JniObject.fromRef(_asCharArray(reference).object);
 
   static final _asByteArray = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_fasterxml_jackson_core_JsonToken_asByteArray")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__asByteArray")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final byte[] asByteArray()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  jni.JniObject asByteArray() {
-    final result__ = jni.JniObject.fromRef(_asByteArray(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  jni.JniObject asByteArray() =>
+      jni.JniObject.fromRef(_asByteArray(reference).object);
 
-  static final _isNumeric =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonToken_isNumeric")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isNumeric = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__isNumeric")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isNumeric()
   ///
   /// @return {@code True} if this token is {@code VALUE_NUMBER_INT} or {@code VALUE_NUMBER_FLOAT},
   ///   {@code false} otherwise
-  bool isNumeric() {
-    final result__ = _isNumeric(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isNumeric() => _isNumeric(reference).boolean;
 
-  static final _isStructStart =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonToken_isStructStart")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isStructStart = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__isStructStart")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isStructStart()
   ///
@@ -4797,16 +4127,13 @@
   ///@return {@code True} if this token is {@code START_OBJECT} or {@code START_ARRAY},
   ///   {@code false} otherwise
   ///@since 2.3
-  bool isStructStart() {
-    final result__ = _isStructStart(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isStructStart() => _isStructStart(reference).boolean;
 
-  static final _isStructEnd =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonToken_isStructEnd")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isStructEnd = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__isStructEnd")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isStructEnd()
   ///
@@ -4817,16 +4144,13 @@
   ///@return {@code True} if this token is {@code END_OBJECT} or {@code END_ARRAY},
   ///   {@code false} otherwise
   ///@since 2.3
-  bool isStructEnd() {
-    final result__ = _isStructEnd(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isStructEnd() => _isStructEnd(reference).boolean;
 
-  static final _isScalarValue =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonToken_isScalarValue")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isScalarValue = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__isScalarValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isScalarValue()
   ///
@@ -4836,24 +4160,17 @@
   /// {@code FIELD_NAME}.
   ///@return {@code True} if this token is a scalar value token (one of
   ///   {@code VALUE_xxx} tokens), {@code false} otherwise
-  bool isScalarValue() {
-    final result__ = _isScalarValue(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isScalarValue() => _isScalarValue(reference).boolean;
 
-  static final _isBoolean =
-      jniLookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_fasterxml_jackson_core_JsonToken_isBoolean")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _isBoolean = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("JsonToken__isBoolean")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public final boolean isBoolean()
   ///
   /// @return {@code True} if this token is {@code VALUE_TRUE} or {@code VALUE_FALSE},
   ///   {@code false} otherwise
-  bool isBoolean() {
-    final result__ = _isBoolean(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool isBoolean() => _isBoolean(reference).boolean;
 }
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/src/.clang-format b/pkgs/jnigen/test/jackson_core_test/third_party/src/.clang-format
new file mode 100644
index 0000000..a256c2f
--- /dev/null
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/src/.clang-format
@@ -0,0 +1,15 @@
+# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format
+
+# Defines the Chromium style for automatic reformatting.
+# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+BasedOnStyle: Chromium
+
+# clang-format doesn't seem to do a good job of this for longer comments.
+ReflowComments: 'false'
+
+# We have lots of these. Though we need to put them all in curly braces,
+# clang-format can't do that.
+AllowShortIfStatementsOnASingleLine: 'true'
+
+# Put escaped newlines into the rightmost column.
+AlignEscapedNewlinesLeft: false
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/src/dartjni.h b/pkgs/jnigen/test/jackson_core_test/third_party/src/dartjni.h
index bc72baa..efb9079 100644
--- a/pkgs/jnigen/test/jackson_core_test/third_party/src/dartjni.h
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/src/dartjni.h
@@ -89,6 +89,13 @@
   jthrowable exception;
 } JniPointerResult;
 
+/// JniExceptionDetails holds 2 jstring objects, one is the result of
+/// calling `toString` on exception object, other is stack trace;
+typedef struct JniExceptionDetails {
+  jstring message;
+  jstring stacktrace;
+} JniExceptionDetails;
+
 /// This struct contains functions which wrap method call / field access conveniently along with
 /// exception checking.
 ///
@@ -118,6 +125,7 @@
                                 jvalue* args);
   JniResult (*getField)(jobject obj, jfieldID fieldID, int callType);
   JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType);
+  JniExceptionDetails (*getExceptionDetails)(jthrowable exception);
 } JniAccessors;
 
 FFI_PLUGIN_EXPORT JniAccessors* GetAccessors();
@@ -240,3 +248,10 @@
     jniEnv = env_getter();
   }
 }
+
+static inline jthrowable check_exception() {
+  jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv);
+  if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv);
+  if (exception == NULL) return NULL;
+  return to_global_ref(exception);
+}
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/src/jackson_core_test.c b/pkgs/jnigen/test/jackson_core_test/third_party/src/jackson_core_test.c
index b77cd21..37c0153 100644
--- a/pkgs/jnigen/test/jackson_core_test/third_party/src/jackson_core_test.c
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/src/jackson_core_test.c
@@ -18,2624 +18,3721 @@
 // Autogenerated by jnigen. DO NOT EDIT!
 
 #include <stdint.h>
-#include "jni.h"
 #include "dartjni.h"
+#include "jni.h"
 
-thread_local JNIEnv *jniEnv;
+thread_local JNIEnv* jniEnv;
 JniContext jni;
 
 JniContext (*context_getter)(void);
-JNIEnv *(*env_getter)(void);
+JNIEnv* (*env_getter)(void);
 
-void setJniGetters(JniContext (*cg)(void),
-        JNIEnv *(*eg)(void)) {
-    context_getter = cg;
-    env_getter = eg;
+void setJniGetters(JniContext (*cg)(void), JNIEnv* (*eg)(void)) {
+  context_getter = cg;
+  env_getter = eg;
 }
 
 // com.fasterxml.jackson.core.JsonFactory
-jclass _c_com_fasterxml_jackson_core_JsonFactory = NULL;
+jclass _c_JsonFactory = NULL;
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_ctor = NULL;
+jmethodID _m_JsonFactory__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_ctor() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_ctor, "<init>", "()V");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _m_com_fasterxml_jackson_core_JsonFactory_ctor);
-    return to_global_ref(_result);
+JniResult JsonFactory__ctor() {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__ctor, "<init>", "()V");
+  if (_m_JsonFactory__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, _m_JsonFactory__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_ctor1 = NULL;
+jmethodID _m_JsonFactory__ctor1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_ctor1(jobject oc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_ctor1, "<init>", "(Lcom/fasterxml/jackson/core/ObjectCodec;)V");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_ctor1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _m_com_fasterxml_jackson_core_JsonFactory_ctor1, oc);
-    return to_global_ref(_result);
+JniResult JsonFactory__ctor1(jobject oc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__ctor1, "<init>",
+              "(Lcom/fasterxml/jackson/core/ObjectCodec;)V");
+  if (_m_JsonFactory__ctor1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, _m_JsonFactory__ctor1, oc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_ctor2 = NULL;
+jmethodID _m_JsonFactory__ctor2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_ctor2(jobject src, jobject codec) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_ctor2, "<init>", "(Lcom/fasterxml/jackson/core/JsonFactory;Lcom/fasterxml/jackson/core/ObjectCodec;)V");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_ctor2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _m_com_fasterxml_jackson_core_JsonFactory_ctor2, src, codec);
-    return to_global_ref(_result);
+JniResult JsonFactory__ctor2(jobject src, jobject codec) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__ctor2, "<init>",
+              "(Lcom/fasterxml/jackson/core/JsonFactory;Lcom/fasterxml/jackson/"
+              "core/ObjectCodec;)V");
+  if (_m_JsonFactory__ctor2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_JsonFactory,
+                                         _m_JsonFactory__ctor2, src, codec);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_ctor3 = NULL;
+jmethodID _m_JsonFactory__ctor3 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_ctor3(jobject b) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_ctor3, "<init>", "(Lcom/fasterxml/jackson/core/JsonFactoryBuilder;)V");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_ctor3 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _m_com_fasterxml_jackson_core_JsonFactory_ctor3, b);
-    return to_global_ref(_result);
+JniResult JsonFactory__ctor3(jobject b) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__ctor3, "<init>",
+              "(Lcom/fasterxml/jackson/core/JsonFactoryBuilder;)V");
+  if (_m_JsonFactory__ctor3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_JsonFactory, _m_JsonFactory__ctor3, b);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_ctor4 = NULL;
+jmethodID _m_JsonFactory__ctor4 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_ctor4(jobject b, uint8_t bogus) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_ctor4, "<init>", "(Lcom/fasterxml/jackson/core/TSFBuilder;Z)V");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_ctor4 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _m_com_fasterxml_jackson_core_JsonFactory_ctor4, b, bogus);
-    return to_global_ref(_result);
+JniResult JsonFactory__ctor4(jobject b, uint8_t bogus) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__ctor4, "<init>",
+              "(Lcom/fasterxml/jackson/core/TSFBuilder;Z)V");
+  if (_m_JsonFactory__ctor4 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_JsonFactory,
+                                         _m_JsonFactory__ctor4, b, bogus);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_rebuild = NULL;
+jmethodID _m_JsonFactory__rebuild = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_rebuild(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_rebuild, "rebuild", "()Lcom/fasterxml/jackson/core/TSFBuilder;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_rebuild == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_rebuild);
-    return to_global_ref(_result);
+JniResult JsonFactory__rebuild(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__rebuild, "rebuild",
+              "()Lcom/fasterxml/jackson/core/TSFBuilder;");
+  if (_m_JsonFactory__rebuild == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__rebuild);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_builder = NULL;
+jmethodID _m_JsonFactory__builder = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_builder() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_builder, "builder", "()Lcom/fasterxml/jackson/core/TSFBuilder;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_builder == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _m_com_fasterxml_jackson_core_JsonFactory_builder);
-    return to_global_ref(_result);
+JniResult JsonFactory__builder() {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_JsonFactory, &_m_JsonFactory__builder, "builder",
+                     "()Lcom/fasterxml/jackson/core/TSFBuilder;");
+  if (_m_JsonFactory__builder == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_JsonFactory,
+                                                      _m_JsonFactory__builder);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_copy = NULL;
+jmethodID _m_JsonFactory__copy = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_copy(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_copy, "copy", "()Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_copy == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_copy);
-    return to_global_ref(_result);
+JniResult JsonFactory__copy(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__copy, "copy",
+              "()Lcom/fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__copy == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__copy);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_readResolve = NULL;
+jmethodID _m_JsonFactory__readResolve = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_readResolve(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_readResolve, "readResolve", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_readResolve == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_readResolve);
-    return to_global_ref(_result);
+JniResult JsonFactory__readResolve(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__readResolve, "readResolve",
+              "()Ljava/lang/Object;");
+  if (_m_JsonFactory__readResolve == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__readResolve);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_requiresPropertyOrdering = NULL;
+jmethodID _m_JsonFactory__requiresPropertyOrdering = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_requiresPropertyOrdering(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_requiresPropertyOrdering, "requiresPropertyOrdering", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_requiresPropertyOrdering == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_requiresPropertyOrdering);
-    return _result;
+JniResult JsonFactory__requiresPropertyOrdering(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__requiresPropertyOrdering,
+              "requiresPropertyOrdering", "()Z");
+  if (_m_JsonFactory__requiresPropertyOrdering == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonFactory__requiresPropertyOrdering);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_canHandleBinaryNatively = NULL;
+jmethodID _m_JsonFactory__canHandleBinaryNatively = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_canHandleBinaryNatively(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_canHandleBinaryNatively, "canHandleBinaryNatively", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_canHandleBinaryNatively == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_canHandleBinaryNatively);
-    return _result;
+JniResult JsonFactory__canHandleBinaryNatively(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__canHandleBinaryNatively,
+              "canHandleBinaryNatively", "()Z");
+  if (_m_JsonFactory__canHandleBinaryNatively == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonFactory__canHandleBinaryNatively);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_canUseCharArrays = NULL;
+jmethodID _m_JsonFactory__canUseCharArrays = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_canUseCharArrays(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_canUseCharArrays, "canUseCharArrays", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_canUseCharArrays == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_canUseCharArrays);
-    return _result;
+JniResult JsonFactory__canUseCharArrays(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__canUseCharArrays,
+              "canUseCharArrays", "()Z");
+  if (_m_JsonFactory__canUseCharArrays == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonFactory__canUseCharArrays);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_canParseAsync = NULL;
+jmethodID _m_JsonFactory__canParseAsync = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_canParseAsync(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_canParseAsync, "canParseAsync", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_canParseAsync == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_canParseAsync);
-    return _result;
+JniResult JsonFactory__canParseAsync(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__canParseAsync, "canParseAsync",
+              "()Z");
+  if (_m_JsonFactory__canParseAsync == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_,
+                                                 _m_JsonFactory__canParseAsync);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getFormatReadFeatureType = NULL;
+jmethodID _m_JsonFactory__getFormatReadFeatureType = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getFormatReadFeatureType(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getFormatReadFeatureType, "getFormatReadFeatureType", "()Ljava/lang/Class;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getFormatReadFeatureType == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getFormatReadFeatureType);
-    return to_global_ref(_result);
+JniResult JsonFactory__getFormatReadFeatureType(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getFormatReadFeatureType,
+              "getFormatReadFeatureType", "()Ljava/lang/Class;");
+  if (_m_JsonFactory__getFormatReadFeatureType == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__getFormatReadFeatureType);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getFormatWriteFeatureType = NULL;
+jmethodID _m_JsonFactory__getFormatWriteFeatureType = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getFormatWriteFeatureType(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getFormatWriteFeatureType, "getFormatWriteFeatureType", "()Ljava/lang/Class;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getFormatWriteFeatureType == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getFormatWriteFeatureType);
-    return to_global_ref(_result);
+JniResult JsonFactory__getFormatWriteFeatureType(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getFormatWriteFeatureType,
+              "getFormatWriteFeatureType", "()Ljava/lang/Class;");
+  if (_m_JsonFactory__getFormatWriteFeatureType == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__getFormatWriteFeatureType);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_canUseSchema = NULL;
+jmethodID _m_JsonFactory__canUseSchema = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_canUseSchema(jobject self_, jobject schema) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_canUseSchema, "canUseSchema", "(Lcom/fasterxml/jackson/core/FormatSchema;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_canUseSchema == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_canUseSchema, schema);
-    return _result;
+JniResult JsonFactory__canUseSchema(jobject self_, jobject schema) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__canUseSchema, "canUseSchema",
+              "(Lcom/fasterxml/jackson/core/FormatSchema;)Z");
+  if (_m_JsonFactory__canUseSchema == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonFactory__canUseSchema, schema);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getFormatName = NULL;
+jmethodID _m_JsonFactory__getFormatName = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getFormatName(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getFormatName, "getFormatName", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getFormatName == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getFormatName);
-    return to_global_ref(_result);
+JniResult JsonFactory__getFormatName(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getFormatName, "getFormatName",
+              "()Ljava/lang/String;");
+  if (_m_JsonFactory__getFormatName == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__getFormatName);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_hasFormat = NULL;
+jmethodID _m_JsonFactory__hasFormat = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_hasFormat(jobject self_, jobject acc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_hasFormat, "hasFormat", "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/fasterxml/jackson/core/format/MatchStrength;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_hasFormat == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_hasFormat, acc);
-    return to_global_ref(_result);
+JniResult JsonFactory__hasFormat(jobject self_, jobject acc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__hasFormat, "hasFormat",
+              "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/"
+              "fasterxml/jackson/core/format/MatchStrength;");
+  if (_m_JsonFactory__hasFormat == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_JsonFactory__hasFormat, acc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_requiresCustomCodec = NULL;
+jmethodID _m_JsonFactory__requiresCustomCodec = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_requiresCustomCodec(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_requiresCustomCodec, "requiresCustomCodec", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_requiresCustomCodec == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_requiresCustomCodec);
-    return _result;
+JniResult JsonFactory__requiresCustomCodec(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__requiresCustomCodec,
+              "requiresCustomCodec", "()Z");
+  if (_m_JsonFactory__requiresCustomCodec == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonFactory__requiresCustomCodec);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_hasJSONFormat = NULL;
+jmethodID _m_JsonFactory__hasJSONFormat = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_hasJSONFormat(jobject self_, jobject acc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_hasJSONFormat, "hasJSONFormat", "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/fasterxml/jackson/core/format/MatchStrength;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_hasJSONFormat == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_hasJSONFormat, acc);
-    return to_global_ref(_result);
+JniResult JsonFactory__hasJSONFormat(jobject self_, jobject acc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__hasJSONFormat, "hasJSONFormat",
+              "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/"
+              "fasterxml/jackson/core/format/MatchStrength;");
+  if (_m_JsonFactory__hasJSONFormat == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__hasJSONFormat, acc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_version = NULL;
+jmethodID _m_JsonFactory__version = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_version(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_version, "version", "()Lcom/fasterxml/jackson/core/Version;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_version == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_version);
-    return to_global_ref(_result);
+JniResult JsonFactory__version(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__version, "version",
+              "()Lcom/fasterxml/jackson/core/Version;");
+  if (_m_JsonFactory__version == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__version);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_configure = NULL;
+jmethodID _m_JsonFactory__configure = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_configure(jobject self_, jobject f, uint8_t state) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_configure, "configure", "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_configure == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_configure, f, state);
-    return to_global_ref(_result);
+JniResult JsonFactory__configure(jobject self_, jobject f, uint8_t state) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__configure, "configure",
+              "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;Z)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__configure == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__configure, f, state);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_enable = NULL;
+jmethodID _m_JsonFactory__enable = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_enable(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_enable, "enable", "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_enable == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_enable, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__enable(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__enable, "enable",
+              "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__enable == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__enable, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_disable = NULL;
+jmethodID _m_JsonFactory__disable = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_disable(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_disable, "disable", "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_disable == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_disable, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__disable(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__disable, "disable",
+              "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__disable == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__disable, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_isEnabled = NULL;
+jmethodID _m_JsonFactory__isEnabled = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_isEnabled(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_isEnabled, "isEnabled", "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_isEnabled == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_isEnabled, f);
-    return _result;
+JniResult JsonFactory__isEnabled(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled, "isEnabled",
+              "(Lcom/fasterxml/jackson/core/JsonFactory$Feature;)Z");
+  if (_m_JsonFactory__isEnabled == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonFactory__isEnabled, f);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getParserFeatures = NULL;
+jmethodID _m_JsonFactory__getParserFeatures = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonFactory_getParserFeatures(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getParserFeatures, "getParserFeatures", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getParserFeatures == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getParserFeatures);
-    return _result;
+JniResult JsonFactory__getParserFeatures(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getParserFeatures,
+              "getParserFeatures", "()I");
+  if (_m_JsonFactory__getParserFeatures == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_,
+                                             _m_JsonFactory__getParserFeatures);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getGeneratorFeatures = NULL;
+jmethodID _m_JsonFactory__getGeneratorFeatures = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonFactory_getGeneratorFeatures(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getGeneratorFeatures, "getGeneratorFeatures", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getGeneratorFeatures == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getGeneratorFeatures);
-    return _result;
+JniResult JsonFactory__getGeneratorFeatures(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getGeneratorFeatures,
+              "getGeneratorFeatures", "()I");
+  if (_m_JsonFactory__getGeneratorFeatures == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonFactory__getGeneratorFeatures);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getFormatParserFeatures = NULL;
+jmethodID _m_JsonFactory__getFormatParserFeatures = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonFactory_getFormatParserFeatures(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getFormatParserFeatures, "getFormatParserFeatures", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getFormatParserFeatures == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getFormatParserFeatures);
-    return _result;
+JniResult JsonFactory__getFormatParserFeatures(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getFormatParserFeatures,
+              "getFormatParserFeatures", "()I");
+  if (_m_JsonFactory__getFormatParserFeatures == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonFactory__getFormatParserFeatures);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getFormatGeneratorFeatures = NULL;
+jmethodID _m_JsonFactory__getFormatGeneratorFeatures = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonFactory_getFormatGeneratorFeatures(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getFormatGeneratorFeatures, "getFormatGeneratorFeatures", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getFormatGeneratorFeatures == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getFormatGeneratorFeatures);
-    return _result;
+JniResult JsonFactory__getFormatGeneratorFeatures(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getFormatGeneratorFeatures,
+              "getFormatGeneratorFeatures", "()I");
+  if (_m_JsonFactory__getFormatGeneratorFeatures == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonFactory__getFormatGeneratorFeatures);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_configure1 = NULL;
+jmethodID _m_JsonFactory__configure1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_configure1(jobject self_, jobject f, uint8_t state) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_configure1, "configure", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_configure1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_configure1, f, state);
-    return to_global_ref(_result);
+JniResult JsonFactory__configure1(jobject self_, jobject f, uint8_t state) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__configure1, "configure",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__configure1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__configure1, f, state);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_enable1 = NULL;
+jmethodID _m_JsonFactory__enable1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_enable1(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_enable1, "enable", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_enable1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_enable1, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__enable1(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__enable1, "enable",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/"
+              "jackson/core/JsonFactory;");
+  if (_m_JsonFactory__enable1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__enable1, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_disable1 = NULL;
+jmethodID _m_JsonFactory__disable1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_disable1(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_disable1, "disable", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_disable1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_disable1, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__disable1(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__disable1, "disable",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/"
+              "jackson/core/JsonFactory;");
+  if (_m_JsonFactory__disable1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__disable1, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_isEnabled1 = NULL;
+jmethodID _m_JsonFactory__isEnabled1 = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_isEnabled1(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_isEnabled1, "isEnabled", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_isEnabled1 == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_isEnabled1, f);
-    return _result;
+JniResult JsonFactory__isEnabled1(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled1, "isEnabled",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z");
+  if (_m_JsonFactory__isEnabled1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_,
+                                                 _m_JsonFactory__isEnabled1, f);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_isEnabled2 = NULL;
+jmethodID _m_JsonFactory__isEnabled2 = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_isEnabled2(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_isEnabled2, "isEnabled", "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_isEnabled2 == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_isEnabled2, f);
-    return _result;
+JniResult JsonFactory__isEnabled2(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled2, "isEnabled",
+              "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z");
+  if (_m_JsonFactory__isEnabled2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_,
+                                                 _m_JsonFactory__isEnabled2, f);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getInputDecorator = NULL;
+jmethodID _m_JsonFactory__getInputDecorator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getInputDecorator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getInputDecorator, "getInputDecorator", "()Lcom/fasterxml/jackson/core/io/InputDecorator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getInputDecorator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getInputDecorator);
-    return to_global_ref(_result);
+JniResult JsonFactory__getInputDecorator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getInputDecorator,
+              "getInputDecorator",
+              "()Lcom/fasterxml/jackson/core/io/InputDecorator;");
+  if (_m_JsonFactory__getInputDecorator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__getInputDecorator);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_setInputDecorator = NULL;
+jmethodID _m_JsonFactory__setInputDecorator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_setInputDecorator(jobject self_, jobject d) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_setInputDecorator, "setInputDecorator", "(Lcom/fasterxml/jackson/core/io/InputDecorator;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_setInputDecorator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_setInputDecorator, d);
-    return to_global_ref(_result);
+JniResult JsonFactory__setInputDecorator(jobject self_, jobject d) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__setInputDecorator,
+              "setInputDecorator",
+              "(Lcom/fasterxml/jackson/core/io/InputDecorator;)Lcom/fasterxml/"
+              "jackson/core/JsonFactory;");
+  if (_m_JsonFactory__setInputDecorator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__setInputDecorator, d);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_configure2 = NULL;
+jmethodID _m_JsonFactory__configure2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_configure2(jobject self_, jobject f, uint8_t state) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_configure2, "configure", "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_configure2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_configure2, f, state);
-    return to_global_ref(_result);
+JniResult JsonFactory__configure2(jobject self_, jobject f, uint8_t state) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__configure2, "configure",
+              "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;Z)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__configure2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__configure2, f, state);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_enable2 = NULL;
+jmethodID _m_JsonFactory__enable2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_enable2(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_enable2, "enable", "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_enable2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_enable2, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__enable2(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__enable2, "enable",
+              "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__enable2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__enable2, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_disable2 = NULL;
+jmethodID _m_JsonFactory__disable2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_disable2(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_disable2, "disable", "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_disable2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_disable2, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__disable2(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__disable2, "disable",
+              "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__disable2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__disable2, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_isEnabled3 = NULL;
+jmethodID _m_JsonFactory__isEnabled3 = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_isEnabled3(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_isEnabled3, "isEnabled", "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_isEnabled3 == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_isEnabled3, f);
-    return _result;
+JniResult JsonFactory__isEnabled3(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled3, "isEnabled",
+              "(Lcom/fasterxml/jackson/core/JsonGenerator$Feature;)Z");
+  if (_m_JsonFactory__isEnabled3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_,
+                                                 _m_JsonFactory__isEnabled3, f);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_isEnabled4 = NULL;
+jmethodID _m_JsonFactory__isEnabled4 = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory_isEnabled4(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_isEnabled4, "isEnabled", "(Lcom/fasterxml/jackson/core/StreamWriteFeature;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_isEnabled4 == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_isEnabled4, f);
-    return _result;
+JniResult JsonFactory__isEnabled4(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__isEnabled4, "isEnabled",
+              "(Lcom/fasterxml/jackson/core/StreamWriteFeature;)Z");
+  if (_m_JsonFactory__isEnabled4 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_,
+                                                 _m_JsonFactory__isEnabled4, f);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getCharacterEscapes = NULL;
+jmethodID _m_JsonFactory__getCharacterEscapes = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getCharacterEscapes(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getCharacterEscapes, "getCharacterEscapes", "()Lcom/fasterxml/jackson/core/io/CharacterEscapes;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getCharacterEscapes == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getCharacterEscapes);
-    return to_global_ref(_result);
+JniResult JsonFactory__getCharacterEscapes(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getCharacterEscapes,
+              "getCharacterEscapes",
+              "()Lcom/fasterxml/jackson/core/io/CharacterEscapes;");
+  if (_m_JsonFactory__getCharacterEscapes == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__getCharacterEscapes);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_setCharacterEscapes = NULL;
+jmethodID _m_JsonFactory__setCharacterEscapes = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_setCharacterEscapes(jobject self_, jobject esc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_setCharacterEscapes, "setCharacterEscapes", "(Lcom/fasterxml/jackson/core/io/CharacterEscapes;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_setCharacterEscapes == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_setCharacterEscapes, esc);
-    return to_global_ref(_result);
+JniResult JsonFactory__setCharacterEscapes(jobject self_, jobject esc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__setCharacterEscapes,
+              "setCharacterEscapes",
+              "(Lcom/fasterxml/jackson/core/io/CharacterEscapes;)Lcom/"
+              "fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__setCharacterEscapes == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__setCharacterEscapes, esc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getOutputDecorator = NULL;
+jmethodID _m_JsonFactory__getOutputDecorator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getOutputDecorator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getOutputDecorator, "getOutputDecorator", "()Lcom/fasterxml/jackson/core/io/OutputDecorator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getOutputDecorator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getOutputDecorator);
-    return to_global_ref(_result);
+JniResult JsonFactory__getOutputDecorator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getOutputDecorator,
+              "getOutputDecorator",
+              "()Lcom/fasterxml/jackson/core/io/OutputDecorator;");
+  if (_m_JsonFactory__getOutputDecorator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__getOutputDecorator);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_setOutputDecorator = NULL;
+jmethodID _m_JsonFactory__setOutputDecorator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_setOutputDecorator(jobject self_, jobject d) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_setOutputDecorator, "setOutputDecorator", "(Lcom/fasterxml/jackson/core/io/OutputDecorator;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_setOutputDecorator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_setOutputDecorator, d);
-    return to_global_ref(_result);
+JniResult JsonFactory__setOutputDecorator(jobject self_, jobject d) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__setOutputDecorator,
+              "setOutputDecorator",
+              "(Lcom/fasterxml/jackson/core/io/OutputDecorator;)Lcom/fasterxml/"
+              "jackson/core/JsonFactory;");
+  if (_m_JsonFactory__setOutputDecorator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__setOutputDecorator, d);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_setRootValueSeparator = NULL;
+jmethodID _m_JsonFactory__setRootValueSeparator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_setRootValueSeparator(jobject self_, jobject sep) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_setRootValueSeparator, "setRootValueSeparator", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_setRootValueSeparator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_setRootValueSeparator, sep);
-    return to_global_ref(_result);
+JniResult JsonFactory__setRootValueSeparator(jobject self_, jobject sep) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__setRootValueSeparator,
+              "setRootValueSeparator",
+              "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory;");
+  if (_m_JsonFactory__setRootValueSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__setRootValueSeparator, sep);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getRootValueSeparator = NULL;
+jmethodID _m_JsonFactory__getRootValueSeparator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getRootValueSeparator(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getRootValueSeparator, "getRootValueSeparator", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getRootValueSeparator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getRootValueSeparator);
-    return to_global_ref(_result);
+JniResult JsonFactory__getRootValueSeparator(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getRootValueSeparator,
+              "getRootValueSeparator", "()Ljava/lang/String;");
+  if (_m_JsonFactory__getRootValueSeparator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__getRootValueSeparator);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_setCodec = NULL;
+jmethodID _m_JsonFactory__setCodec = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_setCodec(jobject self_, jobject oc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_setCodec, "setCodec", "(Lcom/fasterxml/jackson/core/ObjectCodec;)Lcom/fasterxml/jackson/core/JsonFactory;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_setCodec == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_setCodec, oc);
-    return to_global_ref(_result);
+JniResult JsonFactory__setCodec(jobject self_, jobject oc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__setCodec, "setCodec",
+              "(Lcom/fasterxml/jackson/core/ObjectCodec;)Lcom/fasterxml/"
+              "jackson/core/JsonFactory;");
+  if (_m_JsonFactory__setCodec == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__setCodec, oc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_getCodec = NULL;
+jmethodID _m_JsonFactory__getCodec = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_getCodec(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_getCodec, "getCodec", "()Lcom/fasterxml/jackson/core/ObjectCodec;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_getCodec == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_getCodec);
-    return to_global_ref(_result);
+JniResult JsonFactory__getCodec(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__getCodec, "getCodec",
+              "()Lcom/fasterxml/jackson/core/ObjectCodec;");
+  if (_m_JsonFactory__getCodec == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonFactory__getCodec);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser = NULL;
+jmethodID _m_JsonFactory__createParser = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser, "createParser", "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser, "createParser",
+              "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser1 = NULL;
+jmethodID _m_JsonFactory__createParser1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser1(jobject self_, jobject url) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser1, "createParser", "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser1, url);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser1(jobject self_, jobject url) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser1, "createParser",
+              "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser1, url);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser2 = NULL;
+jmethodID _m_JsonFactory__createParser2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser2(jobject self_, jobject in) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser2, "createParser", "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser2, in);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser2(jobject self_, jobject in) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser2, "createParser",
+              "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser2, in);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser3 = NULL;
+jmethodID _m_JsonFactory__createParser3 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser3(jobject self_, jobject r) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser3, "createParser", "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser3 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser3, r);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser3(jobject self_, jobject r) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser3, "createParser",
+              "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser3, r);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser4 = NULL;
+jmethodID _m_JsonFactory__createParser4 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser4(jobject self_, jobject data) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser4, "createParser", "(L[B;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser4 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser4, data);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser4(jobject self_, jobject data) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser4, "createParser",
+              "(L[B;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser4 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser4, data);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser5 = NULL;
+jmethodID _m_JsonFactory__createParser5 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser5(jobject self_, jobject data, int32_t offset, int32_t len) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser5, "createParser", "(L[B;II)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser5 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser5, data, offset, len);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser5(jobject self_,
+                                     jobject data,
+                                     int32_t offset,
+                                     int32_t len) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser5, "createParser",
+              "(L[B;II)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser5 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser5, data, offset, len);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser6 = NULL;
+jmethodID _m_JsonFactory__createParser6 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser6(jobject self_, jobject content) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser6, "createParser", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser6 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser6, content);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser6(jobject self_, jobject content) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser6, "createParser",
+              "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser6 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser6, content);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser7 = NULL;
+jmethodID _m_JsonFactory__createParser7 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser7(jobject self_, jobject content) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser7, "createParser", "(L[C;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser7 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser7, content);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser7(jobject self_, jobject content) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser7, "createParser",
+              "(L[C;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser7 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser7, content);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser8 = NULL;
+jmethodID _m_JsonFactory__createParser8 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser8(jobject self_, jobject content, int32_t offset, int32_t len) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser8, "createParser", "(L[C;II)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser8 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser8, content, offset, len);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser8(jobject self_,
+                                     jobject content,
+                                     int32_t offset,
+                                     int32_t len) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser8, "createParser",
+              "(L[C;II)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser8 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser8, content, offset, len);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createParser9 = NULL;
+jmethodID _m_JsonFactory__createParser9 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createParser9(jobject self_, jobject in) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createParser9, "createParser", "(Ljava/io/DataInput;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createParser9 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createParser9, in);
-    return to_global_ref(_result);
+JniResult JsonFactory__createParser9(jobject self_, jobject in) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createParser9, "createParser",
+              "(Ljava/io/DataInput;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createParser9 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createParser9, in);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createNonBlockingByteArrayParser = NULL;
+jmethodID _m_JsonFactory__createNonBlockingByteArrayParser = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createNonBlockingByteArrayParser(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createNonBlockingByteArrayParser, "createNonBlockingByteArrayParser", "()Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createNonBlockingByteArrayParser == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createNonBlockingByteArrayParser);
-    return to_global_ref(_result);
+JniResult JsonFactory__createNonBlockingByteArrayParser(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createNonBlockingByteArrayParser,
+              "createNonBlockingByteArrayParser",
+              "()Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createNonBlockingByteArrayParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createNonBlockingByteArrayParser);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createGenerator = NULL;
+jmethodID _m_JsonFactory__createGenerator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createGenerator(jobject self_, jobject out, jobject enc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createGenerator, "createGenerator", "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createGenerator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createGenerator, out, enc);
-    return to_global_ref(_result);
+JniResult JsonFactory__createGenerator(jobject self_,
+                                       jobject out,
+                                       jobject enc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator,
+              "createGenerator",
+              "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/"
+              "JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createGenerator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createGenerator, out, enc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createGenerator1 = NULL;
+jmethodID _m_JsonFactory__createGenerator1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createGenerator1(jobject self_, jobject out) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createGenerator1, "createGenerator", "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createGenerator1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createGenerator1, out);
-    return to_global_ref(_result);
+JniResult JsonFactory__createGenerator1(jobject self_, jobject out) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_JsonFactory, &_m_JsonFactory__createGenerator1, "createGenerator",
+      "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createGenerator1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createGenerator1, out);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createGenerator2 = NULL;
+jmethodID _m_JsonFactory__createGenerator2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createGenerator2(jobject self_, jobject w) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createGenerator2, "createGenerator", "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createGenerator2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createGenerator2, w);
-    return to_global_ref(_result);
+JniResult JsonFactory__createGenerator2(jobject self_, jobject w) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator2,
+              "createGenerator",
+              "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createGenerator2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createGenerator2, w);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createGenerator3 = NULL;
+jmethodID _m_JsonFactory__createGenerator3 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createGenerator3(jobject self_, jobject f, jobject enc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createGenerator3, "createGenerator", "(Ljava/io/File;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createGenerator3 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createGenerator3, f, enc);
-    return to_global_ref(_result);
+JniResult JsonFactory__createGenerator3(jobject self_, jobject f, jobject enc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator3,
+              "createGenerator",
+              "(Ljava/io/File;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/"
+              "fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createGenerator3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createGenerator3, f, enc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createGenerator4 = NULL;
+jmethodID _m_JsonFactory__createGenerator4 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createGenerator4(jobject self_, jobject out, jobject enc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createGenerator4, "createGenerator", "(Ljava/io/DataOutput;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createGenerator4 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createGenerator4, out, enc);
-    return to_global_ref(_result);
+JniResult JsonFactory__createGenerator4(jobject self_,
+                                        jobject out,
+                                        jobject enc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createGenerator4,
+              "createGenerator",
+              "(Ljava/io/DataOutput;Lcom/fasterxml/jackson/core/"
+              "JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createGenerator4 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createGenerator4, out, enc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createGenerator5 = NULL;
+jmethodID _m_JsonFactory__createGenerator5 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createGenerator5(jobject self_, jobject out) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createGenerator5, "createGenerator", "(Ljava/io/DataOutput;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createGenerator5 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createGenerator5, out);
-    return to_global_ref(_result);
+JniResult JsonFactory__createGenerator5(jobject self_, jobject out) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_JsonFactory, &_m_JsonFactory__createGenerator5, "createGenerator",
+      "(Ljava/io/DataOutput;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createGenerator5 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createGenerator5, out);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser = NULL;
+jmethodID _m_JsonFactory__createJsonParser = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonParser(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser, "createJsonParser", "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser, f);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonParser(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser,
+              "createJsonParser",
+              "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createJsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonParser, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser1 = NULL;
+jmethodID _m_JsonFactory__createJsonParser1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonParser1(jobject self_, jobject url) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser1, "createJsonParser", "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser1, url);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonParser1(jobject self_, jobject url) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser1,
+              "createJsonParser",
+              "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createJsonParser1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonParser1, url);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser2 = NULL;
+jmethodID _m_JsonFactory__createJsonParser2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonParser2(jobject self_, jobject in) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser2, "createJsonParser", "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser2, in);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonParser2(jobject self_, jobject in) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser2,
+              "createJsonParser",
+              "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createJsonParser2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonParser2, in);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser3 = NULL;
+jmethodID _m_JsonFactory__createJsonParser3 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonParser3(jobject self_, jobject r) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser3, "createJsonParser", "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser3 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser3, r);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonParser3(jobject self_, jobject r) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser3,
+              "createJsonParser",
+              "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createJsonParser3 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonParser3, r);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser4 = NULL;
+jmethodID _m_JsonFactory__createJsonParser4 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonParser4(jobject self_, jobject data) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser4, "createJsonParser", "(L[B;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser4 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser4, data);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonParser4(jobject self_, jobject data) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser4,
+              "createJsonParser",
+              "(L[B;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createJsonParser4 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonParser4, data);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser5 = NULL;
+jmethodID _m_JsonFactory__createJsonParser5 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonParser5(jobject self_, jobject data, int32_t offset, int32_t len) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser5, "createJsonParser", "(L[B;II)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser5 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser5, data, offset, len);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonParser5(jobject self_,
+                                         jobject data,
+                                         int32_t offset,
+                                         int32_t len) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser5,
+              "createJsonParser",
+              "(L[B;II)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createJsonParser5 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonParser5, data, offset, len);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser6 = NULL;
+jmethodID _m_JsonFactory__createJsonParser6 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonParser6(jobject self_, jobject content) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser6, "createJsonParser", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonParser6 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonParser6, content);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonParser6(jobject self_, jobject content) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonParser6,
+              "createJsonParser",
+              "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonFactory__createJsonParser6 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonParser6, content);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator = NULL;
+jmethodID _m_JsonFactory__createJsonGenerator = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonGenerator(jobject self_, jobject out, jobject enc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator, "createJsonGenerator", "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator, out, enc);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonGenerator(jobject self_,
+                                           jobject out,
+                                           jobject enc) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonGenerator,
+              "createJsonGenerator",
+              "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/"
+              "JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createJsonGenerator == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonGenerator, out, enc);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator1 = NULL;
+jmethodID _m_JsonFactory__createJsonGenerator1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonGenerator1(jobject self_, jobject out) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator1, "createJsonGenerator", "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator1, out);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonGenerator1(jobject self_, jobject out) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory, &_m_JsonFactory__createJsonGenerator1,
+              "createJsonGenerator",
+              "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createJsonGenerator1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonGenerator1, out);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator2 = NULL;
+jmethodID _m_JsonFactory__createJsonGenerator2 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory_createJsonGenerator2(jobject self_, jobject out) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory, &_m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator2, "createJsonGenerator", "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator2 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory_createJsonGenerator2, out);
-    return to_global_ref(_result);
+JniResult JsonFactory__createJsonGenerator2(jobject self_, jobject out) {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_JsonFactory, &_m_JsonFactory__createJsonGenerator2,
+      "createJsonGenerator",
+      "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;");
+  if (_m_JsonFactory__createJsonGenerator2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonFactory__createJsonGenerator2, out);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jfieldID _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_FACTORY_FEATURE_FLAGS = NULL;
+jfieldID _f_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_FACTORY_FEATURE_FLAGS() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (int32_t)0;
-    load_static_field(_c_com_fasterxml_jackson_core_JsonFactory, &_f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_FACTORY_FEATURE_FLAGS, "DEFAULT_FACTORY_FEATURE_FLAGS","I");
-    return ((*jniEnv)->GetStaticIntField(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_FACTORY_FEATURE_FLAGS));
+JniResult get_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS() {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_JsonFactory,
+                    &_f_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS,
+                    "DEFAULT_FACTORY_FEATURE_FLAGS", "I");
+  int32_t _result = (*jniEnv)->GetStaticIntField(
+      jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_PARSER_FEATURE_FLAGS = NULL;
+jfieldID _f_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_PARSER_FEATURE_FLAGS() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (int32_t)0;
-    load_static_field(_c_com_fasterxml_jackson_core_JsonFactory, &_f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_PARSER_FEATURE_FLAGS, "DEFAULT_PARSER_FEATURE_FLAGS","I");
-    return ((*jniEnv)->GetStaticIntField(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_PARSER_FEATURE_FLAGS));
+JniResult get_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS() {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_JsonFactory,
+                    &_f_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS,
+                    "DEFAULT_PARSER_FEATURE_FLAGS", "I");
+  int32_t _result = (*jniEnv)->GetStaticIntField(
+      jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_GENERATOR_FEATURE_FLAGS = NULL;
+jfieldID _f_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_GENERATOR_FEATURE_FLAGS() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (int32_t)0;
-    load_static_field(_c_com_fasterxml_jackson_core_JsonFactory, &_f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_GENERATOR_FEATURE_FLAGS, "DEFAULT_GENERATOR_FEATURE_FLAGS","I");
-    return ((*jniEnv)->GetStaticIntField(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_GENERATOR_FEATURE_FLAGS));
+JniResult get_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS() {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_JsonFactory,
+                    &_f_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS,
+                    "DEFAULT_GENERATOR_FEATURE_FLAGS", "I");
+  int32_t _result = (*jniEnv)->GetStaticIntField(
+      jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-
-jfieldID _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_ROOT_VALUE_SEPARATOR = NULL;
+jfieldID _f_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_com_fasterxml_jackson_core_JsonFactory_DEFAULT_ROOT_VALUE_SEPARATOR() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
-    if (_c_com_fasterxml_jackson_core_JsonFactory == NULL) return (jobject)0;
-    load_static_field(_c_com_fasterxml_jackson_core_JsonFactory, &_f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_ROOT_VALUE_SEPARATOR, "DEFAULT_ROOT_VALUE_SEPARATOR","Lcom/fasterxml/jackson/core/SerializableString;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory, _f_com_fasterxml_jackson_core_JsonFactory_DEFAULT_ROOT_VALUE_SEPARATOR));
+JniResult get_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR() {
+  load_env();
+  load_class_gr(&_c_JsonFactory, "com/fasterxml/jackson/core/JsonFactory");
+  if (_c_JsonFactory == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_JsonFactory,
+                    &_f_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR,
+                    "DEFAULT_ROOT_VALUE_SEPARATOR",
+                    "Lcom/fasterxml/jackson/core/SerializableString;");
+  jobject _result = to_global_ref((*jniEnv)->GetStaticObjectField(
+      jniEnv, _c_JsonFactory, _f_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
 // com.fasterxml.jackson.core.JsonFactory$Feature
-jclass _c_com_fasterxml_jackson_core_JsonFactory__Feature = NULL;
+jclass _c_JsonFactory_Feature = NULL;
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory__Feature_values = NULL;
+jmethodID _m_JsonFactory_Feature__values = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory__Feature_values() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory__Feature, "com/fasterxml/jackson/core/JsonFactory$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonFactory__Feature == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonFactory__Feature, &_m_com_fasterxml_jackson_core_JsonFactory__Feature_values, "values", "()L[com/fasterxml/jackson/core/JsonFactory$Feature;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory__Feature_values == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory__Feature, _m_com_fasterxml_jackson_core_JsonFactory__Feature_values);
-    return to_global_ref(_result);
+JniResult JsonFactory_Feature__values() {
+  load_env();
+  load_class_gr(&_c_JsonFactory_Feature,
+                "com/fasterxml/jackson/core/JsonFactory$Feature");
+  if (_c_JsonFactory_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__values,
+                     "values",
+                     "()L[com/fasterxml/jackson/core/JsonFactory$Feature;");
+  if (_m_JsonFactory_Feature__values == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_JsonFactory_Feature, _m_JsonFactory_Feature__values);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory__Feature_valueOf = NULL;
+jmethodID _m_JsonFactory_Feature__valueOf = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory__Feature_valueOf(jobject name) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory__Feature, "com/fasterxml/jackson/core/JsonFactory$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonFactory__Feature == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonFactory__Feature, &_m_com_fasterxml_jackson_core_JsonFactory__Feature_valueOf, "valueOf", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory$Feature;");
-    if (_m_com_fasterxml_jackson_core_JsonFactory__Feature_valueOf == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory__Feature, _m_com_fasterxml_jackson_core_JsonFactory__Feature_valueOf, name);
-    return to_global_ref(_result);
+JniResult JsonFactory_Feature__valueOf(jobject name) {
+  load_env();
+  load_class_gr(&_c_JsonFactory_Feature,
+                "com/fasterxml/jackson/core/JsonFactory$Feature");
+  if (_c_JsonFactory_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_JsonFactory_Feature, &_m_JsonFactory_Feature__valueOf, "valueOf",
+      "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory$Feature;");
+  if (_m_JsonFactory_Feature__valueOf == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_JsonFactory_Feature, _m_JsonFactory_Feature__valueOf, name);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory__Feature_collectDefaults = NULL;
+jmethodID _m_JsonFactory_Feature__collectDefaults = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonFactory__Feature_collectDefaults() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory__Feature, "com/fasterxml/jackson/core/JsonFactory$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonFactory__Feature == NULL) return (int32_t)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonFactory__Feature, &_m_com_fasterxml_jackson_core_JsonFactory__Feature_collectDefaults, "collectDefaults", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonFactory__Feature_collectDefaults == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallStaticIntMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory__Feature, _m_com_fasterxml_jackson_core_JsonFactory__Feature_collectDefaults);
-    return _result;
+JniResult JsonFactory_Feature__collectDefaults() {
+  load_env();
+  load_class_gr(&_c_JsonFactory_Feature,
+                "com/fasterxml/jackson/core/JsonFactory$Feature");
+  if (_c_JsonFactory_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_JsonFactory_Feature,
+                     &_m_JsonFactory_Feature__collectDefaults,
+                     "collectDefaults", "()I");
+  if (_m_JsonFactory_Feature__collectDefaults == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallStaticIntMethod(
+      jniEnv, _c_JsonFactory_Feature, _m_JsonFactory_Feature__collectDefaults);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory__Feature_ctor = NULL;
+jmethodID _m_JsonFactory_Feature__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonFactory__Feature_ctor(uint8_t defaultState) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory__Feature, "com/fasterxml/jackson/core/JsonFactory$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonFactory__Feature == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory__Feature, &_m_com_fasterxml_jackson_core_JsonFactory__Feature_ctor, "<init>", "(Z)V");
-    if (_m_com_fasterxml_jackson_core_JsonFactory__Feature_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonFactory__Feature, _m_com_fasterxml_jackson_core_JsonFactory__Feature_ctor, defaultState);
-    return to_global_ref(_result);
+JniResult JsonFactory_Feature__ctor(uint8_t defaultState) {
+  load_env();
+  load_class_gr(&_c_JsonFactory_Feature,
+                "com/fasterxml/jackson/core/JsonFactory$Feature");
+  if (_c_JsonFactory_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__ctor, "<init>",
+              "(Z)V");
+  if (_m_JsonFactory_Feature__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_JsonFactory_Feature,
+                           _m_JsonFactory_Feature__ctor, defaultState);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledByDefault = NULL;
+jmethodID _m_JsonFactory_Feature__enabledByDefault = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory__Feature_enabledByDefault(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory__Feature, "com/fasterxml/jackson/core/JsonFactory$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonFactory__Feature == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory__Feature, &_m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledByDefault, "enabledByDefault", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledByDefault == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledByDefault);
-    return _result;
+JniResult JsonFactory_Feature__enabledByDefault(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory_Feature,
+                "com/fasterxml/jackson/core/JsonFactory$Feature");
+  if (_c_JsonFactory_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__enabledByDefault,
+              "enabledByDefault", "()Z");
+  if (_m_JsonFactory_Feature__enabledByDefault == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonFactory_Feature__enabledByDefault);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledIn = NULL;
+jmethodID _m_JsonFactory_Feature__enabledIn = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonFactory__Feature_enabledIn(jobject self_, int32_t flags) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory__Feature, "com/fasterxml/jackson/core/JsonFactory$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonFactory__Feature == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory__Feature, &_m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledIn, "enabledIn", "(I)Z");
-    if (_m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledIn == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory__Feature_enabledIn, flags);
-    return _result;
+JniResult JsonFactory_Feature__enabledIn(jobject self_, int32_t flags) {
+  load_env();
+  load_class_gr(&_c_JsonFactory_Feature,
+                "com/fasterxml/jackson/core/JsonFactory$Feature");
+  if (_c_JsonFactory_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__enabledIn,
+              "enabledIn", "(I)Z");
+  if (_m_JsonFactory_Feature__enabledIn == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonFactory_Feature__enabledIn, flags);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonFactory__Feature_getMask = NULL;
+jmethodID _m_JsonFactory_Feature__getMask = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonFactory__Feature_getMask(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonFactory__Feature, "com/fasterxml/jackson/core/JsonFactory$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonFactory__Feature == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonFactory__Feature, &_m_com_fasterxml_jackson_core_JsonFactory__Feature_getMask, "getMask", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonFactory__Feature_getMask == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonFactory__Feature_getMask);
-    return _result;
+JniResult JsonFactory_Feature__getMask(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonFactory_Feature,
+                "com/fasterxml/jackson/core/JsonFactory$Feature");
+  if (_c_JsonFactory_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonFactory_Feature, &_m_JsonFactory_Feature__getMask,
+              "getMask", "()I");
+  if (_m_JsonFactory_Feature__getMask == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonFactory_Feature__getMask);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 // com.fasterxml.jackson.core.JsonParser
-jclass _c_com_fasterxml_jackson_core_JsonParser = NULL;
+jclass _c_JsonParser = NULL;
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_ctor = NULL;
+jmethodID _m_JsonParser__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_ctor() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_ctor, "<init>", "()V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonParser, _m_com_fasterxml_jackson_core_JsonParser_ctor);
-    return to_global_ref(_result);
+JniResult JsonParser__ctor() {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__ctor, "<init>", "()V");
+  if (_m_JsonParser__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_JsonParser, _m_JsonParser__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_ctor1 = NULL;
+jmethodID _m_JsonParser__ctor1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_ctor1(int32_t features) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_ctor1, "<init>", "(I)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_ctor1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonParser, _m_com_fasterxml_jackson_core_JsonParser_ctor1, features);
-    return to_global_ref(_result);
+JniResult JsonParser__ctor1(int32_t features) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__ctor1, "<init>", "(I)V");
+  if (_m_JsonParser__ctor1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_JsonParser,
+                                         _m_JsonParser__ctor1, features);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getCodec = NULL;
+jmethodID _m_JsonParser__getCodec = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getCodec(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getCodec, "getCodec", "()Lcom/fasterxml/jackson/core/ObjectCodec;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getCodec == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getCodec);
-    return to_global_ref(_result);
+JniResult JsonParser__getCodec(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getCodec, "getCodec",
+              "()Lcom/fasterxml/jackson/core/ObjectCodec;");
+  if (_m_JsonParser__getCodec == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getCodec);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_setCodec = NULL;
+jmethodID _m_JsonParser__setCodec = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_setCodec(jobject self_, jobject oc) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_setCodec, "setCodec", "(Lcom/fasterxml/jackson/core/ObjectCodec;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_setCodec == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_setCodec, oc);
+JniResult JsonParser__setCodec(jobject self_, jobject oc) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__setCodec, "setCodec",
+              "(Lcom/fasterxml/jackson/core/ObjectCodec;)V");
+  if (_m_JsonParser__setCodec == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__setCodec, oc);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getInputSource = NULL;
+jmethodID _m_JsonParser__getInputSource = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getInputSource(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getInputSource, "getInputSource", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getInputSource == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getInputSource);
-    return to_global_ref(_result);
+JniResult JsonParser__getInputSource(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getInputSource, "getInputSource",
+              "()Ljava/lang/Object;");
+  if (_m_JsonParser__getInputSource == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getInputSource);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError = NULL;
+jmethodID _m_JsonParser__setRequestPayloadOnError = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError(jobject self_, jobject payload) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError, "setRequestPayloadOnError", "(Lcom/fasterxml/jackson/core/util/RequestPayload;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError, payload);
+JniResult JsonParser__setRequestPayloadOnError(jobject self_, jobject payload) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__setRequestPayloadOnError,
+              "setRequestPayloadOnError",
+              "(Lcom/fasterxml/jackson/core/util/RequestPayload;)V");
+  if (_m_JsonParser__setRequestPayloadOnError == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_JsonParser__setRequestPayloadOnError, payload);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError1 = NULL;
+jmethodID _m_JsonParser__setRequestPayloadOnError1 = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError1(jobject self_, jobject payload, jobject charset) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError1, "setRequestPayloadOnError", "(L[B;Ljava/lang/String;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError1 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError1, payload, charset);
+JniResult JsonParser__setRequestPayloadOnError1(jobject self_,
+                                                jobject payload,
+                                                jobject charset) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__setRequestPayloadOnError1,
+              "setRequestPayloadOnError", "(L[B;Ljava/lang/String;)V");
+  if (_m_JsonParser__setRequestPayloadOnError1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_JsonParser__setRequestPayloadOnError1, payload,
+                            charset);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError2 = NULL;
+jmethodID _m_JsonParser__setRequestPayloadOnError2 = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError2(jobject self_, jobject payload) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError2, "setRequestPayloadOnError", "(Ljava/lang/String;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError2 == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_setRequestPayloadOnError2, payload);
+JniResult JsonParser__setRequestPayloadOnError2(jobject self_,
+                                                jobject payload) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__setRequestPayloadOnError2,
+              "setRequestPayloadOnError", "(Ljava/lang/String;)V");
+  if (_m_JsonParser__setRequestPayloadOnError2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_,
+                            _m_JsonParser__setRequestPayloadOnError2, payload);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_setSchema = NULL;
+jmethodID _m_JsonParser__setSchema = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_setSchema(jobject self_, jobject schema) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_setSchema, "setSchema", "(Lcom/fasterxml/jackson/core/FormatSchema;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_setSchema == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_setSchema, schema);
+JniResult JsonParser__setSchema(jobject self_, jobject schema) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__setSchema, "setSchema",
+              "(Lcom/fasterxml/jackson/core/FormatSchema;)V");
+  if (_m_JsonParser__setSchema == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__setSchema, schema);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getSchema = NULL;
+jmethodID _m_JsonParser__getSchema = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getSchema(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getSchema, "getSchema", "()Lcom/fasterxml/jackson/core/FormatSchema;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getSchema == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getSchema);
-    return to_global_ref(_result);
+JniResult JsonParser__getSchema(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getSchema, "getSchema",
+              "()Lcom/fasterxml/jackson/core/FormatSchema;");
+  if (_m_JsonParser__getSchema == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getSchema);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_canUseSchema = NULL;
+jmethodID _m_JsonParser__canUseSchema = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_canUseSchema(jobject self_, jobject schema) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_canUseSchema, "canUseSchema", "(Lcom/fasterxml/jackson/core/FormatSchema;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_canUseSchema == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_canUseSchema, schema);
-    return _result;
+JniResult JsonParser__canUseSchema(jobject self_, jobject schema) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__canUseSchema, "canUseSchema",
+              "(Lcom/fasterxml/jackson/core/FormatSchema;)Z");
+  if (_m_JsonParser__canUseSchema == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__canUseSchema, schema);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_requiresCustomCodec = NULL;
+jmethodID _m_JsonParser__requiresCustomCodec = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_requiresCustomCodec(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_requiresCustomCodec, "requiresCustomCodec", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_requiresCustomCodec == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_requiresCustomCodec);
-    return _result;
+JniResult JsonParser__requiresCustomCodec(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__requiresCustomCodec,
+              "requiresCustomCodec", "()Z");
+  if (_m_JsonParser__requiresCustomCodec == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__requiresCustomCodec);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_canParseAsync = NULL;
+jmethodID _m_JsonParser__canParseAsync = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_canParseAsync(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_canParseAsync, "canParseAsync", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_canParseAsync == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_canParseAsync);
-    return _result;
+JniResult JsonParser__canParseAsync(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__canParseAsync, "canParseAsync",
+              "()Z");
+  if (_m_JsonParser__canParseAsync == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__canParseAsync);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getNonBlockingInputFeeder = NULL;
+jmethodID _m_JsonParser__getNonBlockingInputFeeder = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getNonBlockingInputFeeder(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getNonBlockingInputFeeder, "getNonBlockingInputFeeder", "()Lcom/fasterxml/jackson/core/async/NonBlockingInputFeeder;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getNonBlockingInputFeeder == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getNonBlockingInputFeeder);
-    return to_global_ref(_result);
+JniResult JsonParser__getNonBlockingInputFeeder(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getNonBlockingInputFeeder,
+              "getNonBlockingInputFeeder",
+              "()Lcom/fasterxml/jackson/core/async/NonBlockingInputFeeder;");
+  if (_m_JsonParser__getNonBlockingInputFeeder == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getNonBlockingInputFeeder);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getReadCapabilities = NULL;
+jmethodID _m_JsonParser__getReadCapabilities = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getReadCapabilities(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getReadCapabilities, "getReadCapabilities", "()Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getReadCapabilities == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getReadCapabilities);
-    return to_global_ref(_result);
+JniResult JsonParser__getReadCapabilities(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getReadCapabilities,
+              "getReadCapabilities",
+              "()Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;");
+  if (_m_JsonParser__getReadCapabilities == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getReadCapabilities);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_version = NULL;
+jmethodID _m_JsonParser__version = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_version(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_version, "version", "()Lcom/fasterxml/jackson/core/Version;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_version == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_version);
-    return to_global_ref(_result);
+JniResult JsonParser__version(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__version, "version",
+              "()Lcom/fasterxml/jackson/core/Version;");
+  if (_m_JsonParser__version == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__version);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_close = NULL;
+jmethodID _m_JsonParser__close = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_close(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_close, "close", "()V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_close == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_close);
+JniResult JsonParser__close(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__close, "close", "()V");
+  if (_m_JsonParser__close == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__close);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_isClosed = NULL;
+jmethodID _m_JsonParser__isClosed = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_isClosed(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_isClosed, "isClosed", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_isClosed == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_isClosed);
-    return _result;
+JniResult JsonParser__isClosed(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__isClosed, "isClosed", "()Z");
+  if (_m_JsonParser__isClosed == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isClosed);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getParsingContext = NULL;
+jmethodID _m_JsonParser__getParsingContext = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getParsingContext(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getParsingContext, "getParsingContext", "()Lcom/fasterxml/jackson/core/JsonStreamContext;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getParsingContext == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getParsingContext);
-    return to_global_ref(_result);
+JniResult JsonParser__getParsingContext(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getParsingContext,
+              "getParsingContext",
+              "()Lcom/fasterxml/jackson/core/JsonStreamContext;");
+  if (_m_JsonParser__getParsingContext == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getParsingContext);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_currentLocation = NULL;
+jmethodID _m_JsonParser__currentLocation = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_currentLocation(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_currentLocation, "currentLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_currentLocation == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_currentLocation);
-    return to_global_ref(_result);
+JniResult JsonParser__currentLocation(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__currentLocation, "currentLocation",
+              "()Lcom/fasterxml/jackson/core/JsonLocation;");
+  if (_m_JsonParser__currentLocation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_JsonParser__currentLocation);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_currentTokenLocation = NULL;
+jmethodID _m_JsonParser__currentTokenLocation = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_currentTokenLocation(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_currentTokenLocation, "currentTokenLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_currentTokenLocation == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_currentTokenLocation);
-    return to_global_ref(_result);
+JniResult JsonParser__currentTokenLocation(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__currentTokenLocation,
+              "currentTokenLocation",
+              "()Lcom/fasterxml/jackson/core/JsonLocation;");
+  if (_m_JsonParser__currentTokenLocation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__currentTokenLocation);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getCurrentLocation = NULL;
+jmethodID _m_JsonParser__getCurrentLocation = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getCurrentLocation(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getCurrentLocation, "getCurrentLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getCurrentLocation == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getCurrentLocation);
-    return to_global_ref(_result);
+JniResult JsonParser__getCurrentLocation(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getCurrentLocation,
+              "getCurrentLocation",
+              "()Lcom/fasterxml/jackson/core/JsonLocation;");
+  if (_m_JsonParser__getCurrentLocation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getCurrentLocation);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getTokenLocation = NULL;
+jmethodID _m_JsonParser__getTokenLocation = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getTokenLocation(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getTokenLocation, "getTokenLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getTokenLocation == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getTokenLocation);
-    return to_global_ref(_result);
+JniResult JsonParser__getTokenLocation(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getTokenLocation,
+              "getTokenLocation",
+              "()Lcom/fasterxml/jackson/core/JsonLocation;");
+  if (_m_JsonParser__getTokenLocation == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getTokenLocation);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_currentValue = NULL;
+jmethodID _m_JsonParser__currentValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_currentValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_currentValue, "currentValue", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_currentValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_currentValue);
-    return to_global_ref(_result);
+JniResult JsonParser__currentValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__currentValue, "currentValue",
+              "()Ljava/lang/Object;");
+  if (_m_JsonParser__currentValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__currentValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_assignCurrentValue = NULL;
+jmethodID _m_JsonParser__assignCurrentValue = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_assignCurrentValue(jobject self_, jobject v) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_assignCurrentValue, "assignCurrentValue", "(Ljava/lang/Object;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_assignCurrentValue == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_assignCurrentValue, v);
+JniResult JsonParser__assignCurrentValue(jobject self_, jobject v) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__assignCurrentValue,
+              "assignCurrentValue", "(Ljava/lang/Object;)V");
+  if (_m_JsonParser__assignCurrentValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__assignCurrentValue,
+                            v);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getCurrentValue = NULL;
+jmethodID _m_JsonParser__getCurrentValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getCurrentValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getCurrentValue, "getCurrentValue", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getCurrentValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getCurrentValue);
-    return to_global_ref(_result);
+JniResult JsonParser__getCurrentValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getCurrentValue, "getCurrentValue",
+              "()Ljava/lang/Object;");
+  if (_m_JsonParser__getCurrentValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_JsonParser__getCurrentValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_setCurrentValue = NULL;
+jmethodID _m_JsonParser__setCurrentValue = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_setCurrentValue(jobject self_, jobject v) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_setCurrentValue, "setCurrentValue", "(Ljava/lang/Object;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_setCurrentValue == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_setCurrentValue, v);
+JniResult JsonParser__setCurrentValue(jobject self_, jobject v) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__setCurrentValue, "setCurrentValue",
+              "(Ljava/lang/Object;)V");
+  if (_m_JsonParser__setCurrentValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__setCurrentValue, v);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_releaseBuffered = NULL;
+jmethodID _m_JsonParser__releaseBuffered = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_releaseBuffered(jobject self_, jobject out) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_releaseBuffered, "releaseBuffered", "(Ljava/io/OutputStream;)I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_releaseBuffered == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_releaseBuffered, out);
-    return _result;
+JniResult JsonParser__releaseBuffered(jobject self_, jobject out) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__releaseBuffered, "releaseBuffered",
+              "(Ljava/io/OutputStream;)I");
+  if (_m_JsonParser__releaseBuffered == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonParser__releaseBuffered, out);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_releaseBuffered1 = NULL;
+jmethodID _m_JsonParser__releaseBuffered1 = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_releaseBuffered1(jobject self_, jobject w) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_releaseBuffered1, "releaseBuffered", "(Ljava/io/Writer;)I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_releaseBuffered1 == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_releaseBuffered1, w);
-    return _result;
+JniResult JsonParser__releaseBuffered1(jobject self_, jobject w) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__releaseBuffered1,
+              "releaseBuffered", "(Ljava/io/Writer;)I");
+  if (_m_JsonParser__releaseBuffered1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonParser__releaseBuffered1, w);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_enable = NULL;
+jmethodID _m_JsonParser__enable = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_enable(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_enable, "enable", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_enable == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_enable, f);
-    return to_global_ref(_result);
+JniResult JsonParser__enable(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__enable, "enable",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/"
+              "jackson/core/JsonParser;");
+  if (_m_JsonParser__enable == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__enable, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_disable = NULL;
+jmethodID _m_JsonParser__disable = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_disable(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_disable, "disable", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_disable == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_disable, f);
-    return to_global_ref(_result);
+JniResult JsonParser__disable(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__disable, "disable",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Lcom/fasterxml/"
+              "jackson/core/JsonParser;");
+  if (_m_JsonParser__disable == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__disable, f);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_configure = NULL;
+jmethodID _m_JsonParser__configure = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_configure(jobject self_, jobject f, uint8_t state) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_configure, "configure", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_configure == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_configure, f, state);
-    return to_global_ref(_result);
+JniResult JsonParser__configure(jobject self_, jobject f, uint8_t state) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__configure, "configure",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;Z)Lcom/"
+              "fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonParser__configure == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__configure, f, state);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_isEnabled = NULL;
+jmethodID _m_JsonParser__isEnabled = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_isEnabled(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_isEnabled, "isEnabled", "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_isEnabled == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_isEnabled, f);
-    return _result;
+JniResult JsonParser__isEnabled(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__isEnabled, "isEnabled",
+              "(Lcom/fasterxml/jackson/core/JsonParser$Feature;)Z");
+  if (_m_JsonParser__isEnabled == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isEnabled, f);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_isEnabled1 = NULL;
+jmethodID _m_JsonParser__isEnabled1 = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_isEnabled1(jobject self_, jobject f) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_isEnabled1, "isEnabled", "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_isEnabled1 == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_isEnabled1, f);
-    return _result;
+JniResult JsonParser__isEnabled1(jobject self_, jobject f) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__isEnabled1, "isEnabled",
+              "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z");
+  if (_m_JsonParser__isEnabled1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isEnabled1, f);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getFeatureMask = NULL;
+jmethodID _m_JsonParser__getFeatureMask = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getFeatureMask(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getFeatureMask, "getFeatureMask", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getFeatureMask == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getFeatureMask);
-    return _result;
+JniResult JsonParser__getFeatureMask(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getFeatureMask, "getFeatureMask",
+              "()I");
+  if (_m_JsonParser__getFeatureMask == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getFeatureMask);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_setFeatureMask = NULL;
+jmethodID _m_JsonParser__setFeatureMask = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_setFeatureMask(jobject self_, int32_t mask) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_setFeatureMask, "setFeatureMask", "(I)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_setFeatureMask == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_setFeatureMask, mask);
-    return to_global_ref(_result);
+JniResult JsonParser__setFeatureMask(jobject self_, int32_t mask) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__setFeatureMask, "setFeatureMask",
+              "(I)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonParser__setFeatureMask == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__setFeatureMask, mask);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_overrideStdFeatures = NULL;
+jmethodID _m_JsonParser__overrideStdFeatures = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_overrideStdFeatures(jobject self_, int32_t values, int32_t mask) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_overrideStdFeatures, "overrideStdFeatures", "(II)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_overrideStdFeatures == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_overrideStdFeatures, values, mask);
-    return to_global_ref(_result);
+JniResult JsonParser__overrideStdFeatures(jobject self_,
+                                          int32_t values,
+                                          int32_t mask) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__overrideStdFeatures,
+              "overrideStdFeatures",
+              "(II)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonParser__overrideStdFeatures == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__overrideStdFeatures, values, mask);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getFormatFeatures = NULL;
+jmethodID _m_JsonParser__getFormatFeatures = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getFormatFeatures(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getFormatFeatures, "getFormatFeatures", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getFormatFeatures == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getFormatFeatures);
-    return _result;
+JniResult JsonParser__getFormatFeatures(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getFormatFeatures,
+              "getFormatFeatures", "()I");
+  if (_m_JsonParser__getFormatFeatures == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getFormatFeatures);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_overrideFormatFeatures = NULL;
+jmethodID _m_JsonParser__overrideFormatFeatures = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_overrideFormatFeatures(jobject self_, int32_t values, int32_t mask) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_overrideFormatFeatures, "overrideFormatFeatures", "(II)Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_overrideFormatFeatures == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_overrideFormatFeatures, values, mask);
-    return to_global_ref(_result);
+JniResult JsonParser__overrideFormatFeatures(jobject self_,
+                                             int32_t values,
+                                             int32_t mask) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__overrideFormatFeatures,
+              "overrideFormatFeatures",
+              "(II)Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonParser__overrideFormatFeatures == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__overrideFormatFeatures, values, mask);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextToken = NULL;
+jmethodID _m_JsonParser__nextToken = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_nextToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextToken, "nextToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextToken == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextToken);
-    return to_global_ref(_result);
+JniResult JsonParser__nextToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextToken, "nextToken",
+              "()Lcom/fasterxml/jackson/core/JsonToken;");
+  if (_m_JsonParser__nextToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextToken);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextValue = NULL;
+jmethodID _m_JsonParser__nextValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_nextValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextValue, "nextValue", "()Lcom/fasterxml/jackson/core/JsonToken;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextValue);
-    return to_global_ref(_result);
+JniResult JsonParser__nextValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextValue, "nextValue",
+              "()Lcom/fasterxml/jackson/core/JsonToken;");
+  if (_m_JsonParser__nextValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextFieldName = NULL;
+jmethodID _m_JsonParser__nextFieldName = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_nextFieldName(jobject self_, jobject str) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextFieldName, "nextFieldName", "(Lcom/fasterxml/jackson/core/SerializableString;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextFieldName == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextFieldName, str);
-    return _result;
+JniResult JsonParser__nextFieldName(jobject self_, jobject str) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextFieldName, "nextFieldName",
+              "(Lcom/fasterxml/jackson/core/SerializableString;)Z");
+  if (_m_JsonParser__nextFieldName == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__nextFieldName, str);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextFieldName1 = NULL;
+jmethodID _m_JsonParser__nextFieldName1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_nextFieldName1(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextFieldName1, "nextFieldName", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextFieldName1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextFieldName1);
-    return to_global_ref(_result);
+JniResult JsonParser__nextFieldName1(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextFieldName1, "nextFieldName",
+              "()Ljava/lang/String;");
+  if (_m_JsonParser__nextFieldName1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextFieldName1);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextTextValue = NULL;
+jmethodID _m_JsonParser__nextTextValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_nextTextValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextTextValue, "nextTextValue", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextTextValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextTextValue);
-    return to_global_ref(_result);
+JniResult JsonParser__nextTextValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextTextValue, "nextTextValue",
+              "()Ljava/lang/String;");
+  if (_m_JsonParser__nextTextValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__nextTextValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextIntValue = NULL;
+jmethodID _m_JsonParser__nextIntValue = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_nextIntValue(jobject self_, int32_t defaultValue) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextIntValue, "nextIntValue", "(I)I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextIntValue == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextIntValue, defaultValue);
-    return _result;
+JniResult JsonParser__nextIntValue(jobject self_, int32_t defaultValue) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextIntValue, "nextIntValue",
+              "(I)I");
+  if (_m_JsonParser__nextIntValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonParser__nextIntValue, defaultValue);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextLongValue = NULL;
+jmethodID _m_JsonParser__nextLongValue = NULL;
 FFI_PLUGIN_EXPORT
-int64_t com_fasterxml_jackson_core_JsonParser_nextLongValue(jobject self_, int64_t defaultValue) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int64_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextLongValue, "nextLongValue", "(J)J");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextLongValue == NULL) return (int64_t)0;
-    int64_t _result = (*jniEnv)->CallLongMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextLongValue, defaultValue);
-    return _result;
+JniResult JsonParser__nextLongValue(jobject self_, int64_t defaultValue) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextLongValue, "nextLongValue",
+              "(J)J");
+  if (_m_JsonParser__nextLongValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int64_t _result = (*jniEnv)->CallLongMethod(
+      jniEnv, self_, _m_JsonParser__nextLongValue, defaultValue);
+  return (JniResult){.result = {.j = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_nextBooleanValue = NULL;
+jmethodID _m_JsonParser__nextBooleanValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_nextBooleanValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_nextBooleanValue, "nextBooleanValue", "()Ljava/lang/Boolean;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_nextBooleanValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_nextBooleanValue);
-    return to_global_ref(_result);
+JniResult JsonParser__nextBooleanValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__nextBooleanValue,
+              "nextBooleanValue", "()Ljava/lang/Boolean;");
+  if (_m_JsonParser__nextBooleanValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__nextBooleanValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_skipChildren = NULL;
+jmethodID _m_JsonParser__skipChildren = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_skipChildren(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_skipChildren, "skipChildren", "()Lcom/fasterxml/jackson/core/JsonParser;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_skipChildren == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_skipChildren);
-    return to_global_ref(_result);
+JniResult JsonParser__skipChildren(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__skipChildren, "skipChildren",
+              "()Lcom/fasterxml/jackson/core/JsonParser;");
+  if (_m_JsonParser__skipChildren == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__skipChildren);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_finishToken = NULL;
+jmethodID _m_JsonParser__finishToken = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_finishToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_finishToken, "finishToken", "()V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_finishToken == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_finishToken);
+JniResult JsonParser__finishToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__finishToken, "finishToken", "()V");
+  if (_m_JsonParser__finishToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__finishToken);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_currentToken = NULL;
+jmethodID _m_JsonParser__currentToken = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_currentToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_currentToken, "currentToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_currentToken == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_currentToken);
-    return to_global_ref(_result);
+JniResult JsonParser__currentToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__currentToken, "currentToken",
+              "()Lcom/fasterxml/jackson/core/JsonToken;");
+  if (_m_JsonParser__currentToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__currentToken);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_currentTokenId = NULL;
+jmethodID _m_JsonParser__currentTokenId = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_currentTokenId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_currentTokenId, "currentTokenId", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_currentTokenId == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_currentTokenId);
-    return _result;
+JniResult JsonParser__currentTokenId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__currentTokenId, "currentTokenId",
+              "()I");
+  if (_m_JsonParser__currentTokenId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__currentTokenId);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getCurrentToken = NULL;
+jmethodID _m_JsonParser__getCurrentToken = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getCurrentToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getCurrentToken, "getCurrentToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getCurrentToken == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getCurrentToken);
-    return to_global_ref(_result);
+JniResult JsonParser__getCurrentToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getCurrentToken, "getCurrentToken",
+              "()Lcom/fasterxml/jackson/core/JsonToken;");
+  if (_m_JsonParser__getCurrentToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_JsonParser__getCurrentToken);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getCurrentTokenId = NULL;
+jmethodID _m_JsonParser__getCurrentTokenId = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getCurrentTokenId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getCurrentTokenId, "getCurrentTokenId", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getCurrentTokenId == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getCurrentTokenId);
-    return _result;
+JniResult JsonParser__getCurrentTokenId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getCurrentTokenId,
+              "getCurrentTokenId", "()I");
+  if (_m_JsonParser__getCurrentTokenId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getCurrentTokenId);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_hasCurrentToken = NULL;
+jmethodID _m_JsonParser__hasCurrentToken = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_hasCurrentToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_hasCurrentToken, "hasCurrentToken", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_hasCurrentToken == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_hasCurrentToken);
-    return _result;
+JniResult JsonParser__hasCurrentToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__hasCurrentToken, "hasCurrentToken",
+              "()Z");
+  if (_m_JsonParser__hasCurrentToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__hasCurrentToken);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_hasTokenId = NULL;
+jmethodID _m_JsonParser__hasTokenId = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_hasTokenId(jobject self_, int32_t id) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_hasTokenId, "hasTokenId", "(I)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_hasTokenId == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_hasTokenId, id);
-    return _result;
+JniResult JsonParser__hasTokenId(jobject self_, int32_t id) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__hasTokenId, "hasTokenId", "(I)Z");
+  if (_m_JsonParser__hasTokenId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_,
+                                                 _m_JsonParser__hasTokenId, id);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_hasToken = NULL;
+jmethodID _m_JsonParser__hasToken = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_hasToken(jobject self_, jobject t) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_hasToken, "hasToken", "(Lcom/fasterxml/jackson/core/JsonToken;)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_hasToken == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_hasToken, t);
-    return _result;
+JniResult JsonParser__hasToken(jobject self_, jobject t) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__hasToken, "hasToken",
+              "(Lcom/fasterxml/jackson/core/JsonToken;)Z");
+  if (_m_JsonParser__hasToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__hasToken, t);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_isExpectedStartArrayToken = NULL;
+jmethodID _m_JsonParser__isExpectedStartArrayToken = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_isExpectedStartArrayToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_isExpectedStartArrayToken, "isExpectedStartArrayToken", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_isExpectedStartArrayToken == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_isExpectedStartArrayToken);
-    return _result;
+JniResult JsonParser__isExpectedStartArrayToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__isExpectedStartArrayToken,
+              "isExpectedStartArrayToken", "()Z");
+  if (_m_JsonParser__isExpectedStartArrayToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__isExpectedStartArrayToken);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_isExpectedStartObjectToken = NULL;
+jmethodID _m_JsonParser__isExpectedStartObjectToken = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_isExpectedStartObjectToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_isExpectedStartObjectToken, "isExpectedStartObjectToken", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_isExpectedStartObjectToken == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_isExpectedStartObjectToken);
-    return _result;
+JniResult JsonParser__isExpectedStartObjectToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__isExpectedStartObjectToken,
+              "isExpectedStartObjectToken", "()Z");
+  if (_m_JsonParser__isExpectedStartObjectToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__isExpectedStartObjectToken);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_isExpectedNumberIntToken = NULL;
+jmethodID _m_JsonParser__isExpectedNumberIntToken = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_isExpectedNumberIntToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_isExpectedNumberIntToken, "isExpectedNumberIntToken", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_isExpectedNumberIntToken == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_isExpectedNumberIntToken);
-    return _result;
+JniResult JsonParser__isExpectedNumberIntToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__isExpectedNumberIntToken,
+              "isExpectedNumberIntToken", "()Z");
+  if (_m_JsonParser__isExpectedNumberIntToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__isExpectedNumberIntToken);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_isNaN = NULL;
+jmethodID _m_JsonParser__isNaN = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_isNaN(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_isNaN, "isNaN", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_isNaN == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_isNaN);
-    return _result;
+JniResult JsonParser__isNaN(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__isNaN, "isNaN", "()Z");
+  if (_m_JsonParser__isNaN == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__isNaN);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_clearCurrentToken = NULL;
+jmethodID _m_JsonParser__clearCurrentToken = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_clearCurrentToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_clearCurrentToken, "clearCurrentToken", "()V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_clearCurrentToken == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_clearCurrentToken);
+JniResult JsonParser__clearCurrentToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__clearCurrentToken,
+              "clearCurrentToken", "()V");
+  if (_m_JsonParser__clearCurrentToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__clearCurrentToken);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getLastClearedToken = NULL;
+jmethodID _m_JsonParser__getLastClearedToken = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getLastClearedToken(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getLastClearedToken, "getLastClearedToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getLastClearedToken == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getLastClearedToken);
-    return to_global_ref(_result);
+JniResult JsonParser__getLastClearedToken(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getLastClearedToken,
+              "getLastClearedToken",
+              "()Lcom/fasterxml/jackson/core/JsonToken;");
+  if (_m_JsonParser__getLastClearedToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getLastClearedToken);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_overrideCurrentName = NULL;
+jmethodID _m_JsonParser__overrideCurrentName = NULL;
 FFI_PLUGIN_EXPORT
-void com_fasterxml_jackson_core_JsonParser_overrideCurrentName(jobject self_, jobject name) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (void)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_overrideCurrentName, "overrideCurrentName", "(Ljava/lang/String;)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser_overrideCurrentName == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_overrideCurrentName, name);
+JniResult JsonParser__overrideCurrentName(jobject self_, jobject name) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__overrideCurrentName,
+              "overrideCurrentName", "(Ljava/lang/String;)V");
+  if (_m_JsonParser__overrideCurrentName == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_JsonParser__overrideCurrentName,
+                            name);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getCurrentName = NULL;
+jmethodID _m_JsonParser__getCurrentName = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getCurrentName(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getCurrentName, "getCurrentName", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getCurrentName == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getCurrentName);
-    return to_global_ref(_result);
+JniResult JsonParser__getCurrentName(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getCurrentName, "getCurrentName",
+              "()Ljava/lang/String;");
+  if (_m_JsonParser__getCurrentName == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getCurrentName);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_currentName = NULL;
+jmethodID _m_JsonParser__currentName = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_currentName(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_currentName, "currentName", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_currentName == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_currentName);
-    return to_global_ref(_result);
+JniResult JsonParser__currentName(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__currentName, "currentName",
+              "()Ljava/lang/String;");
+  if (_m_JsonParser__currentName == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__currentName);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getText = NULL;
+jmethodID _m_JsonParser__getText = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getText(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getText, "getText", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getText == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getText);
-    return to_global_ref(_result);
+JniResult JsonParser__getText(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getText, "getText",
+              "()Ljava/lang/String;");
+  if (_m_JsonParser__getText == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getText);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getText1 = NULL;
+jmethodID _m_JsonParser__getText1 = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getText1(jobject self_, jobject writer) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getText1, "getText", "(Ljava/io/Writer;)I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getText1 == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getText1, writer);
-    return _result;
+JniResult JsonParser__getText1(jobject self_, jobject writer) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getText1, "getText",
+              "(Ljava/io/Writer;)I");
+  if (_m_JsonParser__getText1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getText1, writer);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getTextCharacters = NULL;
+jmethodID _m_JsonParser__getTextCharacters = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getTextCharacters(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getTextCharacters, "getTextCharacters", "()L[C;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getTextCharacters == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getTextCharacters);
-    return to_global_ref(_result);
+JniResult JsonParser__getTextCharacters(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getTextCharacters,
+              "getTextCharacters", "()L[C;");
+  if (_m_JsonParser__getTextCharacters == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getTextCharacters);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getTextLength = NULL;
+jmethodID _m_JsonParser__getTextLength = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getTextLength(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getTextLength, "getTextLength", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getTextLength == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getTextLength);
-    return _result;
+JniResult JsonParser__getTextLength(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getTextLength, "getTextLength",
+              "()I");
+  if (_m_JsonParser__getTextLength == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getTextLength);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getTextOffset = NULL;
+jmethodID _m_JsonParser__getTextOffset = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getTextOffset(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getTextOffset, "getTextOffset", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getTextOffset == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getTextOffset);
-    return _result;
+JniResult JsonParser__getTextOffset(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getTextOffset, "getTextOffset",
+              "()I");
+  if (_m_JsonParser__getTextOffset == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getTextOffset);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_hasTextCharacters = NULL;
+jmethodID _m_JsonParser__hasTextCharacters = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_hasTextCharacters(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_hasTextCharacters, "hasTextCharacters", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_hasTextCharacters == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_hasTextCharacters);
-    return _result;
+JniResult JsonParser__hasTextCharacters(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__hasTextCharacters,
+              "hasTextCharacters", "()Z");
+  if (_m_JsonParser__hasTextCharacters == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__hasTextCharacters);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getNumberValue = NULL;
+jmethodID _m_JsonParser__getNumberValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getNumberValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getNumberValue, "getNumberValue", "()Ljava/lang/Number;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getNumberValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getNumberValue);
-    return to_global_ref(_result);
+JniResult JsonParser__getNumberValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getNumberValue, "getNumberValue",
+              "()Ljava/lang/Number;");
+  if (_m_JsonParser__getNumberValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getNumberValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getNumberValueExact = NULL;
+jmethodID _m_JsonParser__getNumberValueExact = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getNumberValueExact(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getNumberValueExact, "getNumberValueExact", "()Ljava/lang/Number;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getNumberValueExact == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getNumberValueExact);
-    return to_global_ref(_result);
+JniResult JsonParser__getNumberValueExact(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getNumberValueExact,
+              "getNumberValueExact", "()Ljava/lang/Number;");
+  if (_m_JsonParser__getNumberValueExact == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getNumberValueExact);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getNumberType = NULL;
+jmethodID _m_JsonParser__getNumberType = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getNumberType(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getNumberType, "getNumberType", "()Lcom/fasterxml/jackson/core/JsonParser$NumberType;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getNumberType == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getNumberType);
-    return to_global_ref(_result);
+JniResult JsonParser__getNumberType(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getNumberType, "getNumberType",
+              "()Lcom/fasterxml/jackson/core/JsonParser$NumberType;");
+  if (_m_JsonParser__getNumberType == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getNumberType);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getByteValue = NULL;
+jmethodID _m_JsonParser__getByteValue = NULL;
 FFI_PLUGIN_EXPORT
-int8_t com_fasterxml_jackson_core_JsonParser_getByteValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getByteValue, "getByteValue", "()B");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getByteValue == NULL) return (int8_t)0;
-    int8_t _result = (*jniEnv)->CallByteMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getByteValue);
-    return _result;
+JniResult JsonParser__getByteValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getByteValue, "getByteValue",
+              "()B");
+  if (_m_JsonParser__getByteValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int8_t _result =
+      (*jniEnv)->CallByteMethod(jniEnv, self_, _m_JsonParser__getByteValue);
+  return (JniResult){.result = {.b = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getShortValue = NULL;
+jmethodID _m_JsonParser__getShortValue = NULL;
 FFI_PLUGIN_EXPORT
-int16_t com_fasterxml_jackson_core_JsonParser_getShortValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int16_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getShortValue, "getShortValue", "()S");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getShortValue == NULL) return (int16_t)0;
-    int16_t _result = (*jniEnv)->CallShortMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getShortValue);
-    return _result;
+JniResult JsonParser__getShortValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getShortValue, "getShortValue",
+              "()S");
+  if (_m_JsonParser__getShortValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int16_t _result =
+      (*jniEnv)->CallShortMethod(jniEnv, self_, _m_JsonParser__getShortValue);
+  return (JniResult){.result = {.s = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getIntValue = NULL;
+jmethodID _m_JsonParser__getIntValue = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getIntValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getIntValue, "getIntValue", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getIntValue == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getIntValue);
-    return _result;
+JniResult JsonParser__getIntValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getIntValue, "getIntValue", "()I");
+  if (_m_JsonParser__getIntValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getIntValue);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getLongValue = NULL;
+jmethodID _m_JsonParser__getLongValue = NULL;
 FFI_PLUGIN_EXPORT
-int64_t com_fasterxml_jackson_core_JsonParser_getLongValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int64_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getLongValue, "getLongValue", "()J");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getLongValue == NULL) return (int64_t)0;
-    int64_t _result = (*jniEnv)->CallLongMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getLongValue);
-    return _result;
+JniResult JsonParser__getLongValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getLongValue, "getLongValue",
+              "()J");
+  if (_m_JsonParser__getLongValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int64_t _result =
+      (*jniEnv)->CallLongMethod(jniEnv, self_, _m_JsonParser__getLongValue);
+  return (JniResult){.result = {.j = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getBigIntegerValue = NULL;
+jmethodID _m_JsonParser__getBigIntegerValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getBigIntegerValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getBigIntegerValue, "getBigIntegerValue", "()Ljava/math/BigInteger;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getBigIntegerValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getBigIntegerValue);
-    return to_global_ref(_result);
+JniResult JsonParser__getBigIntegerValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getBigIntegerValue,
+              "getBigIntegerValue", "()Ljava/math/BigInteger;");
+  if (_m_JsonParser__getBigIntegerValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getBigIntegerValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getFloatValue = NULL;
+jmethodID _m_JsonParser__getFloatValue = NULL;
 FFI_PLUGIN_EXPORT
-float com_fasterxml_jackson_core_JsonParser_getFloatValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (float)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getFloatValue, "getFloatValue", "()F");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getFloatValue == NULL) return (float)0;
-    float _result = (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getFloatValue);
-    return _result;
+JniResult JsonParser__getFloatValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getFloatValue, "getFloatValue",
+              "()F");
+  if (_m_JsonParser__getFloatValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  float _result =
+      (*jniEnv)->CallFloatMethod(jniEnv, self_, _m_JsonParser__getFloatValue);
+  return (JniResult){.result = {.f = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getDoubleValue = NULL;
+jmethodID _m_JsonParser__getDoubleValue = NULL;
 FFI_PLUGIN_EXPORT
-double com_fasterxml_jackson_core_JsonParser_getDoubleValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (double)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getDoubleValue, "getDoubleValue", "()D");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getDoubleValue == NULL) return (double)0;
-    double _result = (*jniEnv)->CallDoubleMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getDoubleValue);
-    return _result;
+JniResult JsonParser__getDoubleValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getDoubleValue, "getDoubleValue",
+              "()D");
+  if (_m_JsonParser__getDoubleValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  double _result =
+      (*jniEnv)->CallDoubleMethod(jniEnv, self_, _m_JsonParser__getDoubleValue);
+  return (JniResult){.result = {.d = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getDecimalValue = NULL;
+jmethodID _m_JsonParser__getDecimalValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getDecimalValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getDecimalValue, "getDecimalValue", "()Ljava/math/BigDecimal;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getDecimalValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getDecimalValue);
-    return to_global_ref(_result);
+JniResult JsonParser__getDecimalValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getDecimalValue, "getDecimalValue",
+              "()Ljava/math/BigDecimal;");
+  if (_m_JsonParser__getDecimalValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_JsonParser__getDecimalValue);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getBooleanValue = NULL;
+jmethodID _m_JsonParser__getBooleanValue = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_getBooleanValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getBooleanValue, "getBooleanValue", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getBooleanValue == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getBooleanValue);
-    return _result;
+JniResult JsonParser__getBooleanValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getBooleanValue, "getBooleanValue",
+              "()Z");
+  if (_m_JsonParser__getBooleanValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__getBooleanValue);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getEmbeddedObject = NULL;
+jmethodID _m_JsonParser__getEmbeddedObject = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getEmbeddedObject(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getEmbeddedObject, "getEmbeddedObject", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getEmbeddedObject == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getEmbeddedObject);
-    return to_global_ref(_result);
+JniResult JsonParser__getEmbeddedObject(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getEmbeddedObject,
+              "getEmbeddedObject", "()Ljava/lang/Object;");
+  if (_m_JsonParser__getEmbeddedObject == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getEmbeddedObject);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getBinaryValue = NULL;
+jmethodID _m_JsonParser__getBinaryValue = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getBinaryValue(jobject self_, jobject bv) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getBinaryValue, "getBinaryValue", "(Lcom/fasterxml/jackson/core/Base64Variant;)L[B;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getBinaryValue == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getBinaryValue, bv);
-    return to_global_ref(_result);
+JniResult JsonParser__getBinaryValue(jobject self_, jobject bv) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getBinaryValue, "getBinaryValue",
+              "(Lcom/fasterxml/jackson/core/Base64Variant;)L[B;");
+  if (_m_JsonParser__getBinaryValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getBinaryValue, bv);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getBinaryValue1 = NULL;
+jmethodID _m_JsonParser__getBinaryValue1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getBinaryValue1(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getBinaryValue1, "getBinaryValue", "()L[B;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getBinaryValue1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getBinaryValue1);
-    return to_global_ref(_result);
+JniResult JsonParser__getBinaryValue1(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getBinaryValue1, "getBinaryValue",
+              "()L[B;");
+  if (_m_JsonParser__getBinaryValue1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_JsonParser__getBinaryValue1);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_readBinaryValue = NULL;
+jmethodID _m_JsonParser__readBinaryValue = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_readBinaryValue(jobject self_, jobject out) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_readBinaryValue, "readBinaryValue", "(Ljava/io/OutputStream;)I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_readBinaryValue == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_readBinaryValue, out);
-    return _result;
+JniResult JsonParser__readBinaryValue(jobject self_, jobject out) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__readBinaryValue, "readBinaryValue",
+              "(Ljava/io/OutputStream;)I");
+  if (_m_JsonParser__readBinaryValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonParser__readBinaryValue, out);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_readBinaryValue1 = NULL;
+jmethodID _m_JsonParser__readBinaryValue1 = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_readBinaryValue1(jobject self_, jobject bv, jobject out) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_readBinaryValue1, "readBinaryValue", "(Lcom/fasterxml/jackson/core/Base64Variant;Ljava/io/OutputStream;)I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_readBinaryValue1 == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_readBinaryValue1, bv, out);
-    return _result;
+JniResult JsonParser__readBinaryValue1(jobject self_, jobject bv, jobject out) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_JsonParser, &_m_JsonParser__readBinaryValue1, "readBinaryValue",
+      "(Lcom/fasterxml/jackson/core/Base64Variant;Ljava/io/OutputStream;)I");
+  if (_m_JsonParser__readBinaryValue1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonParser__readBinaryValue1, bv, out);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsInt = NULL;
+jmethodID _m_JsonParser__getValueAsInt = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getValueAsInt(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsInt, "getValueAsInt", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsInt == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsInt);
-    return _result;
+JniResult JsonParser__getValueAsInt(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsInt, "getValueAsInt",
+              "()I");
+  if (_m_JsonParser__getValueAsInt == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser__getValueAsInt);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsInt1 = NULL;
+jmethodID _m_JsonParser__getValueAsInt1 = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser_getValueAsInt1(jobject self_, int32_t def) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsInt1, "getValueAsInt", "(I)I");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsInt1 == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsInt1, def);
-    return _result;
+JniResult JsonParser__getValueAsInt1(jobject self_, int32_t def) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsInt1, "getValueAsInt",
+              "(I)I");
+  if (_m_JsonParser__getValueAsInt1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(
+      jniEnv, self_, _m_JsonParser__getValueAsInt1, def);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsLong = NULL;
+jmethodID _m_JsonParser__getValueAsLong = NULL;
 FFI_PLUGIN_EXPORT
-int64_t com_fasterxml_jackson_core_JsonParser_getValueAsLong(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int64_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsLong, "getValueAsLong", "()J");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsLong == NULL) return (int64_t)0;
-    int64_t _result = (*jniEnv)->CallLongMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsLong);
-    return _result;
+JniResult JsonParser__getValueAsLong(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsLong, "getValueAsLong",
+              "()J");
+  if (_m_JsonParser__getValueAsLong == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int64_t _result =
+      (*jniEnv)->CallLongMethod(jniEnv, self_, _m_JsonParser__getValueAsLong);
+  return (JniResult){.result = {.j = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsLong1 = NULL;
+jmethodID _m_JsonParser__getValueAsLong1 = NULL;
 FFI_PLUGIN_EXPORT
-int64_t com_fasterxml_jackson_core_JsonParser_getValueAsLong1(jobject self_, int64_t def) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (int64_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsLong1, "getValueAsLong", "(J)J");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsLong1 == NULL) return (int64_t)0;
-    int64_t _result = (*jniEnv)->CallLongMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsLong1, def);
-    return _result;
+JniResult JsonParser__getValueAsLong1(jobject self_, int64_t def) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsLong1, "getValueAsLong",
+              "(J)J");
+  if (_m_JsonParser__getValueAsLong1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int64_t _result = (*jniEnv)->CallLongMethod(
+      jniEnv, self_, _m_JsonParser__getValueAsLong1, def);
+  return (JniResult){.result = {.j = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble = NULL;
+jmethodID _m_JsonParser__getValueAsDouble = NULL;
 FFI_PLUGIN_EXPORT
-double com_fasterxml_jackson_core_JsonParser_getValueAsDouble(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (double)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble, "getValueAsDouble", "()D");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble == NULL) return (double)0;
-    double _result = (*jniEnv)->CallDoubleMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble);
-    return _result;
+JniResult JsonParser__getValueAsDouble(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsDouble,
+              "getValueAsDouble", "()D");
+  if (_m_JsonParser__getValueAsDouble == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  double _result = (*jniEnv)->CallDoubleMethod(jniEnv, self_,
+                                               _m_JsonParser__getValueAsDouble);
+  return (JniResult){.result = {.d = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble1 = NULL;
+jmethodID _m_JsonParser__getValueAsDouble1 = NULL;
 FFI_PLUGIN_EXPORT
-double com_fasterxml_jackson_core_JsonParser_getValueAsDouble1(jobject self_, double def) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (double)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble1, "getValueAsDouble", "(D)D");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble1 == NULL) return (double)0;
-    double _result = (*jniEnv)->CallDoubleMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsDouble1, def);
-    return _result;
+JniResult JsonParser__getValueAsDouble1(jobject self_, double def) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsDouble1,
+              "getValueAsDouble", "(D)D");
+  if (_m_JsonParser__getValueAsDouble1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  double _result = (*jniEnv)->CallDoubleMethod(
+      jniEnv, self_, _m_JsonParser__getValueAsDouble1, def);
+  return (JniResult){.result = {.d = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean = NULL;
+jmethodID _m_JsonParser__getValueAsBoolean = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_getValueAsBoolean(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean, "getValueAsBoolean", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean);
-    return _result;
+JniResult JsonParser__getValueAsBoolean(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsBoolean,
+              "getValueAsBoolean", "()Z");
+  if (_m_JsonParser__getValueAsBoolean == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__getValueAsBoolean);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean1 = NULL;
+jmethodID _m_JsonParser__getValueAsBoolean1 = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_getValueAsBoolean1(jobject self_, uint8_t def) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean1, "getValueAsBoolean", "(Z)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean1 == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsBoolean1, def);
-    return _result;
+JniResult JsonParser__getValueAsBoolean1(jobject self_, uint8_t def) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsBoolean1,
+              "getValueAsBoolean", "(Z)Z");
+  if (_m_JsonParser__getValueAsBoolean1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__getValueAsBoolean1, def);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsString = NULL;
+jmethodID _m_JsonParser__getValueAsString = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getValueAsString(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsString, "getValueAsString", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsString == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsString);
-    return to_global_ref(_result);
+JniResult JsonParser__getValueAsString(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsString,
+              "getValueAsString", "()Ljava/lang/String;");
+  if (_m_JsonParser__getValueAsString == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getValueAsString);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getValueAsString1 = NULL;
+jmethodID _m_JsonParser__getValueAsString1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getValueAsString1(jobject self_, jobject def) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getValueAsString1, "getValueAsString", "(Ljava/lang/String;)Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getValueAsString1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getValueAsString1, def);
-    return to_global_ref(_result);
+JniResult JsonParser__getValueAsString1(jobject self_, jobject def) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getValueAsString1,
+              "getValueAsString", "(Ljava/lang/String;)Ljava/lang/String;");
+  if (_m_JsonParser__getValueAsString1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__getValueAsString1, def);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_canReadObjectId = NULL;
+jmethodID _m_JsonParser__canReadObjectId = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_canReadObjectId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_canReadObjectId, "canReadObjectId", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_canReadObjectId == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_canReadObjectId);
-    return _result;
+JniResult JsonParser__canReadObjectId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__canReadObjectId, "canReadObjectId",
+              "()Z");
+  if (_m_JsonParser__canReadObjectId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser__canReadObjectId);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_canReadTypeId = NULL;
+jmethodID _m_JsonParser__canReadTypeId = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser_canReadTypeId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_canReadTypeId, "canReadTypeId", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser_canReadTypeId == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_canReadTypeId);
-    return _result;
+JniResult JsonParser__canReadTypeId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__canReadTypeId, "canReadTypeId",
+              "()Z");
+  if (_m_JsonParser__canReadTypeId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonParser__canReadTypeId);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getObjectId = NULL;
+jmethodID _m_JsonParser__getObjectId = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getObjectId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getObjectId, "getObjectId", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getObjectId == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getObjectId);
-    return to_global_ref(_result);
+JniResult JsonParser__getObjectId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getObjectId, "getObjectId",
+              "()Ljava/lang/Object;");
+  if (_m_JsonParser__getObjectId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getObjectId);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_getTypeId = NULL;
+jmethodID _m_JsonParser__getTypeId = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_getTypeId(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_getTypeId, "getTypeId", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_getTypeId == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_getTypeId);
-    return to_global_ref(_result);
+JniResult JsonParser__getTypeId(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__getTypeId, "getTypeId",
+              "()Ljava/lang/Object;");
+  if (_m_JsonParser__getTypeId == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonParser__getTypeId);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_readValueAs = NULL;
+jmethodID _m_JsonParser__readValueAs = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_readValueAs(jobject self_, jobject valueType) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_readValueAs, "readValueAs", "(Ljava/lang/Class;)Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_readValueAs == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_readValueAs, valueType);
-    return to_global_ref(_result);
+JniResult JsonParser__readValueAs(jobject self_, jobject valueType) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__readValueAs, "readValueAs",
+              "(Ljava/lang/Class;)Ljava/lang/Object;");
+  if (_m_JsonParser__readValueAs == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__readValueAs, valueType);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_readValueAs1 = NULL;
+jmethodID _m_JsonParser__readValueAs1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_readValueAs1(jobject self_, jobject valueTypeRef) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_readValueAs1, "readValueAs", "(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_readValueAs1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_readValueAs1, valueTypeRef);
-    return to_global_ref(_result);
+JniResult JsonParser__readValueAs1(jobject self_, jobject valueTypeRef) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_JsonParser, &_m_JsonParser__readValueAs1, "readValueAs",
+      "(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/lang/Object;");
+  if (_m_JsonParser__readValueAs1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__readValueAs1, valueTypeRef);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_readValuesAs = NULL;
+jmethodID _m_JsonParser__readValuesAs = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_readValuesAs(jobject self_, jobject valueType) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_readValuesAs, "readValuesAs", "(Ljava/lang/Class;)Ljava/util/Iterator;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_readValuesAs == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_readValuesAs, valueType);
-    return to_global_ref(_result);
+JniResult JsonParser__readValuesAs(jobject self_, jobject valueType) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__readValuesAs, "readValuesAs",
+              "(Ljava/lang/Class;)Ljava/util/Iterator;");
+  if (_m_JsonParser__readValuesAs == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__readValuesAs, valueType);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_readValuesAs1 = NULL;
+jmethodID _m_JsonParser__readValuesAs1 = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_readValuesAs1(jobject self_, jobject valueTypeRef) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_readValuesAs1, "readValuesAs", "(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/util/Iterator;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_readValuesAs1 == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_readValuesAs1, valueTypeRef);
-    return to_global_ref(_result);
+JniResult JsonParser__readValuesAs1(jobject self_, jobject valueTypeRef) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(
+      _c_JsonParser, &_m_JsonParser__readValuesAs1, "readValuesAs",
+      "(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/util/Iterator;");
+  if (_m_JsonParser__readValuesAs1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(
+      jniEnv, self_, _m_JsonParser__readValuesAs1, valueTypeRef);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser_readValueAsTree = NULL;
+jmethodID _m_JsonParser__readValueAsTree = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser_readValueAsTree(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser, &_m_com_fasterxml_jackson_core_JsonParser_readValueAsTree, "readValueAsTree", "()Ljava/lang/Object;");
-    if (_m_com_fasterxml_jackson_core_JsonParser_readValueAsTree == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser_readValueAsTree);
-    return to_global_ref(_result);
+JniResult JsonParser__readValueAsTree(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser, &_m_JsonParser__readValueAsTree, "readValueAsTree",
+              "()Ljava/lang/Object;");
+  if (_m_JsonParser__readValueAsTree == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_,
+                                                _m_JsonParser__readValueAsTree);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jfieldID _f_com_fasterxml_jackson_core_JsonParser_DEFAULT_READ_CAPABILITIES = NULL;
+jfieldID _f_JsonParser__DEFAULT_READ_CAPABILITIES = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_com_fasterxml_jackson_core_JsonParser_DEFAULT_READ_CAPABILITIES() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser, "com/fasterxml/jackson/core/JsonParser");
-    if (_c_com_fasterxml_jackson_core_JsonParser == NULL) return (jobject)0;
-    load_static_field(_c_com_fasterxml_jackson_core_JsonParser, &_f_com_fasterxml_jackson_core_JsonParser_DEFAULT_READ_CAPABILITIES, "DEFAULT_READ_CAPABILITIES","Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_com_fasterxml_jackson_core_JsonParser, _f_com_fasterxml_jackson_core_JsonParser_DEFAULT_READ_CAPABILITIES));
+JniResult get_JsonParser__DEFAULT_READ_CAPABILITIES() {
+  load_env();
+  load_class_gr(&_c_JsonParser, "com/fasterxml/jackson/core/JsonParser");
+  if (_c_JsonParser == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_JsonParser, &_f_JsonParser__DEFAULT_READ_CAPABILITIES,
+                    "DEFAULT_READ_CAPABILITIES",
+                    "Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;");
+  jobject _result = to_global_ref((*jniEnv)->GetStaticObjectField(
+      jniEnv, _c_JsonParser, _f_JsonParser__DEFAULT_READ_CAPABILITIES));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
-
 // com.fasterxml.jackson.core.JsonParser$Feature
-jclass _c_com_fasterxml_jackson_core_JsonParser__Feature = NULL;
+jclass _c_JsonParser_Feature = NULL;
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__Feature_values = NULL;
+jmethodID _m_JsonParser_Feature__values = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser__Feature_values() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__Feature, "com/fasterxml/jackson/core/JsonParser$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonParser__Feature == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonParser__Feature, &_m_com_fasterxml_jackson_core_JsonParser__Feature_values, "values", "()L[com/fasterxml/jackson/core/JsonParser$Feature;");
-    if (_m_com_fasterxml_jackson_core_JsonParser__Feature_values == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonParser__Feature, _m_com_fasterxml_jackson_core_JsonParser__Feature_values);
-    return to_global_ref(_result);
+JniResult JsonParser_Feature__values() {
+  load_env();
+  load_class_gr(&_c_JsonParser_Feature,
+                "com/fasterxml/jackson/core/JsonParser$Feature");
+  if (_c_JsonParser_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__values,
+                     "values",
+                     "()L[com/fasterxml/jackson/core/JsonParser$Feature;");
+  if (_m_JsonParser_Feature__values == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_JsonParser_Feature, _m_JsonParser_Feature__values);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__Feature_valueOf = NULL;
+jmethodID _m_JsonParser_Feature__valueOf = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser__Feature_valueOf(jobject name) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__Feature, "com/fasterxml/jackson/core/JsonParser$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonParser__Feature == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonParser__Feature, &_m_com_fasterxml_jackson_core_JsonParser__Feature_valueOf, "valueOf", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$Feature;");
-    if (_m_com_fasterxml_jackson_core_JsonParser__Feature_valueOf == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonParser__Feature, _m_com_fasterxml_jackson_core_JsonParser__Feature_valueOf, name);
-    return to_global_ref(_result);
+JniResult JsonParser_Feature__valueOf(jobject name) {
+  load_env();
+  load_class_gr(&_c_JsonParser_Feature,
+                "com/fasterxml/jackson/core/JsonParser$Feature");
+  if (_c_JsonParser_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_JsonParser_Feature, &_m_JsonParser_Feature__valueOf, "valueOf",
+      "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$Feature;");
+  if (_m_JsonParser_Feature__valueOf == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_JsonParser_Feature, _m_JsonParser_Feature__valueOf, name);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__Feature_collectDefaults = NULL;
+jmethodID _m_JsonParser_Feature__collectDefaults = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser__Feature_collectDefaults() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__Feature, "com/fasterxml/jackson/core/JsonParser$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonParser__Feature == NULL) return (int32_t)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonParser__Feature, &_m_com_fasterxml_jackson_core_JsonParser__Feature_collectDefaults, "collectDefaults", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser__Feature_collectDefaults == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallStaticIntMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonParser__Feature, _m_com_fasterxml_jackson_core_JsonParser__Feature_collectDefaults);
-    return _result;
+JniResult JsonParser_Feature__collectDefaults() {
+  load_env();
+  load_class_gr(&_c_JsonParser_Feature,
+                "com/fasterxml/jackson/core/JsonParser$Feature");
+  if (_c_JsonParser_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_JsonParser_Feature,
+                     &_m_JsonParser_Feature__collectDefaults, "collectDefaults",
+                     "()I");
+  if (_m_JsonParser_Feature__collectDefaults == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallStaticIntMethod(
+      jniEnv, _c_JsonParser_Feature, _m_JsonParser_Feature__collectDefaults);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__Feature_ctor = NULL;
+jmethodID _m_JsonParser_Feature__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser__Feature_ctor(uint8_t defaultState) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__Feature, "com/fasterxml/jackson/core/JsonParser$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonParser__Feature == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser__Feature, &_m_com_fasterxml_jackson_core_JsonParser__Feature_ctor, "<init>", "(Z)V");
-    if (_m_com_fasterxml_jackson_core_JsonParser__Feature_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonParser__Feature, _m_com_fasterxml_jackson_core_JsonParser__Feature_ctor, defaultState);
-    return to_global_ref(_result);
+JniResult JsonParser_Feature__ctor(uint8_t defaultState) {
+  load_env();
+  load_class_gr(&_c_JsonParser_Feature,
+                "com/fasterxml/jackson/core/JsonParser$Feature");
+  if (_c_JsonParser_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__ctor, "<init>",
+              "(Z)V");
+  if (_m_JsonParser_Feature__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(
+      jniEnv, _c_JsonParser_Feature, _m_JsonParser_Feature__ctor, defaultState);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__Feature_enabledByDefault = NULL;
+jmethodID _m_JsonParser_Feature__enabledByDefault = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser__Feature_enabledByDefault(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__Feature, "com/fasterxml/jackson/core/JsonParser$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonParser__Feature == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser__Feature, &_m_com_fasterxml_jackson_core_JsonParser__Feature_enabledByDefault, "enabledByDefault", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser__Feature_enabledByDefault == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser__Feature_enabledByDefault);
-    return _result;
+JniResult JsonParser_Feature__enabledByDefault(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser_Feature,
+                "com/fasterxml/jackson/core/JsonParser$Feature");
+  if (_c_JsonParser_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__enabledByDefault,
+              "enabledByDefault", "()Z");
+  if (_m_JsonParser_Feature__enabledByDefault == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser_Feature__enabledByDefault);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__Feature_enabledIn = NULL;
+jmethodID _m_JsonParser_Feature__enabledIn = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonParser__Feature_enabledIn(jobject self_, int32_t flags) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__Feature, "com/fasterxml/jackson/core/JsonParser$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonParser__Feature == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser__Feature, &_m_com_fasterxml_jackson_core_JsonParser__Feature_enabledIn, "enabledIn", "(I)Z");
-    if (_m_com_fasterxml_jackson_core_JsonParser__Feature_enabledIn == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser__Feature_enabledIn, flags);
-    return _result;
+JniResult JsonParser_Feature__enabledIn(jobject self_, int32_t flags) {
+  load_env();
+  load_class_gr(&_c_JsonParser_Feature,
+                "com/fasterxml/jackson/core/JsonParser$Feature");
+  if (_c_JsonParser_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__enabledIn,
+              "enabledIn", "(I)Z");
+  if (_m_JsonParser_Feature__enabledIn == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result = (*jniEnv)->CallBooleanMethod(
+      jniEnv, self_, _m_JsonParser_Feature__enabledIn, flags);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__Feature_getMask = NULL;
+jmethodID _m_JsonParser_Feature__getMask = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonParser__Feature_getMask(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__Feature, "com/fasterxml/jackson/core/JsonParser$Feature");
-    if (_c_com_fasterxml_jackson_core_JsonParser__Feature == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser__Feature, &_m_com_fasterxml_jackson_core_JsonParser__Feature_getMask, "getMask", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonParser__Feature_getMask == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonParser__Feature_getMask);
-    return _result;
+JniResult JsonParser_Feature__getMask(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonParser_Feature,
+                "com/fasterxml/jackson/core/JsonParser$Feature");
+  if (_c_JsonParser_Feature == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser_Feature, &_m_JsonParser_Feature__getMask, "getMask",
+              "()I");
+  if (_m_JsonParser_Feature__getMask == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonParser_Feature__getMask);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 // com.fasterxml.jackson.core.JsonParser$NumberType
-jclass _c_com_fasterxml_jackson_core_JsonParser__NumberType = NULL;
+jclass _c_JsonParser_NumberType = NULL;
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__NumberType_values = NULL;
+jmethodID _m_JsonParser_NumberType__values = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser__NumberType_values() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__NumberType, "com/fasterxml/jackson/core/JsonParser$NumberType");
-    if (_c_com_fasterxml_jackson_core_JsonParser__NumberType == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonParser__NumberType, &_m_com_fasterxml_jackson_core_JsonParser__NumberType_values, "values", "()L[com/fasterxml/jackson/core/JsonParser$NumberType;");
-    if (_m_com_fasterxml_jackson_core_JsonParser__NumberType_values == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonParser__NumberType, _m_com_fasterxml_jackson_core_JsonParser__NumberType_values);
-    return to_global_ref(_result);
+JniResult JsonParser_NumberType__values() {
+  load_env();
+  load_class_gr(&_c_JsonParser_NumberType,
+                "com/fasterxml/jackson/core/JsonParser$NumberType");
+  if (_c_JsonParser_NumberType == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_JsonParser_NumberType,
+                     &_m_JsonParser_NumberType__values, "values",
+                     "()L[com/fasterxml/jackson/core/JsonParser$NumberType;");
+  if (_m_JsonParser_NumberType__values == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_JsonParser_NumberType, _m_JsonParser_NumberType__values);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__NumberType_valueOf = NULL;
+jmethodID _m_JsonParser_NumberType__valueOf = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser__NumberType_valueOf(jobject name) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__NumberType, "com/fasterxml/jackson/core/JsonParser$NumberType");
-    if (_c_com_fasterxml_jackson_core_JsonParser__NumberType == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonParser__NumberType, &_m_com_fasterxml_jackson_core_JsonParser__NumberType_valueOf, "valueOf", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$NumberType;");
-    if (_m_com_fasterxml_jackson_core_JsonParser__NumberType_valueOf == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonParser__NumberType, _m_com_fasterxml_jackson_core_JsonParser__NumberType_valueOf, name);
-    return to_global_ref(_result);
+JniResult JsonParser_NumberType__valueOf(jobject name) {
+  load_env();
+  load_class_gr(&_c_JsonParser_NumberType,
+                "com/fasterxml/jackson/core/JsonParser$NumberType");
+  if (_c_JsonParser_NumberType == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_JsonParser_NumberType, &_m_JsonParser_NumberType__valueOf, "valueOf",
+      "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser$NumberType;");
+  if (_m_JsonParser_NumberType__valueOf == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_JsonParser_NumberType, _m_JsonParser_NumberType__valueOf,
+      name);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonParser__NumberType_ctor = NULL;
+jmethodID _m_JsonParser_NumberType__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonParser__NumberType_ctor() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonParser__NumberType, "com/fasterxml/jackson/core/JsonParser$NumberType");
-    if (_c_com_fasterxml_jackson_core_JsonParser__NumberType == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonParser__NumberType, &_m_com_fasterxml_jackson_core_JsonParser__NumberType_ctor, "<init>", "()V");
-    if (_m_com_fasterxml_jackson_core_JsonParser__NumberType_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonParser__NumberType, _m_com_fasterxml_jackson_core_JsonParser__NumberType_ctor);
-    return to_global_ref(_result);
+JniResult JsonParser_NumberType__ctor() {
+  load_env();
+  load_class_gr(&_c_JsonParser_NumberType,
+                "com/fasterxml/jackson/core/JsonParser$NumberType");
+  if (_c_JsonParser_NumberType == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonParser_NumberType, &_m_JsonParser_NumberType__ctor,
+              "<init>", "()V");
+  if (_m_JsonParser_NumberType__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_JsonParser_NumberType,
+                                         _m_JsonParser_NumberType__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
 // com.fasterxml.jackson.core.JsonToken
-jclass _c_com_fasterxml_jackson_core_JsonToken = NULL;
+jclass _c_JsonToken = NULL;
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_values = NULL;
+jmethodID _m_JsonToken__values = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonToken_values() {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_values, "values", "()L[com/fasterxml/jackson/core/JsonToken;");
-    if (_m_com_fasterxml_jackson_core_JsonToken_values == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonToken, _m_com_fasterxml_jackson_core_JsonToken_values);
-    return to_global_ref(_result);
+JniResult JsonToken__values() {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_JsonToken, &_m_JsonToken__values, "values",
+                     "()L[com/fasterxml/jackson/core/JsonToken;");
+  if (_m_JsonToken__values == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_JsonToken,
+                                                      _m_JsonToken__values);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_valueOf = NULL;
+jmethodID _m_JsonToken__valueOf = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonToken_valueOf(jobject name) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (jobject)0;
-    load_static_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_valueOf, "valueOf", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonToken;");
-    if (_m_com_fasterxml_jackson_core_JsonToken_valueOf == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_fasterxml_jackson_core_JsonToken, _m_com_fasterxml_jackson_core_JsonToken_valueOf, name);
-    return to_global_ref(_result);
+JniResult JsonToken__valueOf(jobject name) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_JsonToken, &_m_JsonToken__valueOf, "valueOf",
+      "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonToken;");
+  if (_m_JsonToken__valueOf == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->CallStaticObjectMethod(
+      jniEnv, _c_JsonToken, _m_JsonToken__valueOf, name);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_ctor = NULL;
+jmethodID _m_JsonToken__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonToken_ctor(jobject token, int32_t id) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_ctor, "<init>", "(Ljava/lang/String;I)V");
-    if (_m_com_fasterxml_jackson_core_JsonToken_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_fasterxml_jackson_core_JsonToken, _m_com_fasterxml_jackson_core_JsonToken_ctor, token, id);
-    return to_global_ref(_result);
+JniResult JsonToken__ctor(jobject token, int32_t id) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__ctor, "<init>",
+              "(Ljava/lang/String;I)V");
+  if (_m_JsonToken__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_JsonToken, _m_JsonToken__ctor, token, id);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_id = NULL;
+jmethodID _m_JsonToken__id = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_fasterxml_jackson_core_JsonToken_id(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (int32_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_id, "id", "()I");
-    if (_m_com_fasterxml_jackson_core_JsonToken_id == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_id);
-    return _result;
+JniResult JsonToken__id(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__id, "id", "()I");
+  if (_m_JsonToken__id == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_JsonToken__id);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_asString = NULL;
+jmethodID _m_JsonToken__asString = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonToken_asString(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_asString, "asString", "()Ljava/lang/String;");
-    if (_m_com_fasterxml_jackson_core_JsonToken_asString == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_asString);
-    return to_global_ref(_result);
+JniResult JsonToken__asString(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__asString, "asString",
+              "()Ljava/lang/String;");
+  if (_m_JsonToken__asString == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonToken__asString);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_asCharArray = NULL;
+jmethodID _m_JsonToken__asCharArray = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonToken_asCharArray(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_asCharArray, "asCharArray", "()L[C;");
-    if (_m_com_fasterxml_jackson_core_JsonToken_asCharArray == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_asCharArray);
-    return to_global_ref(_result);
+JniResult JsonToken__asCharArray(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__asCharArray, "asCharArray",
+              "()L[C;");
+  if (_m_JsonToken__asCharArray == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonToken__asCharArray);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_asByteArray = NULL;
+jmethodID _m_JsonToken__asByteArray = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_fasterxml_jackson_core_JsonToken_asByteArray(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (jobject)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_asByteArray, "asByteArray", "()L[B;");
-    if (_m_com_fasterxml_jackson_core_JsonToken_asByteArray == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_asByteArray);
-    return to_global_ref(_result);
+JniResult JsonToken__asByteArray(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__asByteArray, "asByteArray",
+              "()L[B;");
+  if (_m_JsonToken__asByteArray == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_JsonToken__asByteArray);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_isNumeric = NULL;
+jmethodID _m_JsonToken__isNumeric = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonToken_isNumeric(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_isNumeric, "isNumeric", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonToken_isNumeric == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_isNumeric);
-    return _result;
+JniResult JsonToken__isNumeric(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__isNumeric, "isNumeric", "()Z");
+  if (_m_JsonToken__isNumeric == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isNumeric);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_isStructStart = NULL;
+jmethodID _m_JsonToken__isStructStart = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonToken_isStructStart(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_isStructStart, "isStructStart", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonToken_isStructStart == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_isStructStart);
-    return _result;
+JniResult JsonToken__isStructStart(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__isStructStart, "isStructStart",
+              "()Z");
+  if (_m_JsonToken__isStructStart == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isStructStart);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_isStructEnd = NULL;
+jmethodID _m_JsonToken__isStructEnd = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonToken_isStructEnd(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_isStructEnd, "isStructEnd", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonToken_isStructEnd == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_isStructEnd);
-    return _result;
+JniResult JsonToken__isStructEnd(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__isStructEnd, "isStructEnd", "()Z");
+  if (_m_JsonToken__isStructEnd == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isStructEnd);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_isScalarValue = NULL;
+jmethodID _m_JsonToken__isScalarValue = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonToken_isScalarValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_isScalarValue, "isScalarValue", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonToken_isScalarValue == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_isScalarValue);
-    return _result;
+JniResult JsonToken__isScalarValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__isScalarValue, "isScalarValue",
+              "()Z");
+  if (_m_JsonToken__isScalarValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isScalarValue);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_fasterxml_jackson_core_JsonToken_isBoolean = NULL;
+jmethodID _m_JsonToken__isBoolean = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_fasterxml_jackson_core_JsonToken_isBoolean(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_fasterxml_jackson_core_JsonToken, "com/fasterxml/jackson/core/JsonToken");
-    if (_c_com_fasterxml_jackson_core_JsonToken == NULL) return (uint8_t)0;
-    load_method(_c_com_fasterxml_jackson_core_JsonToken, &_m_com_fasterxml_jackson_core_JsonToken_isBoolean, "isBoolean", "()Z");
-    if (_m_com_fasterxml_jackson_core_JsonToken_isBoolean == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_fasterxml_jackson_core_JsonToken_isBoolean);
-    return _result;
+JniResult JsonToken__isBoolean(jobject self_) {
+  load_env();
+  load_class_gr(&_c_JsonToken, "com/fasterxml/jackson/core/JsonToken");
+  if (_c_JsonToken == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_JsonToken, &_m_JsonToken__isBoolean, "isBoolean", "()Z");
+  if (_m_JsonToken__isBoolean == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_JsonToken__isBoolean);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
-
diff --git a/pkgs/jnigen/test/package_resolver_test.dart b/pkgs/jnigen/test/package_resolver_test.dart
index 91e32dd..14ed74e 100644
--- a/pkgs/jnigen/test/package_resolver_test.dart
+++ b/pkgs/jnigen/test/package_resolver_test.dart
@@ -16,34 +16,41 @@
 void main() {
   final resolver = PackagePathResolver(
       {
-        'org.apache.pdfbox': 'package:pdfbox',
-        'org.apache.fontbox': 'package:fontbox',
-        'java.lang': 'package:java_lang',
-        'java.util': 'package:java_util',
-        'org.me.package': 'package:my_package/src/',
+        'org.apache.pdfbox': 'package:pdfbox/pdfbox.dart',
+        'android.os.Process': 'package:android/os.dart',
       },
       'a.b',
-      {'a.b.C', 'a.b.c.D', 'a.b.c.d.E', 'a.X', 'a.g.Y'});
+      {
+        'a.b.C',
+        'a.b.c.D',
+        'a.b.c.d.E',
+        'a.X',
+        'e.f.G',
+        'e.F',
+        'a.g.Y',
+        'a.m.n.P'
+      });
 
   final tests = [
-    // Simple example
-    ResolverTest('org.apache.pdfbox.PDF',
-        'package:pdfbox/org/apache/pdfbox.dart', 'pdfbox_.PDF'),
-    // Nested classes
-    ResolverTest('org.apache.fontbox.Font\$FontFile',
-        'package:fontbox/org/apache/fontbox.dart', 'fontbox_.Font_FontFile'),
-    // slightly deeper package
-    ResolverTest('java.lang.ref.WeakReference',
-        'package:java_lang/java/lang/ref.dart', 'ref_.WeakReference'),
-    // Renaming
-    ResolverTest('java.util.U', 'package:java_util/java/util.dart', 'util_.U'),
-    ResolverTest('org.me.package.util.U',
-        'package:my_package/src/org/me/package/util.dart', 'util1_.U'),
+    // Absolute imports resolved using import map
+    ResolverTest(
+        'android.os.Process', 'package:android/os.dart', 'os_.Process'),
+    ResolverTest('org.apache.pdfbox.pdmodel.PDDocument',
+        'package:pdfbox/pdfbox.dart', 'pdmodel_.PDDocument'),
     // Relative imports
+    // inner package
     ResolverTest('a.b.c.D', 'b/c.dart', 'c_.D'),
+    // inner package, deeper
     ResolverTest('a.b.c.d.E', 'b/c/d.dart', 'd_.E'),
+    // parent package
     ResolverTest('a.X', '../a.dart', 'a_.X'),
-    ResolverTest('a.g.Y', '../a/g.dart', 'g_.Y'),
+    // unrelated package in same translation unit
+    ResolverTest('e.f.G', '../e/f.dart', 'f_.G'),
+    ResolverTest('e.F', '../e.dart', 'e_.F'),
+    // neighbour package
+    ResolverTest('a.g.Y', 'g.dart', 'g_.Y'),
+    // inner package of a neighbour package
+    ResolverTest('a.m.n.P', 'm/n.dart', 'n_.P'),
   ];
 
   for (var testCase in tests) {
diff --git a/pkgs/jnigen/test/simple_package_test/generate.dart b/pkgs/jnigen/test/simple_package_test/generate.dart
index 99db612..33fd4e9 100644
--- a/pkgs/jnigen/test/simple_package_test/generate.dart
+++ b/pkgs/jnigen/test/simple_package_test/generate.dart
@@ -24,6 +24,7 @@
 var javaFiles = [
   join(javaPrefix, 'simple_package', 'Example.java'),
   join(javaPrefix, 'pkg2', 'C2.java'),
+  join(javaPrefix, 'pkg2', 'Example.java'),
 ];
 
 void compileJavaSources(String workingDir, List<String> files) async {
diff --git a/pkgs/jnigen/test/simple_package_test/java/com/github/dart_lang/jnigen/pkg2/Example.java b/pkgs/jnigen/test/simple_package_test/java/com/github/dart_lang/jnigen/pkg2/Example.java
new file mode 100644
index 0000000..6cce455
--- /dev/null
+++ b/pkgs/jnigen/test/simple_package_test/java/com/github/dart_lang/jnigen/pkg2/Example.java
@@ -0,0 +1,13 @@
+// Copyright (c) 2022, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// This class is named the same as `Example` in other package to verify the renaming works.
+
+package com.github.dart_lang.jnigen.pkg2;
+
+public class Example {
+  public int whichExample() {
+    return 1;
+  }
+}
diff --git a/pkgs/jnigen/test/simple_package_test/java/com/github/dart_lang/jnigen/simple_package/Example.java b/pkgs/jnigen/test/simple_package_test/java/com/github/dart_lang/jnigen/simple_package/Example.java
index ec0c55d..b2d5259 100644
--- a/pkgs/jnigen/test/simple_package_test/java/com/github/dart_lang/jnigen/simple_package/Example.java
+++ b/pkgs/jnigen/test/simple_package_test/java/com/github/dart_lang/jnigen/simple_package/Example.java
@@ -16,6 +16,10 @@
     num = 121;
   }
 
+  public int whichExample() {
+    return 0;
+  }
+
   public static Aux getAux() {
     return aux;
   }
diff --git a/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/pkg2.dart b/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/pkg2.dart
index 4f81578..e72bdb9 100644
--- a/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/pkg2.dart
+++ b/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/pkg2.dart
@@ -12,6 +12,7 @@
 // ignore_for_file: unused_element
 
 import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
 import "package:jni/jni.dart" as jni;
 
 import "../../../../_init.dart" show jniLookup;
@@ -21,27 +22,45 @@
   C2.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
 
   static final _get_CONSTANT =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function()>>(
-              "get_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT")
-          .asFunction<int Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_C2__CONSTANT")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public int CONSTANT
-  static int get CONSTANT => _get_CONSTANT();
+  static int get CONSTANT => _get_CONSTANT().integer;
   static final _set_CONSTANT =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Int32)>>(
-              "set_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT")
-          .asFunction<void Function(int)>();
+      jniLookup<ffi.NativeFunction<jni.JThrowable Function(ffi.Int32)>>(
+              "set_C2__CONSTANT")
+          .asFunction<jni.JThrowable Function(int)>();
 
   /// from: static public int CONSTANT
   static set CONSTANT(int value) => _set_CONSTANT(value);
 
   static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_github_dart_lang_jnigen_pkg2_C2_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>("C2__ctor")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: public void <init>()
-  C2() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
+  C2() : super.fromRef(_ctor().object);
+}
+
+/// from: com.github.dart_lang.jnigen.pkg2.Example
+class Example extends jni.JniObject {
+  Example.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+
+  static final _ctor =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>("Example1__ctor")
+          .asFunction<jni.JniResult Function()>();
+
+  /// from: public void <init>()
+  Example() : super.fromRef(_ctor().object);
+
+  static final _whichExample = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("Example1__whichExample")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public int whichExample()
+  int whichExample() => _whichExample(reference).integer;
 }
diff --git a/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/simple_package.dart b/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/simple_package.dart
index 3d05204..b2002d2 100644
--- a/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/simple_package.dart
+++ b/pkgs/jnigen/test/simple_package_test/lib/com/github/dart_lang/jnigen/simple_package.dart
@@ -12,6 +12,7 @@
 // ignore_for_file: unused_element
 
 import "dart:ffi" as ffi;
+import "package:jni/internal_helpers_for_jnigen.dart";
 import "package:jni/jni.dart" as jni;
 
 import "../../../../_init.dart" show jniLookup;
@@ -27,121 +28,104 @@
   static const OFF = 0;
 
   static final _get_aux =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "get_com_github_dart_lang_jnigen_simple_package_Example_aux")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_Example__aux")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public com.github.dart_lang.jnigen.simple_package.Example.Aux aux
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static Example_Aux get aux => Example_Aux.fromRef(_get_aux());
-  static final _set_aux =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
-              "set_com_github_dart_lang_jnigen_simple_package_Example_aux")
-          .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
+  static Example_Aux get aux => Example_Aux.fromRef(_get_aux().object);
+  static final _set_aux = jniLookup<
+          ffi.NativeFunction<
+              jni.JThrowable Function(
+                  ffi.Pointer<ffi.Void>)>>("set_Example__aux")
+      .asFunction<jni.JThrowable Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: static public com.github.dart_lang.jnigen.simple_package.Example.Aux aux
   /// The returned object must be deleted after use, by calling the `delete` method.
   static set aux(Example_Aux value) => _set_aux(value.reference);
 
-  static final _get_num = jniLookup<ffi.NativeFunction<ffi.Int32 Function()>>(
-          "get_com_github_dart_lang_jnigen_simple_package_Example_num")
-      .asFunction<int Function()>();
+  static final _get_num =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "get_Example__num")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public int num
-  static int get num => _get_num();
+  static int get num => _get_num().integer;
   static final _set_num =
-      jniLookup<ffi.NativeFunction<ffi.Void Function(ffi.Int32)>>(
-              "set_com_github_dart_lang_jnigen_simple_package_Example_num")
-          .asFunction<void Function(int)>();
+      jniLookup<ffi.NativeFunction<jni.JThrowable Function(ffi.Int32)>>(
+              "set_Example__num")
+          .asFunction<jni.JThrowable Function(int)>();
 
   /// from: static public int num
   static set num(int value) => _set_num(value);
 
   static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_github_dart_lang_jnigen_simple_package_Example_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>("Example__ctor")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: public void <init>()
-  Example() : super.fromRef(_ctor()) {
-    jni.Jni.env.checkException();
-  }
+  Example() : super.fromRef(_ctor().object);
+
+  static final _whichExample = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("Example__whichExample")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+
+  /// from: public int whichExample()
+  int whichExample() => _whichExample(reference).integer;
 
   static final _getAux =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function()>>(
-              "com_github_dart_lang_jnigen_simple_package_Example_getAux")
-          .asFunction<ffi.Pointer<ffi.Void> Function()>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>("Example__getAux")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public com.github.dart_lang.jnigen.simple_package.Example.Aux getAux()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  static Example_Aux getAux() {
-    final result__ = Example_Aux.fromRef(_getAux());
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static Example_Aux getAux() => Example_Aux.fromRef(_getAux().object);
 
-  static final _addInts =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int32, ffi.Int32)>>(
-              "com_github_dart_lang_jnigen_simple_package_Example_addInts")
-          .asFunction<int Function(int, int)>();
+  static final _addInts = jniLookup<
+              ffi.NativeFunction<jni.JniResult Function(ffi.Int32, ffi.Int32)>>(
+          "Example__addInts")
+      .asFunction<jni.JniResult Function(int, int)>();
 
   /// from: static public int addInts(int a, int b)
-  static int addInts(int a, int b) {
-    final result__ = _addInts(a, b);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static int addInts(int a, int b) => _addInts(a, b).integer;
 
   static final _getSelf = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>>(
-          "com_github_dart_lang_jnigen_simple_package_Example_getSelf")
-      .asFunction<ffi.Pointer<ffi.Void> Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("Example__getSelf")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public com.github.dart_lang.jnigen.simple_package.Example getSelf()
   /// The returned object must be deleted after use, by calling the `delete` method.
-  Example getSelf() {
-    final result__ = Example.fromRef(_getSelf(reference));
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  Example getSelf() => Example.fromRef(_getSelf(reference).object);
 
-  static final _getNum =
-      jniLookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Pointer<ffi.Void>)>>(
-              "com_github_dart_lang_jnigen_simple_package_Example_getNum")
-          .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+  static final _getNum = jniLookup<
+          ffi.NativeFunction<
+              jni.JniResult Function(ffi.Pointer<ffi.Void>)>>("Example__getNum")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public int getNum()
-  int getNum() {
-    final result__ = _getNum(reference);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  int getNum() => _getNum(reference).integer;
 
   static final _setNum = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Int32)>>(
-          "com_github_dart_lang_jnigen_simple_package_Example_setNum")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Int32)>>("Example__setNum")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public void setNum(int num)
-  void setNum(int num) {
-    final result__ = _setNum(reference, num);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setNum(int num) => _setNum(reference, num).check();
 
-  static final _throwException = jniLookup<
-              ffi.NativeFunction<ffi.Void Function()>>(
-          "com_github_dart_lang_jnigen_simple_package_Example_throwException")
-      .asFunction<void Function()>();
+  static final _throwException =
+      jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
+              "Example__throwException")
+          .asFunction<jni.JniResult Function()>();
 
   /// from: static public void throwException()
-  static void throwException() {
-    final result__ = _throwException();
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  static void throwException() => _throwException().check();
 }
 
 /// from: com.github.dart_lang.jnigen.simple_package.Example$Aux
@@ -150,57 +134,48 @@
 
   static final _get_value = jniLookup<
           ffi.NativeFunction<
-              ffi.Uint8 Function(
-    ffi.Pointer<ffi.Void>,
-  )>>("get_com_github_dart_lang_jnigen_simple_package_Example__Aux_value")
+              jni.JniResult Function(
+    jni.JObject,
+  )>>("get_Example_Aux__value")
       .asFunction<
-          int Function(
-    ffi.Pointer<ffi.Void>,
+          jni.JniResult Function(
+    jni.JObject,
   )>();
 
   /// from: public boolean value
-  bool get value => _get_value(reference) != 0;
+  bool get value => _get_value(reference).boolean;
   static final _set_value = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "set_com_github_dart_lang_jnigen_simple_package_Example__Aux_value")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JThrowable Function(
+                  jni.JObject, ffi.Uint8)>>("set_Example_Aux__value")
+      .asFunction<jni.JThrowable Function(jni.JObject, int)>();
 
   /// from: public boolean value
   set value(bool value) => _set_value(reference, value ? 1 : 0);
 
   static final _ctor =
-      jniLookup<ffi.NativeFunction<ffi.Pointer<ffi.Void> Function(ffi.Uint8)>>(
-              "com_github_dart_lang_jnigen_simple_package_Example__Aux_ctor")
-          .asFunction<ffi.Pointer<ffi.Void> Function(int)>();
+      jniLookup<ffi.NativeFunction<jni.JniResult Function(ffi.Uint8)>>(
+              "Example_Aux__ctor")
+          .asFunction<jni.JniResult Function(int)>();
 
   /// from: public void <init>(boolean value)
-  Example_Aux(bool value) : super.fromRef(_ctor(value ? 1 : 0)) {
-    jni.Jni.env.checkException();
-  }
+  Example_Aux(bool value) : super.fromRef(_ctor(value ? 1 : 0).object);
 
   static final _getValue = jniLookup<
-              ffi.NativeFunction<ffi.Uint8 Function(ffi.Pointer<ffi.Void>)>>(
-          "com_github_dart_lang_jnigen_simple_package_Example__Aux_getValue")
-      .asFunction<int Function(ffi.Pointer<ffi.Void>)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>)>>("Example_Aux__getValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
 
   /// from: public boolean getValue()
-  bool getValue() {
-    final result__ = _getValue(reference) != 0;
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  bool getValue() => _getValue(reference).boolean;
 
   static final _setValue = jniLookup<
-              ffi.NativeFunction<
-                  ffi.Void Function(ffi.Pointer<ffi.Void>, ffi.Uint8)>>(
-          "com_github_dart_lang_jnigen_simple_package_Example__Aux_setValue")
-      .asFunction<void Function(ffi.Pointer<ffi.Void>, int)>();
+          ffi.NativeFunction<
+              jni.JniResult Function(
+                  ffi.Pointer<ffi.Void>, ffi.Uint8)>>("Example_Aux__setValue")
+      .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
 
   /// from: public void setValue(boolean value)
-  void setValue(bool value) {
-    final result__ = _setValue(reference, value ? 1 : 0);
-    jni.Jni.env.checkException();
-    return result__;
-  }
+  void setValue(bool value) => _setValue(reference, value ? 1 : 0).check();
 }
diff --git a/pkgs/jnigen/test/simple_package_test/src/.clang-format b/pkgs/jnigen/test/simple_package_test/src/.clang-format
new file mode 100644
index 0000000..a256c2f
--- /dev/null
+++ b/pkgs/jnigen/test/simple_package_test/src/.clang-format
@@ -0,0 +1,15 @@
+# From dart SDK: https://github.com/dart-lang/sdk/blob/main/.clang-format
+
+# Defines the Chromium style for automatic reformatting.
+# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+BasedOnStyle: Chromium
+
+# clang-format doesn't seem to do a good job of this for longer comments.
+ReflowComments: 'false'
+
+# We have lots of these. Though we need to put them all in curly braces,
+# clang-format can't do that.
+AllowShortIfStatementsOnASingleLine: 'true'
+
+# Put escaped newlines into the rightmost column.
+AlignEscapedNewlinesLeft: false
diff --git a/pkgs/jnigen/test/simple_package_test/src/dartjni.h b/pkgs/jnigen/test/simple_package_test/src/dartjni.h
index bc72baa..efb9079 100644
--- a/pkgs/jnigen/test/simple_package_test/src/dartjni.h
+++ b/pkgs/jnigen/test/simple_package_test/src/dartjni.h
@@ -89,6 +89,13 @@
   jthrowable exception;
 } JniPointerResult;
 
+/// JniExceptionDetails holds 2 jstring objects, one is the result of
+/// calling `toString` on exception object, other is stack trace;
+typedef struct JniExceptionDetails {
+  jstring message;
+  jstring stacktrace;
+} JniExceptionDetails;
+
 /// This struct contains functions which wrap method call / field access conveniently along with
 /// exception checking.
 ///
@@ -118,6 +125,7 @@
                                 jvalue* args);
   JniResult (*getField)(jobject obj, jfieldID fieldID, int callType);
   JniResult (*getStaticField)(jclass cls, jfieldID fieldID, int callType);
+  JniExceptionDetails (*getExceptionDetails)(jthrowable exception);
 } JniAccessors;
 
 FFI_PLUGIN_EXPORT JniAccessors* GetAccessors();
@@ -240,3 +248,10 @@
     jniEnv = env_getter();
   }
 }
+
+static inline jthrowable check_exception() {
+  jthrowable exception = (*jniEnv)->ExceptionOccurred(jniEnv);
+  if (exception != NULL) (*jniEnv)->ExceptionClear(jniEnv);
+  if (exception == NULL) return NULL;
+  return to_global_ref(exception);
+}
diff --git a/pkgs/jnigen/test/simple_package_test/src/simple_package.c b/pkgs/jnigen/test/simple_package_test/src/simple_package.c
index 3a78ec9..c3f4925 100644
--- a/pkgs/jnigen/test/simple_package_test/src/simple_package.c
+++ b/pkgs/jnigen/test/simple_package_test/src/simple_package.c
@@ -2,240 +2,361 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-
 // Autogenerated by jnigen. DO NOT EDIT!
 
 #include <stdint.h>
-#include "jni.h"
 #include "dartjni.h"
+#include "jni.h"
 
-thread_local JNIEnv *jniEnv;
+thread_local JNIEnv* jniEnv;
 JniContext jni;
 
 JniContext (*context_getter)(void);
-JNIEnv *(*env_getter)(void);
+JNIEnv* (*env_getter)(void);
 
-void setJniGetters(JniContext (*cg)(void),
-        JNIEnv *(*eg)(void)) {
-    context_getter = cg;
-    env_getter = eg;
+void setJniGetters(JniContext (*cg)(void), JNIEnv* (*eg)(void)) {
+  context_getter = cg;
+  env_getter = eg;
 }
 
 // com.github.dart_lang.jnigen.simple_package.Example
-jclass _c_com_github_dart_lang_jnigen_simple_package_Example = NULL;
+jclass _c_Example = NULL;
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example_ctor = NULL;
+jmethodID _m_Example__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_github_dart_lang_jnigen_simple_package_Example_ctor() {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (jobject)0;
-    load_method(_c_com_github_dart_lang_jnigen_simple_package_Example, &_m_com_github_dart_lang_jnigen_simple_package_Example_ctor, "<init>", "()V");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _m_com_github_dart_lang_jnigen_simple_package_Example_ctor);
-    return to_global_ref(_result);
+JniResult Example__ctor() {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example, &_m_Example__ctor, "<init>", "()V");
+  if (_m_Example__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_Example, _m_Example__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example_getAux = NULL;
+jmethodID _m_Example__whichExample = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_github_dart_lang_jnigen_simple_package_Example_getAux() {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (jobject)0;
-    load_static_method(_c_com_github_dart_lang_jnigen_simple_package_Example, &_m_com_github_dart_lang_jnigen_simple_package_Example_getAux, "getAux", "()Lcom/github/dart_lang/jnigen/simple_package/Example$Aux;");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example_getAux == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _m_com_github_dart_lang_jnigen_simple_package_Example_getAux);
-    return to_global_ref(_result);
+JniResult Example__whichExample(jobject self_) {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example, &_m_Example__whichExample, "whichExample", "()I");
+  if (_m_Example__whichExample == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Example__whichExample);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example_addInts = NULL;
+jmethodID _m_Example__getAux = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_github_dart_lang_jnigen_simple_package_Example_addInts(int32_t a, int32_t b) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (int32_t)0;
-    load_static_method(_c_com_github_dart_lang_jnigen_simple_package_Example, &_m_com_github_dart_lang_jnigen_simple_package_Example_addInts, "addInts", "(II)I");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example_addInts == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallStaticIntMethod(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _m_com_github_dart_lang_jnigen_simple_package_Example_addInts, a, b);
-    return _result;
+JniResult Example__getAux() {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(
+      _c_Example, &_m_Example__getAux, "getAux",
+      "()Lcom/github/dart_lang/jnigen/simple_package/Example$Aux;");
+  if (_m_Example__getAux == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallStaticObjectMethod(jniEnv, _c_Example, _m_Example__getAux);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example_getSelf = NULL;
+jmethodID _m_Example__addInts = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_github_dart_lang_jnigen_simple_package_Example_getSelf(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (jobject)0;
-    load_method(_c_com_github_dart_lang_jnigen_simple_package_Example, &_m_com_github_dart_lang_jnigen_simple_package_Example_getSelf, "getSelf", "()Lcom/github/dart_lang/jnigen/simple_package/Example;");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example_getSelf == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_com_github_dart_lang_jnigen_simple_package_Example_getSelf);
-    return to_global_ref(_result);
+JniResult Example__addInts(int32_t a, int32_t b) {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_Example, &_m_Example__addInts, "addInts", "(II)I");
+  if (_m_Example__addInts == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallStaticIntMethod(jniEnv, _c_Example,
+                                                   _m_Example__addInts, a, b);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example_getNum = NULL;
+jmethodID _m_Example__getSelf = NULL;
 FFI_PLUGIN_EXPORT
-int32_t com_github_dart_lang_jnigen_simple_package_Example_getNum(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (int32_t)0;
-    load_method(_c_com_github_dart_lang_jnigen_simple_package_Example, &_m_com_github_dart_lang_jnigen_simple_package_Example_getNum, "getNum", "()I");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example_getNum == NULL) return (int32_t)0;
-    int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_com_github_dart_lang_jnigen_simple_package_Example_getNum);
-    return _result;
+JniResult Example__getSelf(jobject self_) {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example, &_m_Example__getSelf, "getSelf",
+              "()Lcom/github/dart_lang/jnigen/simple_package/Example;");
+  if (_m_Example__getSelf == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->CallObjectMethod(jniEnv, self_, _m_Example__getSelf);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example_setNum = NULL;
+jmethodID _m_Example__getNum = NULL;
 FFI_PLUGIN_EXPORT
-void com_github_dart_lang_jnigen_simple_package_Example_setNum(jobject self_, int32_t num) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (void)0;
-    load_method(_c_com_github_dart_lang_jnigen_simple_package_Example, &_m_com_github_dart_lang_jnigen_simple_package_Example_setNum, "setNum", "(I)V");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example_setNum == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_github_dart_lang_jnigen_simple_package_Example_setNum, num);
+JniResult Example__getNum(jobject self_) {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example, &_m_Example__getNum, "getNum", "()I");
+  if (_m_Example__getNum == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result = (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Example__getNum);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example_throwException = NULL;
+jmethodID _m_Example__setNum = NULL;
 FFI_PLUGIN_EXPORT
-void com_github_dart_lang_jnigen_simple_package_Example_throwException() {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (void)0;
-    load_static_method(_c_com_github_dart_lang_jnigen_simple_package_Example, &_m_com_github_dart_lang_jnigen_simple_package_Example_throwException, "throwException", "()V");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example_throwException == NULL) return (void)0;
-    (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _m_com_github_dart_lang_jnigen_simple_package_Example_throwException);
+JniResult Example__setNum(jobject self_, int32_t num) {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example, &_m_Example__setNum, "setNum", "(I)V");
+  if (_m_Example__setNum == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example__setNum, num);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jfieldID _f_com_github_dart_lang_jnigen_simple_package_Example_aux = NULL;
+jmethodID _m_Example__throwException = NULL;
 FFI_PLUGIN_EXPORT
-jobject get_com_github_dart_lang_jnigen_simple_package_Example_aux() {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (jobject)0;
-    load_static_field(_c_com_github_dart_lang_jnigen_simple_package_Example, &_f_com_github_dart_lang_jnigen_simple_package_Example_aux, "aux","Lcom/github/dart_lang/jnigen/simple_package/Example$Aux;");
-    return to_global_ref((*jniEnv)->GetStaticObjectField(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _f_com_github_dart_lang_jnigen_simple_package_Example_aux));
+JniResult Example__throwException() {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_method(_c_Example, &_m_Example__throwException, "throwException",
+                     "()V");
+  if (_m_Example__throwException == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallStaticVoidMethod(jniEnv, _c_Example,
+                                  _m_Example__throwException);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+}
+
+jfieldID _f_Example__aux = NULL;
+FFI_PLUGIN_EXPORT
+JniResult get_Example__aux() {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_Example, &_f_Example__aux, "aux",
+                    "Lcom/github/dart_lang/jnigen/simple_package/Example$Aux;");
+  jobject _result = to_global_ref(
+      (*jniEnv)->GetStaticObjectField(jniEnv, _c_Example, _f_Example__aux));
+  return (JniResult){.result = {.l = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_com_github_dart_lang_jnigen_simple_package_Example_aux(jobject value) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (void)0;
-    load_static_field(_c_com_github_dart_lang_jnigen_simple_package_Example, &_f_com_github_dart_lang_jnigen_simple_package_Example_aux, "aux","Lcom/github/dart_lang/jnigen/simple_package/Example$Aux;");
-    ((*jniEnv)->SetStaticObjectField(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _f_com_github_dart_lang_jnigen_simple_package_Example_aux, value));
+JniResult set_Example__aux(jobject value) {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_Example, &_f_Example__aux, "aux",
+                    "Lcom/github/dart_lang/jnigen/simple_package/Example$Aux;");
+  (*jniEnv)->SetStaticObjectField(jniEnv, _c_Example, _f_Example__aux, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
-jfieldID _f_com_github_dart_lang_jnigen_simple_package_Example_num = NULL;
+jfieldID _f_Example__num = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_com_github_dart_lang_jnigen_simple_package_Example_num() {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (int32_t)0;
-    load_static_field(_c_com_github_dart_lang_jnigen_simple_package_Example, &_f_com_github_dart_lang_jnigen_simple_package_Example_num, "num","I");
-    return ((*jniEnv)->GetStaticIntField(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _f_com_github_dart_lang_jnigen_simple_package_Example_num));
+JniResult get_Example__num() {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_Example, &_f_Example__num, "num", "I");
+  int32_t _result =
+      (*jniEnv)->GetStaticIntField(jniEnv, _c_Example, _f_Example__num);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_com_github_dart_lang_jnigen_simple_package_Example_num(int32_t value) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example, "com/github/dart_lang/jnigen/simple_package/Example");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example == NULL) return (void)0;
-    load_static_field(_c_com_github_dart_lang_jnigen_simple_package_Example, &_f_com_github_dart_lang_jnigen_simple_package_Example_num, "num","I");
-    ((*jniEnv)->SetStaticIntField(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example, _f_com_github_dart_lang_jnigen_simple_package_Example_num, value));
+JniResult set_Example__num(int32_t value) {
+  load_env();
+  load_class_gr(&_c_Example,
+                "com/github/dart_lang/jnigen/simple_package/Example");
+  if (_c_Example == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_Example, &_f_Example__num, "num", "I");
+  (*jniEnv)->SetStaticIntField(jniEnv, _c_Example, _f_Example__num, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
 // com.github.dart_lang.jnigen.simple_package.Example$Aux
-jclass _c_com_github_dart_lang_jnigen_simple_package_Example__Aux = NULL;
+jclass _c_Example_Aux = NULL;
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example__Aux_ctor = NULL;
+jmethodID _m_Example_Aux__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_github_dart_lang_jnigen_simple_package_Example__Aux_ctor(uint8_t value) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, "com/github/dart_lang/jnigen/simple_package/Example$Aux");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example__Aux == NULL) return (jobject)0;
-    load_method(_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, &_m_com_github_dart_lang_jnigen_simple_package_Example__Aux_ctor, "<init>", "(Z)V");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example__Aux_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_github_dart_lang_jnigen_simple_package_Example__Aux, _m_com_github_dart_lang_jnigen_simple_package_Example__Aux_ctor, value);
-    return to_global_ref(_result);
+JniResult Example_Aux__ctor(uint8_t value) {
+  load_env();
+  load_class_gr(&_c_Example_Aux,
+                "com/github/dart_lang/jnigen/simple_package/Example$Aux");
+  if (_c_Example_Aux == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example_Aux, &_m_Example_Aux__ctor, "<init>", "(Z)V");
+  if (_m_Example_Aux__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_Example_Aux, _m_Example_Aux__ctor, value);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example__Aux_getValue = NULL;
+jmethodID _m_Example_Aux__getValue = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t com_github_dart_lang_jnigen_simple_package_Example__Aux_getValue(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, "com/github/dart_lang/jnigen/simple_package/Example$Aux");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example__Aux == NULL) return (uint8_t)0;
-    load_method(_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, &_m_com_github_dart_lang_jnigen_simple_package_Example__Aux_getValue, "getValue", "()Z");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example__Aux_getValue == NULL) return (uint8_t)0;
-    uint8_t _result = (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_com_github_dart_lang_jnigen_simple_package_Example__Aux_getValue);
-    return _result;
+JniResult Example_Aux__getValue(jobject self_) {
+  load_env();
+  load_class_gr(&_c_Example_Aux,
+                "com/github/dart_lang/jnigen/simple_package/Example$Aux");
+  if (_c_Example_Aux == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example_Aux, &_m_Example_Aux__getValue, "getValue", "()Z");
+  if (_m_Example_Aux__getValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  uint8_t _result =
+      (*jniEnv)->CallBooleanMethod(jniEnv, self_, _m_Example_Aux__getValue);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
-jmethodID _m_com_github_dart_lang_jnigen_simple_package_Example__Aux_setValue = NULL;
+jmethodID _m_Example_Aux__setValue = NULL;
 FFI_PLUGIN_EXPORT
-void com_github_dart_lang_jnigen_simple_package_Example__Aux_setValue(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, "com/github/dart_lang/jnigen/simple_package/Example$Aux");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example__Aux == NULL) return (void)0;
-    load_method(_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, &_m_com_github_dart_lang_jnigen_simple_package_Example__Aux_setValue, "setValue", "(Z)V");
-    if (_m_com_github_dart_lang_jnigen_simple_package_Example__Aux_setValue == NULL) return (void)0;
-    (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_com_github_dart_lang_jnigen_simple_package_Example__Aux_setValue, value);
+JniResult Example_Aux__setValue(jobject self_, uint8_t value) {
+  load_env();
+  load_class_gr(&_c_Example_Aux,
+                "com/github/dart_lang/jnigen/simple_package/Example$Aux");
+  if (_c_Example_Aux == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example_Aux, &_m_Example_Aux__setValue, "setValue", "(Z)V");
+  if (_m_Example_Aux__setValue == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  (*jniEnv)->CallVoidMethod(jniEnv, self_, _m_Example_Aux__setValue, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-jfieldID _f_com_github_dart_lang_jnigen_simple_package_Example__Aux_value = NULL;
+jfieldID _f_Example_Aux__value = NULL;
 FFI_PLUGIN_EXPORT
-uint8_t get_com_github_dart_lang_jnigen_simple_package_Example__Aux_value(jobject self_) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, "com/github/dart_lang/jnigen/simple_package/Example$Aux");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example__Aux == NULL) return (uint8_t)0;
-    load_field(_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, &_f_com_github_dart_lang_jnigen_simple_package_Example__Aux_value, "value","Z");
-    return ((*jniEnv)->GetBooleanField(jniEnv, self_, _f_com_github_dart_lang_jnigen_simple_package_Example__Aux_value));
+JniResult get_Example_Aux__value(jobject self_) {
+  load_env();
+  load_class_gr(&_c_Example_Aux,
+                "com/github/dart_lang/jnigen/simple_package/Example$Aux");
+  if (_c_Example_Aux == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_Example_Aux, &_f_Example_Aux__value, "value", "Z");
+  uint8_t _result =
+      (*jniEnv)->GetBooleanField(jniEnv, self_, _f_Example_Aux__value);
+  return (JniResult){.result = {.z = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_com_github_dart_lang_jnigen_simple_package_Example__Aux_value(jobject self_, uint8_t value) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, "com/github/dart_lang/jnigen/simple_package/Example$Aux");
-    if (_c_com_github_dart_lang_jnigen_simple_package_Example__Aux == NULL) return (void)0;
-    load_field(_c_com_github_dart_lang_jnigen_simple_package_Example__Aux, &_f_com_github_dart_lang_jnigen_simple_package_Example__Aux_value, "value","Z");
-    ((*jniEnv)->SetBooleanField(jniEnv, self_, _f_com_github_dart_lang_jnigen_simple_package_Example__Aux_value, value));
+JniResult set_Example_Aux__value(jobject self_, uint8_t value) {
+  load_env();
+  load_class_gr(&_c_Example_Aux,
+                "com/github/dart_lang/jnigen/simple_package/Example$Aux");
+  if (_c_Example_Aux == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_field(_c_Example_Aux, &_f_Example_Aux__value, "value", "Z");
+  (*jniEnv)->SetBooleanField(jniEnv, self_, _f_Example_Aux__value, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
-
 // com.github.dart_lang.jnigen.pkg2.C2
-jclass _c_com_github_dart_lang_jnigen_pkg2_C2 = NULL;
+jclass _c_C2 = NULL;
 
-jmethodID _m_com_github_dart_lang_jnigen_pkg2_C2_ctor = NULL;
+jmethodID _m_C2__ctor = NULL;
 FFI_PLUGIN_EXPORT
-jobject com_github_dart_lang_jnigen_pkg2_C2_ctor() {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_pkg2_C2, "com/github/dart_lang/jnigen/pkg2/C2");
-    if (_c_com_github_dart_lang_jnigen_pkg2_C2 == NULL) return (jobject)0;
-    load_method(_c_com_github_dart_lang_jnigen_pkg2_C2, &_m_com_github_dart_lang_jnigen_pkg2_C2_ctor, "<init>", "()V");
-    if (_m_com_github_dart_lang_jnigen_pkg2_C2_ctor == NULL) return (jobject)0;
-    jobject _result = (*jniEnv)->NewObject(jniEnv, _c_com_github_dart_lang_jnigen_pkg2_C2, _m_com_github_dart_lang_jnigen_pkg2_C2_ctor);
-    return to_global_ref(_result);
+JniResult C2__ctor() {
+  load_env();
+  load_class_gr(&_c_C2, "com/github/dart_lang/jnigen/pkg2/C2");
+  if (_c_C2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_C2, &_m_C2__ctor, "<init>", "()V");
+  if (_m_C2__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result = (*jniEnv)->NewObject(jniEnv, _c_C2, _m_C2__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
 }
 
-jfieldID _f_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT = NULL;
+jfieldID _f_C2__CONSTANT = NULL;
 FFI_PLUGIN_EXPORT
-int32_t get_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT() {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_pkg2_C2, "com/github/dart_lang/jnigen/pkg2/C2");
-    if (_c_com_github_dart_lang_jnigen_pkg2_C2 == NULL) return (int32_t)0;
-    load_static_field(_c_com_github_dart_lang_jnigen_pkg2_C2, &_f_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT, "CONSTANT","I");
-    return ((*jniEnv)->GetStaticIntField(jniEnv, _c_com_github_dart_lang_jnigen_pkg2_C2, _f_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT));
+JniResult get_C2__CONSTANT() {
+  load_env();
+  load_class_gr(&_c_C2, "com/github/dart_lang/jnigen/pkg2/C2");
+  if (_c_C2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_C2, &_f_C2__CONSTANT, "CONSTANT", "I");
+  int32_t _result =
+      (*jniEnv)->GetStaticIntField(jniEnv, _c_C2, _f_C2__CONSTANT);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
 }
 
 FFI_PLUGIN_EXPORT
-void set_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT(int32_t value) {
-    load_env();
-    load_class_gr(&_c_com_github_dart_lang_jnigen_pkg2_C2, "com/github/dart_lang/jnigen/pkg2/C2");
-    if (_c_com_github_dart_lang_jnigen_pkg2_C2 == NULL) return (void)0;
-    load_static_field(_c_com_github_dart_lang_jnigen_pkg2_C2, &_f_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT, "CONSTANT","I");
-    ((*jniEnv)->SetStaticIntField(jniEnv, _c_com_github_dart_lang_jnigen_pkg2_C2, _f_com_github_dart_lang_jnigen_pkg2_C2_CONSTANT, value));
+JniResult set_C2__CONSTANT(int32_t value) {
+  load_env();
+  load_class_gr(&_c_C2, "com/github/dart_lang/jnigen/pkg2/C2");
+  if (_c_C2 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_static_field(_c_C2, &_f_C2__CONSTANT, "CONSTANT", "I");
+  (*jniEnv)->SetStaticIntField(jniEnv, _c_C2, _f_C2__CONSTANT, value);
+  return (JniResult){.result = {.j = 0}, .exception = check_exception()};
 }
 
+// com.github.dart_lang.jnigen.pkg2.Example
+jclass _c_Example1 = NULL;
 
+jmethodID _m_Example1__ctor = NULL;
+FFI_PLUGIN_EXPORT
+JniResult Example1__ctor() {
+  load_env();
+  load_class_gr(&_c_Example1, "com/github/dart_lang/jnigen/pkg2/Example");
+  if (_c_Example1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example1, &_m_Example1__ctor, "<init>", "()V");
+  if (_m_Example1__ctor == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  jobject _result =
+      (*jniEnv)->NewObject(jniEnv, _c_Example1, _m_Example1__ctor);
+  return (JniResult){.result = {.l = to_global_ref(_result)},
+                     .exception = check_exception()};
+}
+
+jmethodID _m_Example1__whichExample = NULL;
+FFI_PLUGIN_EXPORT
+JniResult Example1__whichExample(jobject self_) {
+  load_env();
+  load_class_gr(&_c_Example1, "com/github/dart_lang/jnigen/pkg2/Example");
+  if (_c_Example1 == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  load_method(_c_Example1, &_m_Example1__whichExample, "whichExample", "()I");
+  if (_m_Example1__whichExample == NULL)
+    return (JniResult){.result = {.j = 0}, .exception = check_exception()};
+  int32_t _result =
+      (*jniEnv)->CallIntMethod(jniEnv, self_, _m_Example1__whichExample);
+  return (JniResult){.result = {.i = _result}, .exception = check_exception()};
+}
diff --git a/pkgs/jnigen/tool/pre_commit_checks.dart b/pkgs/jnigen/tool/pre_commit_checks.dart
index 2c7e966..68d2974 100644
--- a/pkgs/jnigen/tool/pre_commit_checks.dart
+++ b/pkgs/jnigen/tool/pre_commit_checks.dart
@@ -189,7 +189,7 @@
       "-Dc_root=src_temp",
       "-Ddart_root=lib_temp",
     ])
-    ..chainCommand("diff", ["-qr", "lib/third_party/", "lib_temp/"])
+    ..chainCommand("diff", ["-qr", "lib/src/third_party/", "lib_temp/"])
     ..chainCommand("diff", ["-qr", "src/", "src_temp/"])
     ..chainCleanupCommand("rm", ["-r", "lib_temp", "src_temp"]);
   final compareNotificationPluginBindings = Runner(