[jnigen] Pure dart bindings (https://github.com/dart-lang/jnigen/issues/110)
The bindings still need the compiled `dartjni.c` from `package:jni`, but with this approach the native code is constant.
This makes this approach more ideal for generating large libraries.
This approach yields lower performance than using the C bindings.
diff --git a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart
index 0706f8f..9dc7ffb 100644
--- a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart
+++ b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart
@@ -1,13 +1,13 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_import
import "dart:ffi" as ffi;
import "package:jni/internal_helpers_for_jnigen.dart";
diff --git a/pkgs/jnigen/example/notification_plugin/lib/notifications.dart b/pkgs/jnigen/example/notification_plugin/lib/notifications.dart
index 6000af1..2473d8e 100644
--- a/pkgs/jnigen/example/notification_plugin/lib/notifications.dart
+++ b/pkgs/jnigen/example/notification_plugin/lib/notifications.dart
@@ -4,14 +4,14 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_import
import "dart:ffi" as ffi;
import "package:jni/internal_helpers_for_jnigen.dart";
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart
index 8d0f1a1..fb5a3c0 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart
+++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart
@@ -18,14 +18,14 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_import
import "dart:ffi" as ffi;
import "package:jni/internal_helpers_for_jnigen.dart";
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart
index 1b15fe0..ec36c58 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart
+++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart
@@ -18,14 +18,14 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_import
import "dart:ffi" as ffi;
import "package:jni/internal_helpers_for_jnigen.dart";
diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart
index b4ac7ac..36c621e 100644
--- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart
+++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart
@@ -18,14 +18,14 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_import
import "dart:ffi" as ffi;
import "package:jni/internal_helpers_for_jnigen.dart";
diff --git a/pkgs/jnigen/lib/src/bindings/bindings.dart b/pkgs/jnigen/lib/src/bindings/bindings.dart
index 9aa6a08..27bd35e 100644
--- a/pkgs/jnigen/lib/src/bindings/bindings.dart
+++ b/pkgs/jnigen/lib/src/bindings/bindings.dart
@@ -5,4 +5,5 @@
export 'preprocessor.dart';
export 'c_bindings.dart';
export 'dart_bindings.dart';
+export 'pure_dart_bindings.dart';
export 'symbol_resolver.dart';
diff --git a/pkgs/jnigen/lib/src/bindings/common.dart b/pkgs/jnigen/lib/src/bindings/common.dart
index 6945456..05907af 100644
--- a/pkgs/jnigen/lib/src/bindings/common.dart
+++ b/pkgs/jnigen/lib/src/bindings/common.dart
@@ -73,8 +73,8 @@
}
/// Actual arguments passed to native call.
- String actualArgs(Method m) {
- final List<String> args = [if (hasSelfParam(m)) selfPointer];
+ String actualArgs(Method m, {bool addSelf = true}) {
+ final List<String> args = [if (hasSelfParam(m) && addSelf) selfPointer];
for (var param in m.params) {
final paramName = kwRename(param.name);
args.add(toNativeArg(paramName, param.type));
@@ -169,7 +169,7 @@
String getDartLiteral(dynamic value) {
if (value is String) {
// TODO(#31): escape string literal.
- return '"$value"';
+ return '"$value"'.replaceAll('\\', '\\\\');
}
if (value is int || value is double || value is bool) {
return value.toString();
@@ -210,9 +210,12 @@
return [...m.modifiers, declStmt].join(' ');
}
- String toNativeArg(String name, TypeUsage type) {
+ String toNativeArg(String name, TypeUsage type,
+ {bool convertBooleanToInt = true}) {
if (isPrimitive(type)) {
- return type.name == 'boolean' ? '$name ? 1 : 0' : name;
+ return (type.name == 'boolean' && convertBooleanToInt)
+ ? '$name ? 1 : 0'
+ : name;
}
return '$name.$selfPointer';
}
diff --git a/pkgs/jnigen/lib/src/bindings/dart_bindings.dart b/pkgs/jnigen/lib/src/bindings/dart_bindings.dart
index 2ccd5a1..f69dffc 100644
--- a/pkgs/jnigen/lib/src/bindings/dart_bindings.dart
+++ b/pkgs/jnigen/lib/src/bindings/dart_bindings.dart
@@ -198,7 +198,7 @@
'\n'
'final ffi.Pointer<T> Function<T extends ffi.NativeType>(String sym)\n'
'jniLookup = ProtectedJniExtensions.initGeneratedLibrary'
- '("${config.outputConfig.cConfig.libraryName}");'
+ '("${config.outputConfig.cConfig!.libraryName}");'
'\n\n';
static const autoGeneratedNotice = '// Autogenerated by jnigen. '
'DO NOT EDIT!\n\n';
@@ -206,14 +206,14 @@
'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'
- '// ignore_for_file: file_names\n'
- '// ignore_for_file: unused_import\n'
- '// ignore_for_file: non_constant_identifier_names\n'
- '// ignore_for_file: constant_identifier_names\n'
'// ignore_for_file: annotate_overrides\n'
+ '// ignore_for_file: camel_case_types\n'
+ '// ignore_for_file: constant_identifier_names\n'
+ '// ignore_for_file: file_names\n'
'// ignore_for_file: no_leading_underscores_for_local_identifiers\n'
+ '// ignore_for_file: non_constant_identifier_names\n'
'// ignore_for_file: unused_element\n'
+ '// ignore_for_file: unused_import\n'
'\n';
static const preImportBoilerplate =
autoGeneratedNotice + defaultLintSuppressions + defaultImports;
diff --git a/pkgs/jnigen/lib/src/bindings/pure_dart_bindings.dart b/pkgs/jnigen/lib/src/bindings/pure_dart_bindings.dart
new file mode 100644
index 0000000..664d9d9
--- /dev/null
+++ b/pkgs/jnigen/lib/src/bindings/pure_dart_bindings.dart
@@ -0,0 +1,259 @@
+// 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 'package:jnigen/src/elements/elements.dart';
+import 'package:jnigen/src/config/config.dart';
+import 'package:jnigen/src/logging/logging.dart';
+
+import 'symbol_resolver.dart';
+import 'common.dart';
+
+class PureDartBindingsGenerator extends BindingsGenerator {
+ static final indent = BindingsGenerator.indent;
+ static const accessors = 'jniAccessors';
+ static const env = 'jniEnv';
+
+ /// Name for reference in base class.
+ static const selfPointer = BindingsGenerator.selfPointer;
+
+ /// Name of field holding class reference.
+ static const classRef = '_classRef';
+
+ static const ffi = BindingsGenerator.ffi;
+ static const jni = BindingsGenerator.jni;
+
+ static const voidPointer = BindingsGenerator.voidPointer;
+ static const ffiVoidType = BindingsGenerator.ffiVoidType;
+ static const jniObjectType = BindingsGenerator.jniObjectType;
+
+ static final _deleteInstruction = BindingsGenerator.deleteInstruction;
+
+ String escapeDollarSign(String s) => s.replaceAll('\$', '\\\$');
+
+ PureDartBindingsGenerator(this.config);
+ Config config;
+
+ @override
+ String generateBindings(ClassDecl decl, SymbolResolver resolver) {
+ if (!decl.isPreprocessed) {
+ throw StateError(
+ 'Java class declaration ${decl.binaryName} must be preprocessed before'
+ 'being passed to bindings generator');
+ }
+ if (!decl.isIncluded) {
+ return '';
+ }
+ final bindings = _class(decl, resolver);
+ log.fine('generated bindings for class ${decl.binaryName}');
+ return bindings;
+ }
+
+ String _class(ClassDecl decl, SymbolResolver resolver) {
+ final s = StringBuffer();
+
+ s.write('/// from: ${decl.binaryName}\n');
+ s.write(breakDocComment(decl.javadoc, depth: ''));
+ final name = decl.finalName;
+
+ var superName = jniObjectType;
+ if (decl.superclass != null) {
+ superName = resolver
+ .resolve((decl.superclass!.type as DeclaredType).binaryName) ??
+ jniObjectType;
+ }
+ final internalName = escapeDollarSign(getInternalName(decl.binaryName));
+ s.write('class $name extends $superName {\n'
+ ' static final $classRef = $accessors.getClassOf("$internalName");\n'
+ ' $indent$name.fromRef(jni.JObject ref) : super.fromRef(ref);\n'
+ '\n');
+
+ for (var field in decl.fields) {
+ if (!field.isIncluded) continue;
+ try {
+ s.write(_field(decl, field, resolver));
+ s.writeln();
+ } on SkipException catch (e) {
+ log.fine('skip field ${decl.binaryName}#${field.name}: '
+ '${e.message}');
+ }
+ }
+
+ for (var method in decl.methods) {
+ if (!method.isIncluded) {
+ continue;
+ }
+ try {
+ s.write(_method(decl, method, resolver));
+ s.writeln();
+ } on SkipException catch (e) {
+ log.fine('skip field ${decl.binaryName}#${method.name}: '
+ '${e.message}');
+ }
+ }
+ s.write("}\n");
+ return s.toString();
+ }
+
+ @override
+ String toNativeArg(String name, TypeUsage type,
+ {bool convertBooleanToInt = false}) {
+ return super
+ .toNativeArg(name, type, convertBooleanToInt: convertBooleanToInt);
+ }
+
+ @override
+ String toDartResult(String expr, TypeUsage type, String dartType) {
+ if (isPrimitive(type)) {
+ return expr;
+ }
+ return '$dartType.fromRef($expr)';
+ }
+
+ @override
+ String actualArgs(Method m, {bool addSelf = false}) {
+ return super.actualArgs(m, addSelf: addSelf);
+ }
+
+ String _method(ClassDecl c, Method m, SymbolResolver resolver) {
+ final name = m.finalName;
+ final isStatic = isStaticMethod(m);
+ final ifStatic = isStatic ? 'Static' : '';
+ final s = StringBuffer();
+ final mID = '_id_$name';
+ final jniSignature = escapeDollarSign(getJniSignatureForMethod(m));
+
+ s.write('static final $mID = $accessors.get${ifStatic}MethodIDOf('
+ '$classRef, "${m.name}", "$jniSignature");\n');
+
+ // Different logic for constructor and method;
+ // For constructor, we want return type to be new object.
+ final returnType = getDartOuterType(m.returnType, resolver);
+ s.write('$indent/// from: ${getOriginalMethodHeader(m)}\n');
+ if (!isPrimitive(m.returnType) || isCtor(m)) {
+ s.write(_deleteInstruction);
+ }
+ s.write(breakDocComment(m.javadoc));
+ if (isCtor(m)) {
+ final wrapperExpr =
+ '$accessors.newObjectWithArgs($classRef, $mID, [${actualArgs(m)}]).object';
+ final className = c.finalName;
+ final ctorFnName = name == 'ctor' ? className : '$className.$name';
+ s.write('$ctorFnName(${getFormalArgs(m, resolver)}) : '
+ 'super.fromRef($wrapperExpr);\n');
+ return s.toString();
+ }
+
+ s.write(indent);
+ if (isStatic) {
+ s.write('static ');
+ }
+ final selfArgument = isStatic ? classRef : selfPointer;
+ final callType = getCallType(m.returnType);
+ final resultGetter = getResultGetterName(m.returnType);
+ var wrapperExpr = '$accessors.call${ifStatic}MethodWithArgs'
+ '($selfArgument, $mID, $callType, [${actualArgs(m)}])'
+ '.$resultGetter';
+ wrapperExpr = toDartResult(wrapperExpr, m.returnType, returnType);
+ s.write(
+ '$returnType $name(${getFormalArgs(m, resolver)}) => $wrapperExpr;\n');
+ return s.toString();
+ }
+
+ String _field(ClassDecl c, Field f, SymbolResolver resolver) {
+ final name = f.finalName;
+ final isStatic = isStaticField(f);
+ final ifStatic = isStatic ? 'Static' : '';
+ final isFinal = isFinalField(f);
+ final s = StringBuffer();
+ final selfArgument = isStatic ? classRef : selfPointer;
+ final callType = getCallType(f.type);
+ final resultGetter = getResultGetterName(f.type);
+ final outerType = getDartOuterType(f.type, resolver);
+
+ void writeDocs({bool writeDeleteInstruction = true}) {
+ s.write('$indent/// from: ${getOriginalFieldDecl(f)}\n');
+ if (!isPrimitive(f.type) && writeDeleteInstruction) {
+ s.write(_deleteInstruction);
+ }
+ s.write(breakDocComment(f.javadoc));
+ }
+
+ if (isStatic && isFinal && f.defaultValue != null) {
+ writeDocs(writeDeleteInstruction: false);
+ s.write(
+ '${indent}static const $name = ${getDartLiteral(f.defaultValue)};\n');
+ return s.toString();
+ }
+ final jniSignature = escapeDollarSign(getDescriptor(f.type));
+ final fID = '_id_$name';
+ s.write('static final $fID = '
+ '$accessors.get${ifStatic}FieldIDOf(_classRef, '
+ '"${f.name}","$jniSignature");\n');
+ void writeAccessor({bool setter = false}) {
+ writeDocs();
+ s.write(indent);
+ if (isStatic) s.write('static ');
+ if (setter) {
+ final fieldType = getTypeNameAtCallSite(f.type);
+ s.write('set $name($outerType value) => $env.Set$ifStatic'
+ '${fieldType}Field($selfArgument, $fID, '
+ '${toNativeArg("value", f.type, convertBooleanToInt: true)});\n');
+ } else {
+ final outer = getDartOuterType(f.type, resolver);
+ final callExpr =
+ '$accessors.get${ifStatic}Field($selfArgument, $fID, $callType)'
+ '.$resultGetter';
+ final resultExpr = toDartResult(callExpr, f.type, outer);
+ s.write('$outer get $name => $resultExpr;\n');
+ }
+ }
+
+ writeAccessor(setter: false);
+ if (!isFinalField(f)) writeAccessor(setter: true);
+ return s.toString();
+ }
+
+ static const autoGeneratedNotice = '// Autogenerated by jnigen. '
+ 'DO NOT EDIT!\n\n';
+ static const defaultLintSuppressions =
+ '// ignore_for_file: annotate_overrides\n'
+ '// ignore_for_file: camel_case_types\n'
+ '// ignore_for_file: constant_identifier_names\n'
+ '// ignore_for_file: file_names\n'
+ '// ignore_for_file: no_leading_underscores_for_local_identifiers\n'
+ '// ignore_for_file: non_constant_identifier_names\n'
+ '// ignore_for_file: unused_element\n'
+ '// ignore_for_file: unused_field\n'
+ '// ignore_for_file: unused_import\n'
+ '// ignore_for_file: unused_shown_name\n'
+ '\n';
+
+ static const jniImport = 'import "package:jni/jni.dart" as jni;\n\n';
+ static const internalHelpersImport =
+ 'import "package:jni/internal_helpers_for_jnigen.dart";\n\n';
+ static const defaultImports = jniImport + internalHelpersImport;
+
+ static const initialization = 'final jniEnv = jni.Jni.env;\n'
+ 'final jniAccessors = jni.Jni.accessors;\n\n';
+ static String initImport(String initFilePath) =>
+ 'import "$initFilePath" show jniEnv, jniAccessors;\n\n';
+
+ @override
+ String getPostImportBoilerplate([String? initFilePath]) {
+ return (config.outputConfig.dartConfig.structure ==
+ OutputStructure.singleFile)
+ ? initialization
+ : initImport(initFilePath!);
+ }
+
+ @override
+ String getPreImportBoilerplate([String? initFilePath]) {
+ return autoGeneratedNotice + defaultLintSuppressions + defaultImports;
+ }
+
+ @override
+ String getInitFileContents() {
+ return jniImport + initialization;
+ }
+}
diff --git a/pkgs/jnigen/lib/src/config/config.dart b/pkgs/jnigen/lib/src/config/config.dart
index d1b9dca..56e09d0 100644
--- a/pkgs/jnigen/lib/src/config/config.dart
+++ b/pkgs/jnigen/lib/src/config/config.dart
@@ -150,6 +150,16 @@
return _getEnumValueFromString(values, name, defaultVal);
}
+enum BindingsType { cBased, dartOnly }
+
+BindingsType getBindingsType(String? name, BindingsType defaultVal) {
+ const values = {
+ 'c_based': BindingsType.cBased,
+ 'dart_only': BindingsType.dartOnly,
+ };
+ return _getEnumValueFromString(values, name, defaultVal);
+}
+
class CCodeOutputConfig {
CCodeOutputConfig({
required this.path,
@@ -180,8 +190,6 @@
}
class DartCodeOutputConfig {
- // TODO(#90): Support output_structure = single_file | package_structure.
-
DartCodeOutputConfig({
required this.path,
this.structure = OutputStructure.packageStructure,
@@ -204,11 +212,18 @@
}
class OutputConfig {
- // TODO(#60): Add bindings_type = dart_only | c_based.
-
- OutputConfig({required this.cConfig, required this.dartConfig});
+ OutputConfig({
+ this.bindingsType = BindingsType.cBased,
+ this.cConfig,
+ required this.dartConfig,
+ }) {
+ if (bindingsType == BindingsType.cBased && cConfig == null) {
+ throw ArgumentError("C output config must be provided!");
+ }
+ }
+ BindingsType bindingsType;
DartCodeOutputConfig dartConfig;
- CCodeOutputConfig cConfig;
+ CCodeOutputConfig? cConfig;
}
class BindingExclusions {
@@ -363,11 +378,17 @@
fields: regexFilter<Field>(_Props.excludeFields),
),
outputConfig: OutputConfig(
- cConfig: CCodeOutputConfig(
- libraryName: must(prov.getString, '', _Props.libraryName),
- path: Uri.file(must(prov.getString, '.', _Props.cRoot)),
- subdir: prov.getString(_Props.cSubdir),
+ bindingsType: getBindingsType(
+ prov.getString(_Props.bindingsType),
+ BindingsType.cBased,
),
+ cConfig: prov.hasValue(_Props.cCodeOutputConfig)
+ ? CCodeOutputConfig(
+ libraryName: must(prov.getString, '', _Props.libraryName),
+ path: Uri.file(must(prov.getString, '.', _Props.cRoot)),
+ subdir: prov.getString(_Props.cSubdir),
+ )
+ : null,
dartConfig: DartCodeOutputConfig(
path: Uri.file(must(prov.getString, '.', _Props.dartRoot)),
structure: getOutputStructure(
@@ -441,6 +462,7 @@
static const importMap = 'import_map';
static const outputConfig = 'output';
+ static const bindingsType = '$outputConfig.bindings_type';
static const cCodeOutputConfig = '$outputConfig.c';
static const dartCodeOutputConfig = '$outputConfig.dart';
static const cRoot = '$cCodeOutputConfig.path';
diff --git a/pkgs/jnigen/lib/src/writers/bindings_writer.dart b/pkgs/jnigen/lib/src/writers/bindings_writer.dart
index 68bbfcf..1cfd58e 100644
--- a/pkgs/jnigen/lib/src/writers/bindings_writer.dart
+++ b/pkgs/jnigen/lib/src/writers/bindings_writer.dart
@@ -44,13 +44,14 @@
Future<void> writeCBindings(Config config, List<ClassDecl> classes) async {
// write C file and init file
- final cRoot = config.outputConfig.cConfig.path;
+ final cConfig = config.outputConfig.cConfig!;
+ final cRoot = cConfig.path;
final preamble = config.preamble;
log.info("Using c root = $cRoot");
- final libraryName = config.outputConfig.cConfig.libraryName;
+ final libraryName = cConfig.libraryName;
log.info('Creating dart init file ...');
// Create C file
- final subdir = config.outputConfig.cConfig.subdir ?? '.';
+ final subdir = cConfig.subdir ?? '.';
final cFileRelativePath = '$subdir/$libraryName.c';
final cFile = await File.fromUri(cRoot.resolve(cFileRelativePath))
.create(recursive: true);
diff --git a/pkgs/jnigen/lib/src/writers/files_writer.dart b/pkgs/jnigen/lib/src/writers/files_writer.dart
index 3b8964c..81af44f 100644
--- a/pkgs/jnigen/lib/src/writers/files_writer.dart
+++ b/pkgs/jnigen/lib/src/writers/files_writer.dart
@@ -188,6 +188,7 @@
@override
Future<void> writeBindings(List<ClassDecl> classes) async {
+ final cBased = config.outputConfig.bindingsType == BindingsType.cBased;
final preamble = config.preamble;
final Map<String, List<ClassDecl>> files = {};
final Map<String, ClassDecl> classesByName = {};
@@ -200,7 +201,6 @@
files[fileClass]!.add(c);
packages.putIfAbsent(c.packageName, () => {});
- // TODO(PR): Is the order deterministic in Set<T>?
packages[c.packageName]!.add(fileClass.split('.').last);
}
@@ -209,9 +209,13 @@
final dartRoot = config.outputConfig.dartConfig.path;
log.info("Using dart root = $dartRoot");
- final generator = CBasedDartBindingsGenerator(config);
+ final generator = cBased
+ ? CBasedDartBindingsGenerator(config)
+ : PureDartBindingsGenerator(config);
- await writeCBindings(config, classes);
+ if (cBased) {
+ await writeCBindings(config, classes);
+ }
// Write init file
final initFileUri = dartRoot.resolve("_init.dart");
diff --git a/pkgs/jnigen/lib/src/writers/single_file_writer.dart b/pkgs/jnigen/lib/src/writers/single_file_writer.dart
index 2e526aa..d87b373 100644
--- a/pkgs/jnigen/lib/src/writers/single_file_writer.dart
+++ b/pkgs/jnigen/lib/src/writers/single_file_writer.dart
@@ -33,6 +33,7 @@
Config config;
@override
Future<void> writeBindings(List<ClassDecl> classes) async {
+ final cBased = config.outputConfig.bindingsType == BindingsType.cBased;
final preamble = config.preamble;
final Map<String, List<ClassDecl>> packages = {};
final Map<String, ClassDecl> classesByName = {};
@@ -44,8 +45,14 @@
}
ApiPreprocessor.preprocessAll(classesByName, config, renameClasses: true);
- await writeCBindings(config, classes);
- final generator = CBasedDartBindingsGenerator(config);
+
+ if (cBased) {
+ await writeCBindings(config, classes);
+ }
+ log.info("Generating ${cBased ? "C + Dart" : "Pure Dart"} Bindings");
+ final generator = cBased
+ ? CBasedDartBindingsGenerator(config)
+ : PureDartBindingsGenerator(config);
final file = File.fromUri(config.outputConfig.dartConfig.path);
await file.create(recursive: true);
final fileStream = file.openWrite();
@@ -57,6 +64,7 @@
.map((decl) => generator.generateBindings(decl, resolver))
.join("\n");
+ log.info("Writing Dart bindings to file: ${file.path}");
fileStream
..writeln(preamble ?? '')
..writeln(generator.getPreImportBoilerplate())
diff --git a/pkgs/jnigen/test/bindings_test.dart b/pkgs/jnigen/test/bindings_test.dart
index 64ec6ea..cba0af6 100644
--- a/pkgs/jnigen/test/bindings_test.dart
+++ b/pkgs/jnigen/test/bindings_test.dart
@@ -33,8 +33,6 @@
'jni',
'-s',
join(simplePackageTest, 'src'),
- '-s',
- join(jacksonCoreTest, 'third_party', 'src')
]);
final group = join('com', 'github', 'dart_lang', 'jnigen');
await runCommand(
diff --git a/pkgs/jnigen/test/config_test.dart b/pkgs/jnigen/test/config_test.dart
index eb6178e..3dcff1c 100644
--- a/pkgs/jnigen/test/config_test.dart
+++ b/pkgs/jnigen/test/config_test.dart
@@ -21,10 +21,10 @@
/// two fields are not equal.
void expectConfigsAreEqual(Config a, Config b) {
expect(a.classes, equals(b.classes), reason: "classes");
- expect(a.outputConfig.cConfig.libraryName,
- equals(b.outputConfig.cConfig.libraryName),
+ expect(a.outputConfig.cConfig?.libraryName,
+ equals(b.outputConfig.cConfig?.libraryName),
reason: "libraryName");
- expect(a.outputConfig.cConfig.path, equals(b.outputConfig.cConfig.path),
+ expect(a.outputConfig.cConfig?.path, equals(b.outputConfig.cConfig?.path),
reason: "cRoot");
expect(a.outputConfig.dartConfig.path, equals(b.outputConfig.dartConfig.path),
reason: "dartRoot");
diff --git a/pkgs/jnigen/test/jackson_core_test/generate.dart b/pkgs/jnigen/test/jackson_core_test/generate.dart
index c97d72d..37749d5 100644
--- a/pkgs/jnigen/test/jackson_core_test/generate.dart
+++ b/pkgs/jnigen/test/jackson_core_test/generate.dart
@@ -42,10 +42,7 @@
),
preamble: jacksonPreamble,
outputConfig: OutputConfig(
- cConfig: CCodeOutputConfig(
- libraryName: testName,
- path: Uri.directory(join(rootDir, 'src')),
- ),
+ bindingsType: BindingsType.dartOnly,
dartConfig: DartCodeOutputConfig(
path: Uri.directory(join(rootDir, 'lib')),
),
diff --git a/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart b/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart
index 9ed7429..d464b6c 100644
--- a/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart
+++ b/pkgs/jnigen/test/jackson_core_test/generated_files_test.dart
@@ -3,9 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:path/path.dart' hide equals;
-
import 'package:test/test.dart';
+import 'package:jnigen/jnigen.dart';
+
import '../test_util/test_util.dart';
import 'generate.dart';
@@ -26,4 +27,9 @@
final config = getConfig(generateFullVersion: true, useAsm: true);
await generateAndAnalyzeBindings(config);
}, timeout: Timeout(Duration(minutes: 2)));
+ test('Generate and analyze pure dart bindings', () async {
+ final config = getConfig(generateFullVersion: true);
+ config.outputConfig.bindingsType = BindingsType.dartOnly;
+ await generateAndAnalyzeBindings(config);
+ }, timeout: Timeout.factor(2));
}
diff --git a/pkgs/jnigen/test/jackson_core_test/jnigen.yaml b/pkgs/jnigen/test/jackson_core_test/jnigen.yaml
index 2b553fa..1cfeb56 100644
--- a/pkgs/jnigen/test/jackson_core_test/jnigen.yaml
+++ b/pkgs/jnigen/test/jackson_core_test/jnigen.yaml
@@ -5,11 +5,9 @@
jar_dir: test/jackson_core_test/third_party/jar
output:
+ bindings_type: dart_only
dart:
path: test/jackson_core_test/third_party/lib/
- c:
- path: test/jackson_core_test/third_party/src/
- library_name: jackson_core_test
classes:
- 'com.fasterxml.jackson.core.JsonFactory'
@@ -42,3 +40,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+log_level: warning
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/lib/_init.dart b/pkgs/jnigen/test/jackson_core_test/third_party/lib/_init.dart
index 4f96469..7f85005 100644
--- a/pkgs/jnigen/test/jackson_core_test/third_party/lib/_init.dart
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/lib/_init.dart
@@ -15,10 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import "dart:ffi" as ffi;
-import "package:jni/internal_helpers_for_jnigen.dart";
+import "package:jni/jni.dart" as jni;
-// Auto-generated initialization code.
-
-final ffi.Pointer<T> Function<T extends ffi.NativeType>(String sym) jniLookup =
- ProtectedJniExtensions.initGeneratedLibrary("jackson_core_test");
+final jniEnv = jni.Jni.env;
+final jniAccessors = jni.Jni.accessors;
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonFactory.dart b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonFactory.dart
index 0a5547e..ca72d0c 100644
--- a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonFactory.dart
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonFactory.dart
@@ -17,21 +17,23 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_field
+// ignore_for_file: unused_import
+// ignore_for_file: unused_shown_name
-import "dart:ffi" as ffi;
-import "package:jni/internal_helpers_for_jnigen.dart";
import "package:jni/jni.dart" as jni;
+import "package:jni/internal_helpers_for_jnigen.dart";
+
import "JsonParser.dart" as jsonparser_;
-import "../../../../_init.dart" show jniLookup;
+import "../../../../_init.dart" show jniEnv, jniAccessors;
/// from: com.fasterxml.jackson.core.JsonFactory
///
@@ -53,7 +55,9 @@
/// instances.
///@author Tatu Saloranta
class JsonFactory extends jni.JniObject {
- JsonFactory.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+ static final _classRef =
+ jniAccessors.getClassOf("com/fasterxml/jackson/core/JsonFactory");
+ JsonFactory.fromRef(jni.JObject ref) : super.fromRef(ref);
/// from: private static final long serialVersionUID
static const serialVersionUID = 2;
@@ -64,56 +68,58 @@
/// (and returned by \#getFormatName()
static const FORMAT_NAME_JSON = "JSON";
- static final _get_DEFAULT_FACTORY_FEATURE_FLAGS =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "get_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS")
- .asFunction<jni.JniResult Function()>();
+ static final _id_DEFAULT_FACTORY_FEATURE_FLAGS = jniAccessors
+ .getStaticFieldIDOf(_classRef, "DEFAULT_FACTORY_FEATURE_FLAGS", "I");
/// 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().integer;
+ static int get DEFAULT_FACTORY_FEATURE_FLAGS => jniAccessors
+ .getStaticField(
+ _classRef, _id_DEFAULT_FACTORY_FEATURE_FLAGS, jni.JniType.intType)
+ .integer;
- static final _get_DEFAULT_PARSER_FEATURE_FLAGS =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "get_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS")
- .asFunction<jni.JniResult Function()>();
+ static final _id_DEFAULT_PARSER_FEATURE_FLAGS = jniAccessors
+ .getStaticFieldIDOf(_classRef, "DEFAULT_PARSER_FEATURE_FLAGS", "I");
/// 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().integer;
+ static int get DEFAULT_PARSER_FEATURE_FLAGS => jniAccessors
+ .getStaticField(
+ _classRef, _id_DEFAULT_PARSER_FEATURE_FLAGS, jni.JniType.intType)
+ .integer;
- static final _get_DEFAULT_GENERATOR_FEATURE_FLAGS =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "get_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS")
- .asFunction<jni.JniResult Function()>();
+ static final _id_DEFAULT_GENERATOR_FEATURE_FLAGS = jniAccessors
+ .getStaticFieldIDOf(_classRef, "DEFAULT_GENERATOR_FEATURE_FLAGS", "I");
/// 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().integer;
+ static int get DEFAULT_GENERATOR_FEATURE_FLAGS => jniAccessors
+ .getStaticField(
+ _classRef, _id_DEFAULT_GENERATOR_FEATURE_FLAGS, jni.JniType.intType)
+ .integer;
- static final _get_DEFAULT_ROOT_VALUE_SEPARATOR =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "get_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR")
- .asFunction<jni.JniResult Function()>();
+ static final _id_DEFAULT_ROOT_VALUE_SEPARATOR =
+ jniAccessors.getStaticFieldIDOf(_classRef, "DEFAULT_ROOT_VALUE_SEPARATOR",
+ "Lcom/fasterxml/jackson/core/SerializableString;");
/// 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().object);
+ jni.JniObject.fromRef(jniAccessors
+ .getStaticField(_classRef, _id_DEFAULT_ROOT_VALUE_SEPARATOR,
+ jni.JniType.objectType)
+ .object);
- static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonFactory__ctor")
- .asFunction<jni.JniResult Function()>();
+ static final _id_ctor =
+ jniAccessors.getMethodIDOf(_classRef, "<init>", "()V");
/// from: public void <init>()
+ /// The returned object must be deleted after use, by calling the `delete` method.
///
/// Default constructor used to create factory instances.
/// Creation of a factory instance is a light-weight operation,
@@ -123,56 +129,51 @@
/// processing objects (such as symbol tables parsers use)
/// and this reuse only works within context of a single
/// factory instance.
- JsonFactory() : super.fromRef(_ctor().object);
+ JsonFactory()
+ : super.fromRef(
+ jniAccessors.newObjectWithArgs(_classRef, _id_ctor, []).object);
- static final _ctor1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__ctor1")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_ctor1 = jniAccessors.getMethodIDOf(
+ _classRef, "<init>", "(Lcom/fasterxml/jackson/core/ObjectCodec;)V");
/// from: public void <init>(com.fasterxml.jackson.core.ObjectCodec oc)
+ /// The returned object must be deleted after use, by calling the `delete` method.
JsonFactory.ctor1(jni.JniObject oc)
- : super.fromRef(_ctor1(oc.reference).object);
+ : super.fromRef(jniAccessors
+ .newObjectWithArgs(_classRef, _id_ctor1, [oc.reference]).object);
- static final _ctor2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__ctor2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_ctor2 = jniAccessors.getMethodIDOf(_classRef, "<init>",
+ "(Lcom/fasterxml/jackson/core/JsonFactory;Lcom/fasterxml/jackson/core/ObjectCodec;)V");
/// from: protected void <init>(com.fasterxml.jackson.core.JsonFactory src, com.fasterxml.jackson.core.ObjectCodec codec)
+ /// The returned object must be deleted after use, by calling the `delete` method.
///
/// Constructor used when copy()ing a factory instance.
///@param src Original factory to copy settings from
///@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).object);
+ : super.fromRef(jniAccessors.newObjectWithArgs(
+ _classRef, _id_ctor2, [src.reference, codec.reference]).object);
- static final _ctor3 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__ctor3")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_ctor3 = jniAccessors.getMethodIDOf(_classRef, "<init>",
+ "(Lcom/fasterxml/jackson/core/JsonFactoryBuilder;)V");
/// from: public void <init>(com.fasterxml.jackson.core.JsonFactoryBuilder b)
+ /// The returned object must be deleted after use, by calling the `delete` method.
///
/// 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).object);
+ : super.fromRef(jniAccessors
+ .newObjectWithArgs(_classRef, _id_ctor3, [b.reference]).object);
- static final _ctor4 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__ctor4")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_ctor4 = jniAccessors.getMethodIDOf(
+ _classRef, "<init>", "(Lcom/fasterxml/jackson/core/TSFBuilder;Z)V");
/// from: protected void <init>(com.fasterxml.jackson.core.TSFBuilder<?,?> b, boolean bogus)
+ /// The returned object must be deleted after use, by calling the `delete` method.
///
/// Constructor for subtypes; needed to work around the fact that before 3.0,
/// this factory has cumbersome dual role as generic type as well as actual
@@ -180,13 +181,11 @@
///@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).object);
+ : super.fromRef(jniAccessors.newObjectWithArgs(
+ _classRef, _id_ctor4, [b.reference, bogus]).object);
- static final _rebuild = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__rebuild")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_rebuild = jniAccessors.getMethodIDOf(
+ _classRef, "rebuild", "()Lcom/fasterxml/jackson/core/TSFBuilder;");
/// from: public com.fasterxml.jackson.core.TSFBuilder<?,?> rebuild()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -195,12 +194,12 @@
/// with settings of this factory.
///@return Builder instance to use
///@since 2.10
- jni.JniObject rebuild() => jni.JniObject.fromRef(_rebuild(reference).object);
+ jni.JniObject rebuild() =>
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_rebuild, jni.JniType.objectType, []).object);
- static final _builder =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonFactory__builder")
- .asFunction<jni.JniResult Function()>();
+ static final _id_builder = jniAccessors.getStaticMethodIDOf(
+ _classRef, "builder", "()Lcom/fasterxml/jackson/core/TSFBuilder;");
/// from: static public com.fasterxml.jackson.core.TSFBuilder<?,?> builder()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -213,13 +212,12 @@
/// 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() => jni.JniObject.fromRef(_builder().object);
+ static jni.JniObject builder() =>
+ jni.JniObject.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef, _id_builder, jni.JniType.objectType, []).object);
- static final _copy = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__copy")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_copy = jniAccessors.getMethodIDOf(
+ _classRef, "copy", "()Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory copy()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -236,13 +234,11 @@
/// set codec after making the copy.
///@return Copy of this factory instance
///@since 2.1
- JsonFactory copy() => JsonFactory.fromRef(_copy(reference).object);
+ JsonFactory copy() => JsonFactory.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_copy, jni.JniType.objectType, []).object);
- static final _readResolve = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__readResolve")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_readResolve = jniAccessors.getMethodIDOf(
+ _classRef, "readResolve", "()Ljava/lang/Object;");
/// from: protected java.lang.Object readResolve()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -254,13 +250,11 @@
/// Note: must be overridden by sub-classes as well.
///@return Newly constructed instance
jni.JniObject readResolve() =>
- jni.JniObject.fromRef(_readResolve(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_readResolve, jni.JniType.objectType, []).object);
- static final _requiresPropertyOrdering = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory__requiresPropertyOrdering")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_requiresPropertyOrdering =
+ jniAccessors.getMethodIDOf(_classRef, "requiresPropertyOrdering", "()Z");
/// from: public boolean requiresPropertyOrdering()
///
@@ -278,14 +272,11 @@
///@return Whether format supported by this factory
/// requires Object properties to be ordered.
///@since 2.3
- bool requiresPropertyOrdering() =>
- _requiresPropertyOrdering(reference).boolean;
+ bool requiresPropertyOrdering() => jniAccessors.callMethodWithArgs(reference,
+ _id_requiresPropertyOrdering, jni.JniType.booleanType, []).boolean;
- static final _canHandleBinaryNatively = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory__canHandleBinaryNatively")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_canHandleBinaryNatively =
+ jniAccessors.getMethodIDOf(_classRef, "canHandleBinaryNatively", "()Z");
/// from: public boolean canHandleBinaryNatively()
///
@@ -300,13 +291,11 @@
///@return Whether format supported by this factory
/// supports native binary content
///@since 2.3
- bool canHandleBinaryNatively() => _canHandleBinaryNatively(reference).boolean;
+ bool canHandleBinaryNatively() => jniAccessors.callMethodWithArgs(reference,
+ _id_canHandleBinaryNatively, jni.JniType.booleanType, []).boolean;
- static final _canUseCharArrays = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__canUseCharArrays")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_canUseCharArrays =
+ jniAccessors.getMethodIDOf(_classRef, "canUseCharArrays", "()Z");
/// from: public boolean canUseCharArrays()
///
@@ -321,13 +310,11 @@
///@return Whether access to decoded textual content can be efficiently
/// accessed using parser method {@code getTextCharacters()}.
///@since 2.4
- bool canUseCharArrays() => _canUseCharArrays(reference).boolean;
+ bool canUseCharArrays() => jniAccessors.callMethodWithArgs(
+ reference, _id_canUseCharArrays, jni.JniType.booleanType, []).boolean;
- static final _canParseAsync = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__canParseAsync")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_canParseAsync =
+ jniAccessors.getMethodIDOf(_classRef, "canParseAsync", "()Z");
/// from: public boolean canParseAsync()
///
@@ -338,37 +325,29 @@
///@return Whether this factory supports non-blocking ("async") parsing or
/// not (and consequently whether {@code createNonBlockingXxx()} method(s) work)
///@since 2.9
- bool canParseAsync() => _canParseAsync(reference).boolean;
+ bool canParseAsync() => jniAccessors.callMethodWithArgs(
+ reference, _id_canParseAsync, jni.JniType.booleanType, []).boolean;
- static final _getFormatReadFeatureType = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory__getFormatReadFeatureType")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFormatReadFeatureType = jniAccessors.getMethodIDOf(
+ _classRef, "getFormatReadFeatureType", "()Ljava/lang/Class;");
/// 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() =>
- jni.JniObject.fromRef(_getFormatReadFeatureType(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getFormatReadFeatureType, jni.JniType.objectType, []).object);
- static final _getFormatWriteFeatureType = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory__getFormatWriteFeatureType")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFormatWriteFeatureType = jniAccessors.getMethodIDOf(
+ _classRef, "getFormatWriteFeatureType", "()Ljava/lang/Class;");
/// 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() =>
- jni.JniObject.fromRef(_getFormatWriteFeatureType(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getFormatWriteFeatureType, jni.JniType.objectType, []).object);
- static final _canUseSchema = jniLookup<
- 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>)>();
+ static final _id_canUseSchema = jniAccessors.getMethodIDOf(_classRef,
+ "canUseSchema", "(Lcom/fasterxml/jackson/core/FormatSchema;)Z");
/// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
///
@@ -381,14 +360,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) =>
- _canUseSchema(reference, schema.reference).boolean;
+ bool canUseSchema(jni.JniObject schema) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_canUseSchema,
+ jni.JniType.booleanType,
+ [schema.reference]).boolean;
- static final _getFormatName = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getFormatName")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFormatName = jniAccessors.getMethodIDOf(
+ _classRef, "getFormatName", "()Ljava/lang/String;");
/// from: public java.lang.String getFormatName()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -400,26 +379,22 @@
/// implementation will return null for all sub-classes
///@return Name of the format handled by parsers, generators this factory creates
jni.JniString getFormatName() =>
- jni.JniString.fromRef(_getFormatName(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getFormatName, jni.JniType.objectType, []).object);
- static final _hasFormat = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__hasFormat")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_hasFormat = jniAccessors.getMethodIDOf(
+ _classRef,
+ "hasFormat",
+ "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/fasterxml/jackson/core/format/MatchStrength;");
/// 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) =>
- jni.JniObject.fromRef(_hasFormat(reference, acc.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_hasFormat, jni.JniType.objectType, [acc.reference]).object);
- static final _requiresCustomCodec = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__requiresCustomCodec")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_requiresCustomCodec =
+ jniAccessors.getMethodIDOf(_classRef, "requiresCustomCodec", "()Z");
/// from: public boolean requiresCustomCodec()
///
@@ -432,38 +407,33 @@
/// generators created by this factory; false if a general
/// ObjectCodec is enough
///@since 2.1
- bool requiresCustomCodec() => _requiresCustomCodec(reference).boolean;
+ bool requiresCustomCodec() => jniAccessors.callMethodWithArgs(
+ reference, _id_requiresCustomCodec, jni.JniType.booleanType, []).boolean;
- static final _hasJSONFormat = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__hasJSONFormat")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_hasJSONFormat = jniAccessors.getMethodIDOf(
+ _classRef,
+ "hasJSONFormat",
+ "(Lcom/fasterxml/jackson/core/format/InputAccessor;)Lcom/fasterxml/jackson/core/format/MatchStrength;");
/// 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) =>
- jni.JniObject.fromRef(_hasJSONFormat(reference, acc.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_hasJSONFormat, jni.JniType.objectType, [acc.reference]).object);
- static final _version = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__version")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_version = jniAccessors.getMethodIDOf(
+ _classRef, "version", "()Lcom/fasterxml/jackson/core/Version;");
/// from: public com.fasterxml.jackson.core.Version version()
/// The returned object must be deleted after use, by calling the `delete` method.
- jni.JniObject version() => jni.JniObject.fromRef(_version(reference).object);
+ jni.JniObject version() =>
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_version, jni.JniType.objectType, []).object);
- static final _configure = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__configure")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
+ static final _id_configure = jniAccessors.getMethodIDOf(
+ _classRef,
+ "configure",
+ "(Lcom/fasterxml/jackson/core/JsonFactory\$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonFactory.Feature f, boolean state)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -475,16 +445,11 @@
///@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) =>
- JsonFactory.fromRef(
- _configure(reference, f.reference, state ? 1 : 0).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_configure, jni.JniType.objectType, [f.reference, state]).object);
- static final _enable = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__enable")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_enable = jniAccessors.getMethodIDOf(_classRef, "enable",
+ "(Lcom/fasterxml/jackson/core/JsonFactory\$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonFactory.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -495,15 +460,11 @@
///@return This factory instance (to allow call chaining)
///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead
JsonFactory enable(JsonFactory_Feature f) =>
- JsonFactory.fromRef(_enable(reference, f.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_enable, jni.JniType.objectType, [f.reference]).object);
- static final _disable = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__disable")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_disable = jniAccessors.getMethodIDOf(_classRef, "disable",
+ "(Lcom/fasterxml/jackson/core/JsonFactory\$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonFactory.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -514,68 +475,52 @@
///@return This factory instance (to allow call chaining)
///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead
JsonFactory disable(JsonFactory_Feature f) =>
- JsonFactory.fromRef(_disable(reference, f.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_disable, jni.JniType.objectType, [f.reference]).object);
- static final _isEnabled = jniLookup<
- 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>)>();
+ static final _id_isEnabled = jniAccessors.getMethodIDOf(_classRef,
+ "isEnabled", "(Lcom/fasterxml/jackson/core/JsonFactory\$Feature;)Z");
/// 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) =>
- _isEnabled(reference, f.reference).boolean;
+ bool isEnabled(JsonFactory_Feature f) => jniAccessors.callMethodWithArgs(
+ reference, _id_isEnabled, jni.JniType.booleanType, [f.reference]).boolean;
- static final _getParserFeatures = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getParserFeatures")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getParserFeatures =
+ jniAccessors.getMethodIDOf(_classRef, "getParserFeatures", "()I");
/// from: public final int getParserFeatures()
- int getParserFeatures() => _getParserFeatures(reference).integer;
+ int getParserFeatures() => jniAccessors.callMethodWithArgs(
+ reference, _id_getParserFeatures, jni.JniType.intType, []).integer;
- static final _getGeneratorFeatures = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getGeneratorFeatures")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getGeneratorFeatures =
+ jniAccessors.getMethodIDOf(_classRef, "getGeneratorFeatures", "()I");
/// from: public final int getGeneratorFeatures()
- int getGeneratorFeatures() => _getGeneratorFeatures(reference).integer;
+ int getGeneratorFeatures() => jniAccessors.callMethodWithArgs(
+ reference, _id_getGeneratorFeatures, jni.JniType.intType, []).integer;
- static final _getFormatParserFeatures = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory__getFormatParserFeatures")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFormatParserFeatures =
+ jniAccessors.getMethodIDOf(_classRef, "getFormatParserFeatures", "()I");
/// from: public int getFormatParserFeatures()
- int getFormatParserFeatures() => _getFormatParserFeatures(reference).integer;
+ int getFormatParserFeatures() => jniAccessors.callMethodWithArgs(
+ reference, _id_getFormatParserFeatures, jni.JniType.intType, []).integer;
- static final _getFormatGeneratorFeatures = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory__getFormatGeneratorFeatures")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFormatGeneratorFeatures = jniAccessors.getMethodIDOf(
+ _classRef, "getFormatGeneratorFeatures", "()I");
/// from: public int getFormatGeneratorFeatures()
- int getFormatGeneratorFeatures() =>
- _getFormatGeneratorFeatures(reference).integer;
+ int getFormatGeneratorFeatures() => jniAccessors.callMethodWithArgs(reference,
+ _id_getFormatGeneratorFeatures, jni.JniType.intType, []).integer;
- static final _configure1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__configure1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
+ static final _id_configure1 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "configure",
+ "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -586,16 +531,11 @@
///@param state Whether to enable or disable the feature
///@return This factory instance (to allow call chaining)
JsonFactory configure1(jsonparser_.JsonParser_Feature f, bool state) =>
- JsonFactory.fromRef(
- _configure1(reference, f.reference, state ? 1 : 0).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_configure1, jni.JniType.objectType, [f.reference, state]).object);
- static final _enable1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__enable1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_enable1 = jniAccessors.getMethodIDOf(_classRef, "enable",
+ "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonParser.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -605,15 +545,11 @@
///@param f Feature to enable
///@return This factory instance (to allow call chaining)
JsonFactory enable1(jsonparser_.JsonParser_Feature f) =>
- JsonFactory.fromRef(_enable1(reference, f.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_enable1, jni.JniType.objectType, [f.reference]).object);
- static final _disable1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__disable1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_disable1 = jniAccessors.getMethodIDOf(_classRef, "disable",
+ "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonParser.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -623,15 +559,11 @@
///@param f Feature to disable
///@return This factory instance (to allow call chaining)
JsonFactory disable1(jsonparser_.JsonParser_Feature f) =>
- JsonFactory.fromRef(_disable1(reference, f.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_disable1, jni.JniType.objectType, [f.reference]).object);
- static final _isEnabled1 = jniLookup<
- 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>)>();
+ static final _id_isEnabled1 = jniAccessors.getMethodIDOf(_classRef,
+ "isEnabled", "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;)Z");
/// from: public final boolean isEnabled(com.fasterxml.jackson.core.JsonParser.Feature f)
///
@@ -639,15 +571,11 @@
///@param f Feature to check
///@return True if specified feature is enabled
bool isEnabled1(jsonparser_.JsonParser_Feature f) =>
- _isEnabled1(reference, f.reference).boolean;
+ jniAccessors.callMethodWithArgs(reference, _id_isEnabled1,
+ jni.JniType.booleanType, [f.reference]).boolean;
- static final _isEnabled2 = jniLookup<
- 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>)>();
+ static final _id_isEnabled2 = jniAccessors.getMethodIDOf(_classRef,
+ "isEnabled", "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z");
/// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f)
///
@@ -655,14 +583,11 @@
///@param f Feature to check
///@return True if specified feature is enabled
///@since 2.10
- bool isEnabled2(jni.JniObject f) =>
- _isEnabled2(reference, f.reference).boolean;
+ bool isEnabled2(jni.JniObject f) => jniAccessors.callMethodWithArgs(reference,
+ _id_isEnabled2, jni.JniType.booleanType, [f.reference]).boolean;
- static final _getInputDecorator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getInputDecorator")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getInputDecorator = jniAccessors.getMethodIDOf(_classRef,
+ "getInputDecorator", "()Lcom/fasterxml/jackson/core/io/InputDecorator;");
/// from: public com.fasterxml.jackson.core.io.InputDecorator getInputDecorator()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -671,15 +596,13 @@
/// there is no default decorator).
///@return InputDecorator configured, if any
jni.JniObject getInputDecorator() =>
- jni.JniObject.fromRef(_getInputDecorator(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getInputDecorator, jni.JniType.objectType, []).object);
- static final _setInputDecorator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__setInputDecorator")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setInputDecorator = jniAccessors.getMethodIDOf(
+ _classRef,
+ "setInputDecorator",
+ "(Lcom/fasterxml/jackson/core/io/InputDecorator;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory setInputDecorator(com.fasterxml.jackson.core.io.InputDecorator d)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -689,15 +612,13 @@
///@return This factory instance (to allow call chaining)
///@deprecated Since 2.10 use JsonFactoryBuilder\#inputDecorator(InputDecorator) instead
JsonFactory setInputDecorator(jni.JniObject d) =>
- JsonFactory.fromRef(_setInputDecorator(reference, d.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_setInputDecorator, jni.JniType.objectType, [d.reference]).object);
- static final _configure2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonFactory__configure2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
+ static final _id_configure2 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "configure",
+ "(Lcom/fasterxml/jackson/core/JsonGenerator\$Feature;Z)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public final com.fasterxml.jackson.core.JsonFactory configure(com.fasterxml.jackson.core.JsonGenerator.Feature f, boolean state)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -707,16 +628,12 @@
///@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) => JsonFactory.fromRef(
- _configure2(reference, f.reference, state ? 1 : 0).object);
+ JsonFactory configure2(jni.JniObject f, bool state) =>
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_configure2, jni.JniType.objectType, [f.reference, state]).object);
- static final _enable2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__enable2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_enable2 = jniAccessors.getMethodIDOf(_classRef, "enable",
+ "(Lcom/fasterxml/jackson/core/JsonGenerator\$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory enable(com.fasterxml.jackson.core.JsonGenerator.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -726,15 +643,11 @@
///@param f Feature to enable
///@return This factory instance (to allow call chaining)
JsonFactory enable2(jni.JniObject f) =>
- JsonFactory.fromRef(_enable2(reference, f.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_enable2, jni.JniType.objectType, [f.reference]).object);
- static final _disable2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__disable2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_disable2 = jniAccessors.getMethodIDOf(_classRef, "disable",
+ "(Lcom/fasterxml/jackson/core/JsonGenerator\$Feature;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory disable(com.fasterxml.jackson.core.JsonGenerator.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -744,31 +657,22 @@
///@param f Feature to disable
///@return This factory instance (to allow call chaining)
JsonFactory disable2(jni.JniObject f) =>
- JsonFactory.fromRef(_disable2(reference, f.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_disable2, jni.JniType.objectType, [f.reference]).object);
- static final _isEnabled3 = jniLookup<
- 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>)>();
+ static final _id_isEnabled3 = jniAccessors.getMethodIDOf(_classRef,
+ "isEnabled", "(Lcom/fasterxml/jackson/core/JsonGenerator\$Feature;)Z");
/// 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) =>
- _isEnabled3(reference, f.reference).boolean;
+ bool isEnabled3(jni.JniObject f) => jniAccessors.callMethodWithArgs(reference,
+ _id_isEnabled3, jni.JniType.booleanType, [f.reference]).boolean;
- static final _isEnabled4 = jniLookup<
- 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>)>();
+ static final _id_isEnabled4 = jniAccessors.getMethodIDOf(_classRef,
+ "isEnabled", "(Lcom/fasterxml/jackson/core/StreamWriteFeature;)Z");
/// from: public final boolean isEnabled(com.fasterxml.jackson.core.StreamWriteFeature f)
///
@@ -776,14 +680,13 @@
///@param f Feature to check
///@return Whether specified feature is enabled
///@since 2.10
- bool isEnabled4(jni.JniObject f) =>
- _isEnabled4(reference, f.reference).boolean;
+ bool isEnabled4(jni.JniObject f) => jniAccessors.callMethodWithArgs(reference,
+ _id_isEnabled4, jni.JniType.booleanType, [f.reference]).boolean;
- static final _getCharacterEscapes = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getCharacterEscapes")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCharacterEscapes = jniAccessors.getMethodIDOf(
+ _classRef,
+ "getCharacterEscapes",
+ "()Lcom/fasterxml/jackson/core/io/CharacterEscapes;");
/// from: public com.fasterxml.jackson.core.io.CharacterEscapes getCharacterEscapes()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -792,15 +695,13 @@
/// it creates.
///@return Configured {@code CharacterEscapes}, if any; {@code null} if none
jni.JniObject getCharacterEscapes() =>
- jni.JniObject.fromRef(_getCharacterEscapes(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getCharacterEscapes, jni.JniType.objectType, []).object);
- static final _setCharacterEscapes = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__setCharacterEscapes")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setCharacterEscapes = jniAccessors.getMethodIDOf(
+ _classRef,
+ "setCharacterEscapes",
+ "(Lcom/fasterxml/jackson/core/io/CharacterEscapes;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory setCharacterEscapes(com.fasterxml.jackson.core.io.CharacterEscapes esc)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -809,14 +710,17 @@
/// 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) => JsonFactory.fromRef(
- _setCharacterEscapes(reference, esc.reference).object);
+ JsonFactory setCharacterEscapes(jni.JniObject esc) =>
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_setCharacterEscapes,
+ jni.JniType.objectType,
+ [esc.reference]).object);
- static final _getOutputDecorator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getOutputDecorator")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getOutputDecorator = jniAccessors.getMethodIDOf(
+ _classRef,
+ "getOutputDecorator",
+ "()Lcom/fasterxml/jackson/core/io/OutputDecorator;");
/// from: public com.fasterxml.jackson.core.io.OutputDecorator getOutputDecorator()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -826,15 +730,13 @@
///@return OutputDecorator configured for generators factory creates, if any;
/// {@code null} if none.
jni.JniObject getOutputDecorator() =>
- jni.JniObject.fromRef(_getOutputDecorator(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getOutputDecorator, jni.JniType.objectType, []).object);
- static final _setOutputDecorator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__setOutputDecorator")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setOutputDecorator = jniAccessors.getMethodIDOf(
+ _classRef,
+ "setOutputDecorator",
+ "(Lcom/fasterxml/jackson/core/io/OutputDecorator;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory setOutputDecorator(com.fasterxml.jackson.core.io.OutputDecorator d)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -844,15 +746,16 @@
///@param d Output decorator to use, if any
///@deprecated Since 2.10 use JsonFactoryBuilder\#outputDecorator(OutputDecorator) instead
JsonFactory setOutputDecorator(jni.JniObject d) =>
- JsonFactory.fromRef(_setOutputDecorator(reference, d.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_setOutputDecorator,
+ jni.JniType.objectType,
+ [d.reference]).object);
- static final _setRootValueSeparator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__setRootValueSeparator")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setRootValueSeparator = jniAccessors.getMethodIDOf(
+ _classRef,
+ "setRootValueSeparator",
+ "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory setRootValueSeparator(java.lang.String sep)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -862,29 +765,26 @@
///@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) => JsonFactory.fromRef(
- _setRootValueSeparator(reference, sep.reference).object);
+ JsonFactory setRootValueSeparator(jni.JniString sep) =>
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_setRootValueSeparator,
+ jni.JniType.objectType,
+ [sep.reference]).object);
- static final _getRootValueSeparator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getRootValueSeparator")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getRootValueSeparator = jniAccessors.getMethodIDOf(
+ _classRef, "getRootValueSeparator", "()Ljava/lang/String;");
/// 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() =>
- jni.JniString.fromRef(_getRootValueSeparator(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getRootValueSeparator, jni.JniType.objectType, []).object);
- static final _setCodec = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__setCodec")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setCodec = jniAccessors.getMethodIDOf(_classRef, "setCodec",
+ "(Lcom/fasterxml/jackson/core/ObjectCodec;)Lcom/fasterxml/jackson/core/JsonFactory;");
/// from: public com.fasterxml.jackson.core.JsonFactory setCodec(com.fasterxml.jackson.core.ObjectCodec oc)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -897,26 +797,22 @@
///@param oc Codec to use
///@return This factory instance (to allow call chaining)
JsonFactory setCodec(jni.JniObject oc) =>
- JsonFactory.fromRef(_setCodec(reference, oc.reference).object);
+ JsonFactory.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_setCodec, jni.JniType.objectType, [oc.reference]).object);
- static final _getCodec = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory__getCodec")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCodec = jniAccessors.getMethodIDOf(
+ _classRef, "getCodec", "()Lcom/fasterxml/jackson/core/ObjectCodec;");
/// from: public com.fasterxml.jackson.core.ObjectCodec getCodec()
/// The returned object must be deleted after use, by calling the `delete` method.
jni.JniObject getCodec() =>
- jni.JniObject.fromRef(_getCodec(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getCodec, jni.JniType.objectType, []).object);
- static final _createParser = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createParser",
+ "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.File f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -938,16 +834,13 @@
///@param f File that contains JSON content to parse
///@since 2.1
jsonparser_.JsonParser createParser(jni.JniObject f) =>
- jsonparser_.JsonParser.fromRef(
- _createParser(reference, f.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createParser, jni.JniType.objectType, [f.reference]).object);
- static final _createParser1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser1 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createParser",
+ "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(java.net.URL url)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -967,16 +860,13 @@
///@param url URL pointing to resource that contains JSON content to parse
///@since 2.1
jsonparser_.JsonParser createParser1(jni.JniObject url) =>
- jsonparser_.JsonParser.fromRef(
- _createParser1(reference, url.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createParser1, jni.JniType.objectType, [url.reference]).object);
- static final _createParser2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser2 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createParser",
+ "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.InputStream in)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -999,16 +889,13 @@
///@param in InputStream to use for reading JSON content to parse
///@since 2.1
jsonparser_.JsonParser createParser2(jni.JniObject in0) =>
- jsonparser_.JsonParser.fromRef(
- _createParser2(reference, in0.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createParser2, jni.JniType.objectType, [in0.reference]).object);
- static final _createParser3 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser3")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser3 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createParser",
+ "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.Reader r)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1024,16 +911,11 @@
///@param r Reader to use for reading JSON content to parse
///@since 2.1
jsonparser_.JsonParser createParser3(jni.JniObject r) =>
- jsonparser_.JsonParser.fromRef(
- _createParser3(reference, r.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createParser3, jni.JniType.objectType, [r.reference]).object);
- static final _createParser4 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser4")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser4 = jniAccessors.getMethodIDOf(
+ _classRef, "createParser", "([B)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1042,19 +924,11 @@
/// the contents of given byte array.
///@since 2.1
jsonparser_.JsonParser createParser4(jni.JniObject data) =>
- jsonparser_.JsonParser.fromRef(
- _createParser4(reference, data.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createParser4, jni.JniType.objectType, [data.reference]).object);
- static final _createParser5 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Int32,
- ffi.Int32)>>("JsonFactory__createParser5")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
+ static final _id_createParser5 = jniAccessors.getMethodIDOf(_classRef,
+ "createParser", "([BII)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(byte[] data, int offset, int len)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1067,16 +941,16 @@
///@since 2.1
jsonparser_.JsonParser createParser5(
jni.JniObject data, int offset, int len) =>
- jsonparser_.JsonParser.fromRef(
- _createParser5(reference, data.reference, offset, len).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createParser5,
+ jni.JniType.objectType,
+ [data.reference, offset, len]).object);
- static final _createParser6 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser6")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser6 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createParser",
+ "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(java.lang.String content)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1085,16 +959,14 @@
/// contents of given String.
///@since 2.1
jsonparser_.JsonParser createParser6(jni.JniString content) =>
- jsonparser_.JsonParser.fromRef(
- _createParser6(reference, content.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createParser6,
+ jni.JniType.objectType,
+ [content.reference]).object);
- static final _createParser7 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser7")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser7 = jniAccessors.getMethodIDOf(
+ _classRef, "createParser", "([C)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1103,19 +975,14 @@
/// contents of given char array.
///@since 2.4
jsonparser_.JsonParser createParser7(jni.JniObject content) =>
- jsonparser_.JsonParser.fromRef(
- _createParser7(reference, content.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createParser7,
+ jni.JniType.objectType,
+ [content.reference]).object);
- static final _createParser8 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Int32,
- ffi.Int32)>>("JsonFactory__createParser8")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
+ static final _id_createParser8 = jniAccessors.getMethodIDOf(_classRef,
+ "createParser", "([CII)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(char[] content, int offset, int len)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1124,16 +991,16 @@
///@since 2.4
jsonparser_.JsonParser createParser8(
jni.JniObject content, int offset, int len) =>
- jsonparser_.JsonParser.fromRef(
- _createParser8(reference, content.reference, offset, len).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createParser8,
+ jni.JniType.objectType,
+ [content.reference, offset, len]).object);
- static final _createParser9 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createParser9")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createParser9 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createParser",
+ "(Ljava/io/DataInput;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createParser(java.io.DataInput in)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1145,14 +1012,12 @@
/// will throw UnsupportedOperationException
///@since 2.8
jsonparser_.JsonParser createParser9(jni.JniObject in0) =>
- jsonparser_.JsonParser.fromRef(
- _createParser9(reference, in0.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createParser9, jni.JniType.objectType, [in0.reference]).object);
- static final _createNonBlockingByteArrayParser = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory__createNonBlockingByteArrayParser")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_createNonBlockingByteArrayParser =
+ jniAccessors.getMethodIDOf(_classRef, "createNonBlockingByteArrayParser",
+ "()Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createNonBlockingByteArrayParser()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1171,18 +1036,15 @@
/// at this point.
///@since 2.9
jsonparser_.JsonParser createNonBlockingByteArrayParser() =>
- jsonparser_.JsonParser.fromRef(
- _createNonBlockingByteArrayParser(reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createNonBlockingByteArrayParser,
+ jni.JniType.objectType, []).object);
- static final _createGenerator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator")
- .asFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>();
+ static final _id_createGenerator = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createGenerator",
+ "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// 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.
@@ -1206,16 +1068,16 @@
///@param enc Character encoding to use
///@since 2.1
jni.JniObject createGenerator(jni.JniObject out, jni.JniObject enc) =>
- jni.JniObject.fromRef(
- _createGenerator(reference, out.reference, enc.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createGenerator,
+ jni.JniType.objectType,
+ [out.reference, enc.reference]).object);
- static final _createGenerator1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createGenerator1 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createGenerator",
+ "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.OutputStream out)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1226,15 +1088,16 @@
/// Note: there are formats that use fixed encoding (like most binary data formats).
///@since 2.1
jni.JniObject createGenerator1(jni.JniObject out) =>
- jni.JniObject.fromRef(_createGenerator1(reference, out.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createGenerator1,
+ jni.JniType.objectType,
+ [out.reference]).object);
- static final _createGenerator2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createGenerator2 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createGenerator",
+ "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.Writer w)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1251,17 +1114,13 @@
///@since 2.1
///@param w Writer to use for writing JSON content
jni.JniObject createGenerator2(jni.JniObject w) =>
- jni.JniObject.fromRef(_createGenerator2(reference, w.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createGenerator2, jni.JniType.objectType, [w.reference]).object);
- static final _createGenerator3 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator3")
- .asFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>();
+ static final _id_createGenerator3 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createGenerator",
+ "(Ljava/io/File;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// 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.
@@ -1279,18 +1138,16 @@
///@param enc Character encoding to use
///@since 2.1
jni.JniObject createGenerator3(jni.JniObject f, jni.JniObject enc) =>
- jni.JniObject.fromRef(
- _createGenerator3(reference, f.reference, enc.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createGenerator3,
+ jni.JniType.objectType,
+ [f.reference, enc.reference]).object);
- static final _createGenerator4 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator4")
- .asFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>();
+ static final _id_createGenerator4 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createGenerator",
+ "(Ljava/io/DataOutput;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// 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.
@@ -1299,16 +1156,16 @@
/// DataOutput instance.
///@since 2.8
jni.JniObject createGenerator4(jni.JniObject out, jni.JniObject enc) =>
- jni.JniObject.fromRef(
- _createGenerator4(reference, out.reference, enc.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createGenerator4,
+ jni.JniType.objectType,
+ [out.reference, enc.reference]).object);
- static final _createGenerator5 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createGenerator5")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createGenerator5 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createGenerator",
+ "(Ljava/io/DataOutput;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// from: public com.fasterxml.jackson.core.JsonGenerator createGenerator(java.io.DataOutput out)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1319,15 +1176,16 @@
/// Note: there are formats that use fixed encoding (like most binary data formats).
///@since 2.8
jni.JniObject createGenerator5(jni.JniObject out) =>
- jni.JniObject.fromRef(_createGenerator5(reference, out.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createGenerator5,
+ jni.JniType.objectType,
+ [out.reference]).object);
- static final _createJsonParser = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonParser = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonParser",
+ "(Ljava/io/File;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.File f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1351,16 +1209,13 @@
///@throws JsonParseException if parser initialization fails due to content decoding problem
///@deprecated Since 2.2, use \#createParser(File) instead.
jsonparser_.JsonParser createJsonParser(jni.JniObject f) =>
- jsonparser_.JsonParser.fromRef(
- _createJsonParser(reference, f.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createJsonParser, jni.JniType.objectType, [f.reference]).object);
- static final _createJsonParser1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonParser1 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonParser",
+ "(Ljava/net/URL;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.net.URL url)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1383,16 +1238,16 @@
///@throws JsonParseException if parser initialization fails due to content decoding problem
///@deprecated Since 2.2, use \#createParser(URL) instead.
jsonparser_.JsonParser createJsonParser1(jni.JniObject url) =>
- jsonparser_.JsonParser.fromRef(
- _createJsonParser1(reference, url.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonParser1,
+ jni.JniType.objectType,
+ [url.reference]).object);
- static final _createJsonParser2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonParser2 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonParser",
+ "(Ljava/io/InputStream;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.InputStream in)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1418,16 +1273,16 @@
///@throws JsonParseException if parser initialization fails due to content decoding problem
///@deprecated Since 2.2, use \#createParser(InputStream) instead.
jsonparser_.JsonParser createJsonParser2(jni.JniObject in0) =>
- jsonparser_.JsonParser.fromRef(
- _createJsonParser2(reference, in0.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonParser2,
+ jni.JniType.objectType,
+ [in0.reference]).object);
- static final _createJsonParser3 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser3")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonParser3 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonParser",
+ "(Ljava/io/Reader;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.io.Reader r)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1446,16 +1301,11 @@
///@throws JsonParseException if parser initialization fails due to content decoding problem
///@deprecated Since 2.2, use \#createParser(Reader) instead.
jsonparser_.JsonParser createJsonParser3(jni.JniObject r) =>
- jsonparser_.JsonParser.fromRef(
- _createJsonParser3(reference, r.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_createJsonParser3, jni.JniType.objectType, [r.reference]).object);
- static final _createJsonParser4 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser4")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonParser4 = jniAccessors.getMethodIDOf(_classRef,
+ "createJsonParser", "([B)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1467,19 +1317,14 @@
///@throws JsonParseException if parser initialization fails due to content decoding problem
///@deprecated Since 2.2, use \#createParser(byte[]) instead.
jsonparser_.JsonParser createJsonParser4(jni.JniObject data) =>
- jsonparser_.JsonParser.fromRef(
- _createJsonParser4(reference, data.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonParser4,
+ jni.JniType.objectType,
+ [data.reference]).object);
- static final _createJsonParser5 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Int32,
- ffi.Int32)>>("JsonFactory__createJsonParser5")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int, int)>();
+ static final _id_createJsonParser5 = jniAccessors.getMethodIDOf(_classRef,
+ "createJsonParser", "([BII)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(byte[] data, int offset, int len)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1495,16 +1340,16 @@
///@deprecated Since 2.2, use \#createParser(byte[],int,int) instead.
jsonparser_.JsonParser createJsonParser5(
jni.JniObject data, int offset, int len) =>
- jsonparser_.JsonParser.fromRef(
- _createJsonParser5(reference, data.reference, offset, len).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonParser5,
+ jni.JniType.objectType,
+ [data.reference, offset, len]).object);
- static final _createJsonParser6 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonParser6")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonParser6 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonParser",
+ "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser createJsonParser(java.lang.String content)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1517,18 +1362,16 @@
///@throws JsonParseException if parser initialization fails due to content decoding problem
///@deprecated Since 2.2, use \#createParser(String) instead.
jsonparser_.JsonParser createJsonParser6(jni.JniString content) =>
- jsonparser_.JsonParser.fromRef(
- _createJsonParser6(reference, content.reference).object);
+ jsonparser_.JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonParser6,
+ jni.JniType.objectType,
+ [content.reference]).object);
- static final _createJsonGenerator = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonGenerator")
- .asFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonGenerator = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonGenerator",
+ "(Ljava/io/OutputStream;Lcom/fasterxml/jackson/core/JsonEncoding;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// 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.
@@ -1554,16 +1397,16 @@
///@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) =>
- jni.JniObject.fromRef(
- _createJsonGenerator(reference, out.reference, enc.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonGenerator,
+ jni.JniType.objectType,
+ [out.reference, enc.reference]).object);
- static final _createJsonGenerator1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonGenerator1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonGenerator1 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonGenerator",
+ "(Ljava/io/Writer;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.Writer out)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1582,16 +1425,16 @@
///@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) =>
- jni.JniObject.fromRef(
- _createJsonGenerator1(reference, out.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonGenerator1,
+ jni.JniType.objectType,
+ [out.reference]).object);
- static final _createJsonGenerator2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonFactory__createJsonGenerator2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_createJsonGenerator2 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "createJsonGenerator",
+ "(Ljava/io/OutputStream;)Lcom/fasterxml/jackson/core/JsonGenerator;");
/// from: public com.fasterxml.jackson.core.JsonGenerator createJsonGenerator(java.io.OutputStream out)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1605,8 +1448,11 @@
///@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) =>
- jni.JniObject.fromRef(
- _createJsonGenerator2(reference, out.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_createJsonGenerator2,
+ jni.JniType.objectType,
+ [out.reference]).object);
}
/// from: com.fasterxml.jackson.core.JsonFactory$Feature
@@ -1614,73 +1460,71 @@
/// Enumeration that defines all on/off features that can only be
/// changed for JsonFactory.
class JsonFactory_Feature extends jni.JniObject {
- JsonFactory_Feature.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+ static final _classRef = jniAccessors
+ .getClassOf("com/fasterxml/jackson/core/JsonFactory\$Feature");
+ JsonFactory_Feature.fromRef(jni.JObject ref) : super.fromRef(ref);
- static final _values =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonFactory_Feature__values")
- .asFunction<jni.JniResult Function()>();
+ static final _id_values = jniAccessors.getStaticMethodIDOf(_classRef,
+ "values", "()[Lcom/fasterxml/jackson/core/JsonFactory\$Feature;");
/// 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() => jni.JniObject.fromRef(_values().object);
+ static jni.JniObject values() =>
+ jni.JniObject.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef, _id_values, jni.JniType.objectType, []).object);
- static final _valueOf = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory_Feature__valueOf")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_valueOf = jniAccessors.getStaticMethodIDOf(
+ _classRef,
+ "valueOf",
+ "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonFactory\$Feature;");
/// 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) =>
- JsonFactory_Feature.fromRef(_valueOf(name.reference).object);
+ JsonFactory_Feature.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef,
+ _id_valueOf,
+ jni.JniType.objectType,
+ [name.reference]).object);
- static final _collectDefaults =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonFactory_Feature__collectDefaults")
- .asFunction<jni.JniResult Function()>();
+ static final _id_collectDefaults =
+ jniAccessors.getStaticMethodIDOf(_classRef, "collectDefaults", "()I");
/// 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() => _collectDefaults().integer;
+ static int collectDefaults() => jniAccessors.callStaticMethodWithArgs(
+ _classRef, _id_collectDefaults, jni.JniType.intType, []).integer;
- static final _ctor =
- jniLookup<ffi.NativeFunction<jni.JniResult Function(ffi.Uint8)>>(
- "JsonFactory_Feature__ctor")
- .asFunction<jni.JniResult Function(int)>();
+ static final _id_ctor =
+ jniAccessors.getMethodIDOf(_classRef, "<init>", "(Z)V");
/// from: private void <init>(boolean defaultState)
+ /// The returned object must be deleted after use, by calling the `delete` method.
JsonFactory_Feature(bool defaultState)
- : super.fromRef(_ctor(defaultState ? 1 : 0).object);
+ : super.fromRef(jniAccessors
+ .newObjectWithArgs(_classRef, _id_ctor, [defaultState]).object);
- static final _enabledByDefault = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonFactory_Feature__enabledByDefault")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_enabledByDefault =
+ jniAccessors.getMethodIDOf(_classRef, "enabledByDefault", "()Z");
/// from: public boolean enabledByDefault()
- bool enabledByDefault() => _enabledByDefault(reference).boolean;
+ bool enabledByDefault() => jniAccessors.callMethodWithArgs(
+ reference, _id_enabledByDefault, jni.JniType.booleanType, []).boolean;
- static final _enabledIn = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Int32)>>("JsonFactory_Feature__enabledIn")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_enabledIn =
+ jniAccessors.getMethodIDOf(_classRef, "enabledIn", "(I)Z");
/// from: public boolean enabledIn(int flags)
- bool enabledIn(int flags) => _enabledIn(reference, flags).boolean;
+ bool enabledIn(int flags) => jniAccessors.callMethodWithArgs(
+ reference, _id_enabledIn, jni.JniType.booleanType, [flags]).boolean;
- static final _getMask = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonFactory_Feature__getMask")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getMask =
+ jniAccessors.getMethodIDOf(_classRef, "getMask", "()I");
/// from: public int getMask()
- int getMask() => _getMask(reference).integer;
+ int getMask() => jniAccessors.callMethodWithArgs(
+ reference, _id_getMask, jni.JniType.intType, []).integer;
}
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonParser.dart b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonParser.dart
index 6f695fd..1f8f08b 100644
--- a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonParser.dart
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonParser.dart
@@ -17,21 +17,23 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_field
+// ignore_for_file: unused_import
+// ignore_for_file: unused_shown_name
-import "dart:ffi" as ffi;
-import "package:jni/internal_helpers_for_jnigen.dart";
import "package:jni/jni.dart" as jni;
+import "package:jni/internal_helpers_for_jnigen.dart";
+
import "JsonToken.dart" as jsontoken_;
-import "../../../../_init.dart" show jniLookup;
+import "../../../../_init.dart" show jniEnv, jniAccessors;
/// from: com.fasterxml.jackson.core.JsonParser
///
@@ -40,7 +42,9 @@
/// a JsonFactory instance.
///@author Tatu Saloranta
class JsonParser extends jni.JniObject {
- JsonParser.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+ static final _classRef =
+ jniAccessors.getClassOf("com/fasterxml/jackson/core/JsonParser");
+ JsonParser.fromRef(jni.JObject ref) : super.fromRef(ref);
/// from: private static final int MIN_BYTE_I
static const MIN_BYTE_I = -128;
@@ -54,10 +58,10 @@
/// from: private static final int MAX_SHORT_I
static const MAX_SHORT_I = 32767;
- static final _get_DEFAULT_READ_CAPABILITIES =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "get_JsonParser__DEFAULT_READ_CAPABILITIES")
- .asFunction<jni.JniResult Function()>();
+ static final _id_DEFAULT_READ_CAPABILITIES = jniAccessors.getStaticFieldIDOf(
+ _classRef,
+ "DEFAULT_READ_CAPABILITIES",
+ "Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;");
/// 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.
@@ -67,28 +71,31 @@
/// set needs to be passed).
///@since 2.12
static jni.JniObject get DEFAULT_READ_CAPABILITIES =>
- jni.JniObject.fromRef(_get_DEFAULT_READ_CAPABILITIES().object);
+ jni.JniObject.fromRef(jniAccessors
+ .getStaticField(
+ _classRef, _id_DEFAULT_READ_CAPABILITIES, jni.JniType.objectType)
+ .object);
- static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonParser__ctor")
- .asFunction<jni.JniResult Function()>();
+ static final _id_ctor =
+ jniAccessors.getMethodIDOf(_classRef, "<init>", "()V");
/// from: protected void <init>()
- JsonParser() : super.fromRef(_ctor().object);
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ JsonParser()
+ : super.fromRef(
+ jniAccessors.newObjectWithArgs(_classRef, _id_ctor, []).object);
- static final _ctor1 =
- jniLookup<ffi.NativeFunction<jni.JniResult Function(ffi.Int32)>>(
- "JsonParser__ctor1")
- .asFunction<jni.JniResult Function(int)>();
+ static final _id_ctor1 =
+ jniAccessors.getMethodIDOf(_classRef, "<init>", "(I)V");
/// from: protected void <init>(int features)
- JsonParser.ctor1(int features) : super.fromRef(_ctor1(features).object);
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ JsonParser.ctor1(int features)
+ : super.fromRef(jniAccessors
+ .newObjectWithArgs(_classRef, _id_ctor1, [features]).object);
- static final _getCodec = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getCodec")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCodec = jniAccessors.getMethodIDOf(
+ _classRef, "getCodec", "()Lcom/fasterxml/jackson/core/ObjectCodec;");
/// from: public abstract com.fasterxml.jackson.core.ObjectCodec getCodec()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -98,15 +105,11 @@
/// method (and its variants).
///@return Codec assigned to this parser, if any; {@code null} if none
jni.JniObject getCodec() =>
- jni.JniObject.fromRef(_getCodec(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getCodec, jni.JniType.objectType, []).object);
- static final _setCodec = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__setCodec")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setCodec = jniAccessors.getMethodIDOf(
+ _classRef, "setCodec", "(Lcom/fasterxml/jackson/core/ObjectCodec;)V");
/// from: public abstract void setCodec(com.fasterxml.jackson.core.ObjectCodec oc)
///
@@ -114,13 +117,11 @@
/// 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) => _setCodec(reference, oc.reference).check();
+ void setCodec(jni.JniObject oc) => jniAccessors.callMethodWithArgs(
+ reference, _id_setCodec, jni.JniType.voidType, [oc.reference]).check();
- static final _getInputSource = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getInputSource")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getInputSource = jniAccessors.getMethodIDOf(
+ _classRef, "getInputSource", "()Ljava/lang/Object;");
/// from: public java.lang.Object getInputSource()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -140,16 +141,13 @@
/// "last effort", i.e. only used if no other mechanism is applicable.
///@return Input source this parser was configured with
jni.JniObject getInputSource() =>
- jni.JniObject.fromRef(_getInputSource(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getInputSource, jni.JniType.objectType, []).object);
- static final _setRequestPayloadOnError = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
- "JsonParser__setRequestPayloadOnError")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setRequestPayloadOnError = jniAccessors.getMethodIDOf(
+ _classRef,
+ "setRequestPayloadOnError",
+ "(Lcom/fasterxml/jackson/core/util/RequestPayload;)V");
/// from: public void setRequestPayloadOnError(com.fasterxml.jackson.core.util.RequestPayload payload)
///
@@ -157,16 +155,11 @@
///@param payload Payload to pass
///@since 2.8
void setRequestPayloadOnError(jni.JniObject payload) =>
- _setRequestPayloadOnError(reference, payload.reference).check();
+ jniAccessors.callMethodWithArgs(reference, _id_setRequestPayloadOnError,
+ jni.JniType.voidType, [payload.reference]).check();
- static final _setRequestPayloadOnError1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
- "JsonParser__setRequestPayloadOnError1")
- .asFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>();
+ static final _id_setRequestPayloadOnError1 = jniAccessors.getMethodIDOf(
+ _classRef, "setRequestPayloadOnError", "([BLjava/lang/String;)V");
/// from: public void setRequestPayloadOnError(byte[] payload, java.lang.String charset)
///
@@ -176,18 +169,11 @@
///@since 2.8
void setRequestPayloadOnError1(
jni.JniObject payload, jni.JniString charset) =>
- _setRequestPayloadOnError1(
- reference, payload.reference, charset.reference)
- .check();
+ jniAccessors.callMethodWithArgs(reference, _id_setRequestPayloadOnError1,
+ jni.JniType.voidType, [payload.reference, charset.reference]).check();
- static final _setRequestPayloadOnError2 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(
- "JsonParser__setRequestPayloadOnError2")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setRequestPayloadOnError2 = jniAccessors.getMethodIDOf(
+ _classRef, "setRequestPayloadOnError", "(Ljava/lang/String;)V");
/// from: public void setRequestPayloadOnError(java.lang.String payload)
///
@@ -195,15 +181,11 @@
///@param payload Payload to pass
///@since 2.8
void setRequestPayloadOnError2(jni.JniString payload) =>
- _setRequestPayloadOnError2(reference, payload.reference).check();
+ jniAccessors.callMethodWithArgs(reference, _id_setRequestPayloadOnError2,
+ jni.JniType.voidType, [payload.reference]).check();
- static final _setSchema = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__setSchema")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setSchema = jniAccessors.getMethodIDOf(
+ _classRef, "setSchema", "(Lcom/fasterxml/jackson/core/FormatSchema;)V");
/// from: public void setSchema(com.fasterxml.jackson.core.FormatSchema schema)
///
@@ -217,14 +199,14 @@
/// is thrown.
///@param schema Schema to use
///@throws UnsupportedOperationException if parser does not support schema
- void setSchema(jni.JniObject schema) =>
- _setSchema(reference, schema.reference).check();
+ void setSchema(jni.JniObject schema) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_setSchema,
+ jni.JniType.voidType,
+ [schema.reference]).check();
- static final _getSchema = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getSchema")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getSchema = jniAccessors.getMethodIDOf(
+ _classRef, "getSchema", "()Lcom/fasterxml/jackson/core/FormatSchema;");
/// from: public com.fasterxml.jackson.core.FormatSchema getSchema()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -234,15 +216,11 @@
///@return Schema in use by this parser, if any; {@code null} if none
///@since 2.1
jni.JniObject getSchema() =>
- jni.JniObject.fromRef(_getSchema(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getSchema, jni.JniType.objectType, []).object);
- static final _canUseSchema = jniLookup<
- 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>)>();
+ static final _id_canUseSchema = jniAccessors.getMethodIDOf(_classRef,
+ "canUseSchema", "(Lcom/fasterxml/jackson/core/FormatSchema;)Z");
/// from: public boolean canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
///
@@ -250,14 +228,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) =>
- _canUseSchema(reference, schema.reference).boolean;
+ bool canUseSchema(jni.JniObject schema) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_canUseSchema,
+ jni.JniType.booleanType,
+ [schema.reference]).boolean;
- static final _requiresCustomCodec = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__requiresCustomCodec")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_requiresCustomCodec =
+ jniAccessors.getMethodIDOf(_classRef, "requiresCustomCodec", "()Z");
/// from: public boolean requiresCustomCodec()
///
@@ -269,13 +247,11 @@
///@return True if format-specific codec is needed with this parser; false if a general
/// ObjectCodec is enough
///@since 2.1
- bool requiresCustomCodec() => _requiresCustomCodec(reference).boolean;
+ bool requiresCustomCodec() => jniAccessors.callMethodWithArgs(
+ reference, _id_requiresCustomCodec, jni.JniType.booleanType, []).boolean;
- static final _canParseAsync = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__canParseAsync")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_canParseAsync =
+ jniAccessors.getMethodIDOf(_classRef, "canParseAsync", "()Z");
/// from: public boolean canParseAsync()
///
@@ -290,13 +266,13 @@
/// input is read by blocking
///@return True if this is a non-blocking ("asynchronous") parser
///@since 2.9
- bool canParseAsync() => _canParseAsync(reference).boolean;
+ bool canParseAsync() => jniAccessors.callMethodWithArgs(
+ reference, _id_canParseAsync, jni.JniType.booleanType, []).boolean;
- static final _getNonBlockingInputFeeder = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonParser__getNonBlockingInputFeeder")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getNonBlockingInputFeeder = jniAccessors.getMethodIDOf(
+ _classRef,
+ "getNonBlockingInputFeeder",
+ "()Lcom/fasterxml/jackson/core/async/NonBlockingInputFeeder;");
/// from: public com.fasterxml.jackson.core.async.NonBlockingInputFeeder getNonBlockingInputFeeder()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -307,13 +283,13 @@
///@return Input feeder to use with non-blocking (async) parsing
///@since 2.9
jni.JniObject getNonBlockingInputFeeder() =>
- jni.JniObject.fromRef(_getNonBlockingInputFeeder(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getNonBlockingInputFeeder, jni.JniType.objectType, []).object);
- static final _getReadCapabilities = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getReadCapabilities")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getReadCapabilities = jniAccessors.getMethodIDOf(
+ _classRef,
+ "getReadCapabilities",
+ "()Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;");
/// 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.
@@ -323,13 +299,11 @@
///@return Set of read capabilities for content to read via this parser
///@since 2.12
jni.JniObject getReadCapabilities() =>
- jni.JniObject.fromRef(_getReadCapabilities(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getReadCapabilities, jni.JniType.objectType, []).object);
- static final _version = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__version")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_version = jniAccessors.getMethodIDOf(
+ _classRef, "version", "()Lcom/fasterxml/jackson/core/Version;");
/// from: public abstract com.fasterxml.jackson.core.Version version()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -338,13 +312,12 @@
/// 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() => jni.JniObject.fromRef(_version(reference).object);
+ jni.JniObject version() =>
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_version, jni.JniType.objectType, []).object);
- static final _close = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__close")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_close =
+ jniAccessors.getMethodIDOf(_classRef, "close", "()V");
/// from: public abstract void close()
///
@@ -362,13 +335,11 @@
/// 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() => _close(reference).check();
+ void close() => jniAccessors.callMethodWithArgs(
+ reference, _id_close, jni.JniType.voidType, []).check();
- static final _isClosed = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__isClosed")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isClosed =
+ jniAccessors.getMethodIDOf(_classRef, "isClosed", "()Z");
/// from: public abstract boolean isClosed()
///
@@ -379,13 +350,11 @@
/// call to \#close or because parser has encountered
/// end of input.
///@return {@code True} if this parser instance has been closed
- bool isClosed() => _isClosed(reference).boolean;
+ bool isClosed() => jniAccessors.callMethodWithArgs(
+ reference, _id_isClosed, jni.JniType.booleanType, []).boolean;
- static final _getParsingContext = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getParsingContext")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getParsingContext = jniAccessors.getMethodIDOf(_classRef,
+ "getParsingContext", "()Lcom/fasterxml/jackson/core/JsonStreamContext;");
/// from: public abstract com.fasterxml.jackson.core.JsonStreamContext getParsingContext()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -400,13 +369,11 @@
/// input, if so desired.
///@return Stream input context (JsonStreamContext) associated with this parser
jni.JniObject getParsingContext() =>
- jni.JniObject.fromRef(_getParsingContext(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getParsingContext, jni.JniType.objectType, []).object);
- static final _currentLocation = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__currentLocation")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_currentLocation = jniAccessors.getMethodIDOf(_classRef,
+ "currentLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
/// from: public com.fasterxml.jackson.core.JsonLocation currentLocation()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -424,13 +391,11 @@
///@return Location of the last processed input unit (byte or character)
///@since 2.13
jni.JniObject currentLocation() =>
- jni.JniObject.fromRef(_currentLocation(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_currentLocation, jni.JniType.objectType, []).object);
- static final _currentTokenLocation = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__currentTokenLocation")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_currentTokenLocation = jniAccessors.getMethodIDOf(_classRef,
+ "currentTokenLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
/// from: public com.fasterxml.jackson.core.JsonLocation currentTokenLocation()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -448,13 +413,11 @@
///@return Starting location of the token parser currently points to
///@since 2.13 (will eventually replace \#getTokenLocation)
jni.JniObject currentTokenLocation() =>
- jni.JniObject.fromRef(_currentTokenLocation(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_currentTokenLocation, jni.JniType.objectType, []).object);
- static final _getCurrentLocation = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentLocation")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCurrentLocation = jniAccessors.getMethodIDOf(_classRef,
+ "getCurrentLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
/// from: public abstract com.fasterxml.jackson.core.JsonLocation getCurrentLocation()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -463,13 +426,11 @@
/// Jackson 2.x versions (and removed from Jackson 3.0).
///@return Location of the last processed input unit (byte or character)
jni.JniObject getCurrentLocation() =>
- jni.JniObject.fromRef(_getCurrentLocation(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getCurrentLocation, jni.JniType.objectType, []).object);
- static final _getTokenLocation = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getTokenLocation")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getTokenLocation = jniAccessors.getMethodIDOf(_classRef,
+ "getTokenLocation", "()Lcom/fasterxml/jackson/core/JsonLocation;");
/// from: public abstract com.fasterxml.jackson.core.JsonLocation getTokenLocation()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -478,13 +439,11 @@
/// Jackson 2.x versions (and removed from Jackson 3.0).
///@return Starting location of the token parser currently points to
jni.JniObject getTokenLocation() =>
- jni.JniObject.fromRef(_getTokenLocation(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getTokenLocation, jni.JniType.objectType, []).object);
- static final _currentValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__currentValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_currentValue = jniAccessors.getMethodIDOf(
+ _classRef, "currentValue", "()Ljava/lang/Object;");
/// from: public java.lang.Object currentValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -501,15 +460,11 @@
///@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() =>
- jni.JniObject.fromRef(_currentValue(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_currentValue, jni.JniType.objectType, []).object);
- static final _assignCurrentValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__assignCurrentValue")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_assignCurrentValue = jniAccessors.getMethodIDOf(
+ _classRef, "assignCurrentValue", "(Ljava/lang/Object;)V");
/// from: public void assignCurrentValue(java.lang.Object v)
///
@@ -519,14 +474,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) =>
- _assignCurrentValue(reference, v.reference).check();
+ void assignCurrentValue(jni.JniObject v) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_assignCurrentValue,
+ jni.JniType.voidType,
+ [v.reference]).check();
- static final _getCurrentValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCurrentValue = jniAccessors.getMethodIDOf(
+ _classRef, "getCurrentValue", "()Ljava/lang/Object;");
/// from: public java.lang.Object getCurrentValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -535,31 +490,25 @@
/// Jackson 2.x versions (and removed from Jackson 3.0).
///@return Location of the last processed input unit (byte or character)
jni.JniObject getCurrentValue() =>
- jni.JniObject.fromRef(_getCurrentValue(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getCurrentValue, jni.JniType.objectType, []).object);
- static final _setCurrentValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__setCurrentValue")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_setCurrentValue = jniAccessors.getMethodIDOf(
+ _classRef, "setCurrentValue", "(Ljava/lang/Object;)V");
/// 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) =>
- _setCurrentValue(reference, v.reference).check();
+ void setCurrentValue(jni.JniObject v) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_setCurrentValue,
+ jni.JniType.voidType,
+ [v.reference]).check();
- static final _releaseBuffered = jniLookup<
- 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>)>();
+ static final _id_releaseBuffered = jniAccessors.getMethodIDOf(
+ _classRef, "releaseBuffered", "(Ljava/io/OutputStream;)I");
/// from: public int releaseBuffered(java.io.OutputStream out)
///
@@ -574,16 +523,14 @@
/// (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) =>
- _releaseBuffered(reference, out.reference).integer;
+ int releaseBuffered(jni.JniObject out) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_releaseBuffered,
+ jni.JniType.intType,
+ [out.reference]).integer;
- static final _releaseBuffered1 = jniLookup<
- 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>)>();
+ static final _id_releaseBuffered1 = jniAccessors.getMethodIDOf(
+ _classRef, "releaseBuffered", "(Ljava/io/Writer;)I");
/// from: public int releaseBuffered(java.io.Writer w)
///
@@ -599,16 +546,14 @@
/// (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) =>
- _releaseBuffered1(reference, w.reference).integer;
+ int releaseBuffered1(jni.JniObject w) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_releaseBuffered1,
+ jni.JniType.intType,
+ [w.reference]).integer;
- static final _enable = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__enable")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_enable = jniAccessors.getMethodIDOf(_classRef, "enable",
+ "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser enable(com.fasterxml.jackson.core.JsonParser.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -618,15 +563,11 @@
///@param f Feature to enable
///@return This parser, to allow call chaining
JsonParser enable(JsonParser_Feature f) =>
- JsonParser.fromRef(_enable(reference, f.reference).object);
+ JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_enable, jni.JniType.objectType, [f.reference]).object);
- static final _disable = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__disable")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_disable = jniAccessors.getMethodIDOf(_classRef, "disable",
+ "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser disable(com.fasterxml.jackson.core.JsonParser.Feature f)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -636,15 +577,13 @@
///@param f Feature to disable
///@return This parser, to allow call chaining
JsonParser disable(JsonParser_Feature f) =>
- JsonParser.fromRef(_disable(reference, f.reference).object);
+ JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference, _id_disable,
+ jni.JniType.objectType, [f.reference]).object);
- static final _configure = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>, ffi.Uint8)>>("JsonParser__configure")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>, int)>();
+ static final _id_configure = jniAccessors.getMethodIDOf(
+ _classRef,
+ "configure",
+ "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;Z)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser configure(com.fasterxml.jackson.core.JsonParser.Feature f, boolean state)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -654,32 +593,23 @@
///@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) => JsonParser.fromRef(
- _configure(reference, f.reference, state ? 1 : 0).object);
+ JsonParser configure(JsonParser_Feature f, bool state) =>
+ JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_configure, jni.JniType.objectType, [f.reference, state]).object);
- static final _isEnabled = jniLookup<
- 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>)>();
+ static final _id_isEnabled = jniAccessors.getMethodIDOf(_classRef,
+ "isEnabled", "(Lcom/fasterxml/jackson/core/JsonParser\$Feature;)Z");
/// 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) =>
- _isEnabled(reference, f.reference).boolean;
+ bool isEnabled(JsonParser_Feature f) => jniAccessors.callMethodWithArgs(
+ reference, _id_isEnabled, jni.JniType.booleanType, [f.reference]).boolean;
- static final _isEnabled1 = jniLookup<
- 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>)>();
+ static final _id_isEnabled1 = jniAccessors.getMethodIDOf(_classRef,
+ "isEnabled", "(Lcom/fasterxml/jackson/core/StreamReadFeature;)Z");
/// from: public boolean isEnabled(com.fasterxml.jackson.core.StreamReadFeature f)
///
@@ -687,27 +617,22 @@
///@param f Feature to check
///@return {@code True} if feature is enabled; {@code false} otherwise
///@since 2.10
- bool isEnabled1(jni.JniObject f) =>
- _isEnabled1(reference, f.reference).boolean;
+ bool isEnabled1(jni.JniObject f) => jniAccessors.callMethodWithArgs(reference,
+ _id_isEnabled1, jni.JniType.booleanType, [f.reference]).boolean;
- static final _getFeatureMask = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getFeatureMask")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFeatureMask =
+ jniAccessors.getMethodIDOf(_classRef, "getFeatureMask", "()I");
/// 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() => _getFeatureMask(reference).integer;
+ int getFeatureMask() => jniAccessors.callMethodWithArgs(
+ reference, _id_getFeatureMask, jni.JniType.intType, []).integer;
- static final _setFeatureMask = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Int32)>>("JsonParser__setFeatureMask")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_setFeatureMask = jniAccessors.getMethodIDOf(_classRef,
+ "setFeatureMask", "(I)Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public com.fasterxml.jackson.core.JsonParser setFeatureMask(int mask)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -718,13 +643,11 @@
///@since 2.3
///@deprecated Since 2.7, use \#overrideStdFeatures(int, int) instead
JsonParser setFeatureMask(int mask) =>
- JsonParser.fromRef(_setFeatureMask(reference, mask).object);
+ JsonParser.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_setFeatureMask, jni.JniType.objectType, [mask]).object);
- static final _overrideStdFeatures = jniLookup<
- 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)>();
+ static final _id_overrideStdFeatures = jniAccessors.getMethodIDOf(_classRef,
+ "overrideStdFeatures", "(II)Lcom/fasterxml/jackson/core/JsonParser;");
/// 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.
@@ -742,13 +665,14 @@
///@return This parser, to allow call chaining
///@since 2.6
JsonParser overrideStdFeatures(int values, int mask) =>
- JsonParser.fromRef(_overrideStdFeatures(reference, values, mask).object);
+ JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_overrideStdFeatures,
+ jni.JniType.objectType,
+ [values, mask]).object);
- static final _getFormatFeatures = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getFormatFeatures")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFormatFeatures =
+ jniAccessors.getMethodIDOf(_classRef, "getFormatFeatures", "()I");
/// from: public int getFormatFeatures()
///
@@ -756,13 +680,13 @@
/// on/off configuration settings.
///@return Bit mask that defines current states of all standard FormatFeatures.
///@since 2.6
- int getFormatFeatures() => _getFormatFeatures(reference).integer;
+ int getFormatFeatures() => jniAccessors.callMethodWithArgs(
+ reference, _id_getFormatFeatures, jni.JniType.intType, []).integer;
- static final _overrideFormatFeatures = jniLookup<
- 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)>();
+ static final _id_overrideFormatFeatures = jniAccessors.getMethodIDOf(
+ _classRef,
+ "overrideFormatFeatures",
+ "(II)Lcom/fasterxml/jackson/core/JsonParser;");
/// 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.
@@ -777,14 +701,15 @@
///@param mask Bit mask of features to change
///@return This parser, to allow call chaining
///@since 2.6
- JsonParser overrideFormatFeatures(int values, int mask) => JsonParser.fromRef(
- _overrideFormatFeatures(reference, values, mask).object);
+ JsonParser overrideFormatFeatures(int values, int mask) =>
+ JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_overrideFormatFeatures,
+ jni.JniType.objectType,
+ [values, mask]).object);
- static final _nextToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__nextToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_nextToken = jniAccessors.getMethodIDOf(
+ _classRef, "nextToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
/// from: public abstract com.fasterxml.jackson.core.JsonToken nextToken()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -798,13 +723,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jsontoken_.JsonToken nextToken() =>
- jsontoken_.JsonToken.fromRef(_nextToken(reference).object);
+ jsontoken_.JsonToken.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_nextToken, jni.JniType.objectType, []).object);
- static final _nextValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__nextValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_nextValue = jniAccessors.getMethodIDOf(
+ _classRef, "nextValue", "()Lcom/fasterxml/jackson/core/JsonToken;");
/// from: public abstract com.fasterxml.jackson.core.JsonToken nextValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -826,15 +749,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jsontoken_.JsonToken nextValue() =>
- jsontoken_.JsonToken.fromRef(_nextValue(reference).object);
+ jsontoken_.JsonToken.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_nextValue, jni.JniType.objectType, []).object);
- static final _nextFieldName = jniLookup<
- 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>)>();
+ static final _id_nextFieldName = jniAccessors.getMethodIDOf(_classRef,
+ "nextFieldName", "(Lcom/fasterxml/jackson/core/SerializableString;)Z");
/// from: public boolean nextFieldName(com.fasterxml.jackson.core.SerializableString str)
///
@@ -853,14 +772,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) =>
- _nextFieldName(reference, str.reference).boolean;
+ bool nextFieldName(jni.JniObject str) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_nextFieldName,
+ jni.JniType.booleanType,
+ [str.reference]).boolean;
- static final _nextFieldName1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__nextFieldName1")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_nextFieldName1 = jniAccessors.getMethodIDOf(
+ _classRef, "nextFieldName", "()Ljava/lang/String;");
/// from: public java.lang.String nextFieldName()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -874,13 +793,11 @@
/// JsonParseException for decoding problems
///@since 2.5
jni.JniString nextFieldName1() =>
- jni.JniString.fromRef(_nextFieldName1(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_nextFieldName1, jni.JniType.objectType, []).object);
- static final _nextTextValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__nextTextValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_nextTextValue = jniAccessors.getMethodIDOf(
+ _classRef, "nextTextValue", "()Ljava/lang/String;");
/// from: public java.lang.String nextTextValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -899,13 +816,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniString nextTextValue() =>
- jni.JniString.fromRef(_nextTextValue(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_nextTextValue, jni.JniType.objectType, []).object);
- static final _nextIntValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Int32)>>("JsonParser__nextIntValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_nextIntValue =
+ jniAccessors.getMethodIDOf(_classRef, "nextIntValue", "(I)I");
/// from: public int nextIntValue(int defaultValue)
///
@@ -926,14 +841,11 @@
///@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) =>
- _nextIntValue(reference, defaultValue).integer;
+ int nextIntValue(int defaultValue) => jniAccessors.callMethodWithArgs(
+ reference, _id_nextIntValue, jni.JniType.intType, [defaultValue]).integer;
- static final _nextLongValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Int64)>>("JsonParser__nextLongValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_nextLongValue =
+ jniAccessors.getMethodIDOf(_classRef, "nextLongValue", "(J)J");
/// from: public long nextLongValue(long defaultValue)
///
@@ -954,14 +866,11 @@
///@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) =>
- _nextLongValue(reference, defaultValue).long;
+ int nextLongValue(int defaultValue) => jniAccessors.callMethodWithArgs(
+ reference, _id_nextLongValue, jni.JniType.longType, [defaultValue]).long;
- static final _nextBooleanValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__nextBooleanValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_nextBooleanValue = jniAccessors.getMethodIDOf(
+ _classRef, "nextBooleanValue", "()Ljava/lang/Boolean;");
/// from: public java.lang.Boolean nextBooleanValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -983,13 +892,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniObject nextBooleanValue() =>
- jni.JniObject.fromRef(_nextBooleanValue(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_nextBooleanValue, jni.JniType.objectType, []).object);
- static final _skipChildren = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__skipChildren")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_skipChildren = jniAccessors.getMethodIDOf(
+ _classRef, "skipChildren", "()Lcom/fasterxml/jackson/core/JsonParser;");
/// from: public abstract com.fasterxml.jackson.core.JsonParser skipChildren()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1010,13 +917,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
JsonParser skipChildren() =>
- JsonParser.fromRef(_skipChildren(reference).object);
+ JsonParser.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_skipChildren, jni.JniType.objectType, []).object);
- static final _finishToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__finishToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_finishToken =
+ jniAccessors.getMethodIDOf(_classRef, "finishToken", "()V");
/// from: public void finishToken()
///
@@ -1033,13 +938,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
///@since 2.8
- void finishToken() => _finishToken(reference).check();
+ void finishToken() => jniAccessors.callMethodWithArgs(
+ reference, _id_finishToken, jni.JniType.voidType, []).check();
- static final _currentToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__currentToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_currentToken = jniAccessors.getMethodIDOf(
+ _classRef, "currentToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
/// from: public com.fasterxml.jackson.core.JsonToken currentToken()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1054,13 +957,11 @@
/// if the current token has been explicitly cleared.
///@since 2.8
jsontoken_.JsonToken currentToken() =>
- jsontoken_.JsonToken.fromRef(_currentToken(reference).object);
+ jsontoken_.JsonToken.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_currentToken, jni.JniType.objectType, []).object);
- static final _currentTokenId = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__currentTokenId")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_currentTokenId =
+ jniAccessors.getMethodIDOf(_classRef, "currentTokenId", "()I");
/// from: public int currentTokenId()
///
@@ -1073,13 +974,11 @@
/// to profile performance before deciding to use this method.
///@since 2.8
///@return {@code int} matching one of constants from JsonTokenId.
- int currentTokenId() => _currentTokenId(reference).integer;
+ int currentTokenId() => jniAccessors.callMethodWithArgs(
+ reference, _id_currentTokenId, jni.JniType.intType, []).integer;
- static final _getCurrentToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCurrentToken = jniAccessors.getMethodIDOf(
+ _classRef, "getCurrentToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
/// from: public abstract com.fasterxml.jackson.core.JsonToken getCurrentToken()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1089,26 +988,22 @@
///@return Type of the token this parser currently points to,
/// if any: null before any tokens have been read, and
jsontoken_.JsonToken getCurrentToken() =>
- jsontoken_.JsonToken.fromRef(_getCurrentToken(reference).object);
+ jsontoken_.JsonToken.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getCurrentToken, jni.JniType.objectType, []).object);
- static final _getCurrentTokenId = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentTokenId")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCurrentTokenId =
+ jniAccessors.getMethodIDOf(_classRef, "getCurrentTokenId", "()I");
/// 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() => _getCurrentTokenId(reference).integer;
+ int getCurrentTokenId() => jniAccessors.callMethodWithArgs(
+ reference, _id_getCurrentTokenId, jni.JniType.intType, []).integer;
- static final _hasCurrentToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__hasCurrentToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_hasCurrentToken =
+ jniAccessors.getMethodIDOf(_classRef, "hasCurrentToken", "()Z");
/// from: public abstract boolean hasCurrentToken()
///
@@ -1120,13 +1015,11 @@
/// was just constructed, encountered end-of-input
/// and returned null from \#nextToken, or the token
/// has been consumed)
- bool hasCurrentToken() => _hasCurrentToken(reference).boolean;
+ bool hasCurrentToken() => jniAccessors.callMethodWithArgs(
+ reference, _id_hasCurrentToken, jni.JniType.booleanType, []).boolean;
- static final _hasTokenId = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Int32)>>("JsonParser__hasTokenId")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_hasTokenId =
+ jniAccessors.getMethodIDOf(_classRef, "hasTokenId", "(I)Z");
/// from: public abstract boolean hasTokenId(int id)
///
@@ -1142,15 +1035,11 @@
///@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) => _hasTokenId(reference, id).boolean;
+ bool hasTokenId(int id) => jniAccessors.callMethodWithArgs(
+ reference, _id_hasTokenId, jni.JniType.booleanType, [id]).boolean;
- static final _hasToken = jniLookup<
- 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>)>();
+ static final _id_hasToken = jniAccessors.getMethodIDOf(
+ _classRef, "hasToken", "(Lcom/fasterxml/jackson/core/JsonToken;)Z");
/// from: public abstract boolean hasToken(com.fasterxml.jackson.core.JsonToken t)
///
@@ -1166,14 +1055,11 @@
///@param t Token to match
///@return {@code True} if the parser current points to specified token
///@since 2.6
- bool hasToken(jsontoken_.JsonToken t) =>
- _hasToken(reference, t.reference).boolean;
+ bool hasToken(jsontoken_.JsonToken t) => jniAccessors.callMethodWithArgs(
+ reference, _id_hasToken, jni.JniType.booleanType, [t.reference]).boolean;
- static final _isExpectedStartArrayToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonParser__isExpectedStartArrayToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isExpectedStartArrayToken =
+ jniAccessors.getMethodIDOf(_classRef, "isExpectedStartArrayToken", "()Z");
/// from: public boolean isExpectedStartArrayToken()
///
@@ -1193,14 +1079,11 @@
///@return True if the current token can be considered as a
/// start-array marker (such JsonToken\#START_ARRAY);
/// {@code false} if not
- bool isExpectedStartArrayToken() =>
- _isExpectedStartArrayToken(reference).boolean;
+ bool isExpectedStartArrayToken() => jniAccessors.callMethodWithArgs(reference,
+ _id_isExpectedStartArrayToken, jni.JniType.booleanType, []).boolean;
- static final _isExpectedStartObjectToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonParser__isExpectedStartObjectToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isExpectedStartObjectToken = jniAccessors.getMethodIDOf(
+ _classRef, "isExpectedStartObjectToken", "()Z");
/// from: public boolean isExpectedStartObjectToken()
///
@@ -1210,14 +1093,13 @@
/// start-array marker (such JsonToken\#START_OBJECT);
/// {@code false} if not
///@since 2.5
- bool isExpectedStartObjectToken() =>
- _isExpectedStartObjectToken(reference).boolean;
+ bool isExpectedStartObjectToken() => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_isExpectedStartObjectToken,
+ jni.JniType.booleanType, []).boolean;
- static final _isExpectedNumberIntToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonParser__isExpectedNumberIntToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isExpectedNumberIntToken =
+ jniAccessors.getMethodIDOf(_classRef, "isExpectedNumberIntToken", "()Z");
/// from: public boolean isExpectedNumberIntToken()
///
@@ -1230,14 +1112,11 @@
/// start-array marker (such JsonToken\#VALUE_NUMBER_INT);
/// {@code false} if not
///@since 2.12
- bool isExpectedNumberIntToken() =>
- _isExpectedNumberIntToken(reference).boolean;
+ bool isExpectedNumberIntToken() => jniAccessors.callMethodWithArgs(reference,
+ _id_isExpectedNumberIntToken, jni.JniType.booleanType, []).boolean;
- static final _isNaN = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__isNaN")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isNaN =
+ jniAccessors.getMethodIDOf(_classRef, "isNaN", "()Z");
/// from: public boolean isNaN()
///
@@ -1253,13 +1132,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
///@since 2.9
- bool isNaN() => _isNaN(reference).boolean;
+ bool isNaN() => jniAccessors.callMethodWithArgs(
+ reference, _id_isNaN, jni.JniType.booleanType, []).boolean;
- static final _clearCurrentToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__clearCurrentToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_clearCurrentToken =
+ jniAccessors.getMethodIDOf(_classRef, "clearCurrentToken", "()V");
/// from: public abstract void clearCurrentToken()
///
@@ -1273,13 +1150,11 @@
/// 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() => _clearCurrentToken(reference).check();
+ void clearCurrentToken() => jniAccessors.callMethodWithArgs(
+ reference, _id_clearCurrentToken, jni.JniType.voidType, []).check();
- static final _getLastClearedToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getLastClearedToken")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getLastClearedToken = jniAccessors.getMethodIDOf(_classRef,
+ "getLastClearedToken", "()Lcom/fasterxml/jackson/core/JsonToken;");
/// from: public abstract com.fasterxml.jackson.core.JsonToken getLastClearedToken()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1291,15 +1166,11 @@
/// or if parser has been closed.
///@return Last cleared token, if any; {@code null} otherwise
jsontoken_.JsonToken getLastClearedToken() =>
- jsontoken_.JsonToken.fromRef(_getLastClearedToken(reference).object);
+ jsontoken_.JsonToken.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getLastClearedToken, jni.JniType.objectType, []).object);
- static final _overrideCurrentName = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__overrideCurrentName")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_overrideCurrentName = jniAccessors.getMethodIDOf(
+ _classRef, "overrideCurrentName", "(Ljava/lang/String;)V");
/// from: public abstract void overrideCurrentName(java.lang.String name)
///
@@ -1312,13 +1183,11 @@
/// 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) =>
- _overrideCurrentName(reference, name.reference).check();
+ jniAccessors.callMethodWithArgs(reference, _id_overrideCurrentName,
+ jni.JniType.voidType, [name.reference]).check();
- static final _getCurrentName = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getCurrentName")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getCurrentName = jniAccessors.getMethodIDOf(
+ _classRef, "getCurrentName", "()Ljava/lang/String;");
/// from: public abstract java.lang.String getCurrentName()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1328,13 +1197,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniString getCurrentName() =>
- jni.JniString.fromRef(_getCurrentName(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getCurrentName, jni.JniType.objectType, []).object);
- static final _currentName = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__currentName")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_currentName = jniAccessors.getMethodIDOf(
+ _classRef, "currentName", "()Ljava/lang/String;");
/// from: public java.lang.String currentName()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1349,13 +1216,11 @@
/// JsonParseException for decoding problems
///@since 2.10
jni.JniString currentName() =>
- jni.JniString.fromRef(_currentName(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_currentName, jni.JniType.objectType, []).object);
- static final _getText = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getText")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getText =
+ jniAccessors.getMethodIDOf(_classRef, "getText", "()Ljava/lang/String;");
/// from: public abstract java.lang.String getText()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1368,15 +1233,12 @@
/// by \#nextToken() or other iteration methods)
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- jni.JniString getText() => jni.JniString.fromRef(_getText(reference).object);
+ jni.JniString getText() =>
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getText, jni.JniType.objectType, []).object);
- static final _getText1 = jniLookup<
- 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>)>();
+ static final _id_getText1 =
+ jniAccessors.getMethodIDOf(_classRef, "getText", "(Ljava/io/Writer;)I");
/// from: public int getText(java.io.Writer writer)
///
@@ -1395,14 +1257,11 @@
/// {@code writer}, or
/// JsonParseException for decoding problems
///@since 2.8
- int getText1(jni.JniObject writer) =>
- _getText1(reference, writer.reference).integer;
+ int getText1(jni.JniObject writer) => jniAccessors.callMethodWithArgs(
+ reference, _id_getText1, jni.JniType.intType, [writer.reference]).integer;
- static final _getTextCharacters = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getTextCharacters")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getTextCharacters =
+ jniAccessors.getMethodIDOf(_classRef, "getTextCharacters", "()[C");
/// from: public abstract char[] getTextCharacters()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1435,13 +1294,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniObject getTextCharacters() =>
- jni.JniObject.fromRef(_getTextCharacters(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getTextCharacters, jni.JniType.objectType, []).object);
- static final _getTextLength = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getTextLength")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getTextLength =
+ jniAccessors.getMethodIDOf(_classRef, "getTextLength", "()I");
/// from: public abstract int getTextLength()
///
@@ -1452,13 +1309,11 @@
/// textual content of the current token.
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getTextLength() => _getTextLength(reference).integer;
+ int getTextLength() => jniAccessors.callMethodWithArgs(
+ reference, _id_getTextLength, jni.JniType.intType, []).integer;
- static final _getTextOffset = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getTextOffset")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getTextOffset =
+ jniAccessors.getMethodIDOf(_classRef, "getTextOffset", "()I");
/// from: public abstract int getTextOffset()
///
@@ -1469,13 +1324,11 @@
/// textual content of the current token.
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getTextOffset() => _getTextOffset(reference).integer;
+ int getTextOffset() => jniAccessors.callMethodWithArgs(
+ reference, _id_getTextOffset, jni.JniType.intType, []).integer;
- static final _hasTextCharacters = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__hasTextCharacters")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_hasTextCharacters =
+ jniAccessors.getMethodIDOf(_classRef, "hasTextCharacters", "()Z");
/// from: public abstract boolean hasTextCharacters()
///
@@ -1493,13 +1346,11 @@
///@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() => _hasTextCharacters(reference).boolean;
+ bool hasTextCharacters() => jniAccessors.callMethodWithArgs(
+ reference, _id_hasTextCharacters, jni.JniType.booleanType, []).boolean;
- static final _getNumberValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getNumberValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getNumberValue = jniAccessors.getMethodIDOf(
+ _classRef, "getNumberValue", "()Ljava/lang/Number;");
/// from: public abstract java.lang.Number getNumberValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1515,13 +1366,11 @@
/// (invalid format for numbers); plain IOException if underlying
/// content read fails (possible if values are extracted lazily)
jni.JniObject getNumberValue() =>
- jni.JniObject.fromRef(_getNumberValue(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getNumberValue, jni.JniType.objectType, []).object);
- static final _getNumberValueExact = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getNumberValueExact")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getNumberValueExact = jniAccessors.getMethodIDOf(
+ _classRef, "getNumberValueExact", "()Ljava/lang/Number;");
/// from: public java.lang.Number getNumberValueExact()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1541,13 +1390,11 @@
/// content read fails (possible if values are extracted lazily)
///@since 2.12
jni.JniObject getNumberValueExact() =>
- jni.JniObject.fromRef(_getNumberValueExact(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getNumberValueExact, jni.JniType.objectType, []).object);
- static final _getNumberType = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getNumberType")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getNumberType = jniAccessors.getMethodIDOf(_classRef,
+ "getNumberType", "()Lcom/fasterxml/jackson/core/JsonParser\$NumberType;");
/// from: public abstract com.fasterxml.jackson.core.JsonParser.NumberType getNumberType()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1560,13 +1407,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
JsonParser_NumberType getNumberType() =>
- JsonParser_NumberType.fromRef(_getNumberType(reference).object);
+ JsonParser_NumberType.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getNumberType, jni.JniType.objectType, []).object);
- static final _getByteValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getByteValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getByteValue =
+ jniAccessors.getMethodIDOf(_classRef, "getByteValue", "()B");
/// from: public byte getByteValue()
///
@@ -1591,13 +1436,11 @@
/// range of {@code [-128, 255]}); otherwise exception thrown
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getByteValue() => _getByteValue(reference).byte;
+ int getByteValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_getByteValue, jni.JniType.byteType, []).byte;
- static final _getShortValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getShortValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getShortValue =
+ jniAccessors.getMethodIDOf(_classRef, "getShortValue", "()S");
/// from: public short getShortValue()
///
@@ -1616,13 +1459,11 @@
/// Java 16-bit signed {@code short} range); otherwise exception thrown
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getShortValue() => _getShortValue(reference).short;
+ int getShortValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_getShortValue, jni.JniType.shortType, []).short;
- static final _getIntValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getIntValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getIntValue =
+ jniAccessors.getMethodIDOf(_classRef, "getIntValue", "()I");
/// from: public abstract int getIntValue()
///
@@ -1641,13 +1482,11 @@
/// Java 32-bit signed {@code int} range); otherwise exception thrown
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getIntValue() => _getIntValue(reference).integer;
+ int getIntValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_getIntValue, jni.JniType.intType, []).integer;
- static final _getLongValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getLongValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getLongValue =
+ jniAccessors.getMethodIDOf(_classRef, "getLongValue", "()J");
/// from: public abstract long getLongValue()
///
@@ -1666,13 +1505,11 @@
/// Java 32-bit signed {@code long} range); otherwise exception thrown
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getLongValue() => _getLongValue(reference).long;
+ int getLongValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_getLongValue, jni.JniType.longType, []).long;
- static final _getBigIntegerValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getBigIntegerValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getBigIntegerValue = jniAccessors.getMethodIDOf(
+ _classRef, "getBigIntegerValue", "()Ljava/math/BigInteger;");
/// from: public abstract java.math.BigInteger getBigIntegerValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1689,13 +1526,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniObject getBigIntegerValue() =>
- jni.JniObject.fromRef(_getBigIntegerValue(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getBigIntegerValue, jni.JniType.objectType, []).object);
- static final _getFloatValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getFloatValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getFloatValue =
+ jniAccessors.getMethodIDOf(_classRef, "getFloatValue", "()F");
/// from: public abstract float getFloatValue()
///
@@ -1714,13 +1549,11 @@
/// Java {@code float} range); otherwise exception thrown
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- double getFloatValue() => _getFloatValue(reference).float;
+ double getFloatValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_getFloatValue, jni.JniType.floatType, []).float;
- static final _getDoubleValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getDoubleValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getDoubleValue =
+ jniAccessors.getMethodIDOf(_classRef, "getDoubleValue", "()D");
/// from: public abstract double getDoubleValue()
///
@@ -1739,13 +1572,11 @@
/// Java {@code double} range); otherwise exception thrown
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- double getDoubleValue() => _getDoubleValue(reference).doubleFloat;
+ double getDoubleValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_getDoubleValue, jni.JniType.doubleType, []).doubleFloat;
- static final _getDecimalValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getDecimalValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getDecimalValue = jniAccessors.getMethodIDOf(
+ _classRef, "getDecimalValue", "()Ljava/math/BigDecimal;");
/// from: public abstract java.math.BigDecimal getDecimalValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1759,13 +1590,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniObject getDecimalValue() =>
- jni.JniObject.fromRef(_getDecimalValue(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getDecimalValue, jni.JniType.objectType, []).object);
- static final _getBooleanValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getBooleanValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getBooleanValue =
+ jniAccessors.getMethodIDOf(_classRef, "getBooleanValue", "()Z");
/// from: public boolean getBooleanValue()
///
@@ -1780,13 +1609,11 @@
/// otherwise throws JsonParseException
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- bool getBooleanValue() => _getBooleanValue(reference).boolean;
+ bool getBooleanValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_getBooleanValue, jni.JniType.booleanType, []).boolean;
- static final _getEmbeddedObject = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getEmbeddedObject")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getEmbeddedObject = jniAccessors.getMethodIDOf(
+ _classRef, "getEmbeddedObject", "()Ljava/lang/Object;");
/// from: public java.lang.Object getEmbeddedObject()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1806,15 +1633,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniObject getEmbeddedObject() =>
- jni.JniObject.fromRef(_getEmbeddedObject(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getEmbeddedObject, jni.JniType.objectType, []).object);
- static final _getBinaryValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__getBinaryValue")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_getBinaryValue = jniAccessors.getMethodIDOf(_classRef,
+ "getBinaryValue", "(Lcom/fasterxml/jackson/core/Base64Variant;)[B");
/// from: public abstract byte[] getBinaryValue(com.fasterxml.jackson.core.Base64Variant bv)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1840,13 +1663,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniObject getBinaryValue(jni.JniObject bv) =>
- jni.JniObject.fromRef(_getBinaryValue(reference, bv.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(reference,
+ _id_getBinaryValue, jni.JniType.objectType, [bv.reference]).object);
- static final _getBinaryValue1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getBinaryValue1")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getBinaryValue1 =
+ jniAccessors.getMethodIDOf(_classRef, "getBinaryValue", "()[B");
/// from: public byte[] getBinaryValue()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -1858,15 +1679,11 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
jni.JniObject getBinaryValue1() =>
- jni.JniObject.fromRef(_getBinaryValue1(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getBinaryValue1, jni.JniType.objectType, []).object);
- static final _readBinaryValue = jniLookup<
- 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>)>();
+ static final _id_readBinaryValue = jniAccessors.getMethodIDOf(
+ _classRef, "readBinaryValue", "(Ljava/io/OutputStream;)I");
/// from: public int readBinaryValue(java.io.OutputStream out)
///
@@ -1881,18 +1698,16 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
///@since 2.1
- int readBinaryValue(jni.JniObject out) =>
- _readBinaryValue(reference, out.reference).integer;
+ int readBinaryValue(jni.JniObject out) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_readBinaryValue,
+ jni.JniType.intType,
+ [out.reference]).integer;
- static final _readBinaryValue1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__readBinaryValue1")
- .asFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>();
+ static final _id_readBinaryValue1 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "readBinaryValue",
+ "(Lcom/fasterxml/jackson/core/Base64Variant;Ljava/io/OutputStream;)I");
/// from: public int readBinaryValue(com.fasterxml.jackson.core.Base64Variant bv, java.io.OutputStream out)
///
@@ -1905,13 +1720,11 @@
/// JsonParseException for decoding problems
///@since 2.1
int readBinaryValue1(jni.JniObject bv, jni.JniObject out) =>
- _readBinaryValue1(reference, bv.reference, out.reference).integer;
+ jniAccessors.callMethodWithArgs(reference, _id_readBinaryValue1,
+ jni.JniType.intType, [bv.reference, out.reference]).integer;
- static final _getValueAsInt = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsInt")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getValueAsInt =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsInt", "()I");
/// from: public int getValueAsInt()
///
@@ -1928,13 +1741,11 @@
/// otherwise
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getValueAsInt() => _getValueAsInt(reference).integer;
+ int getValueAsInt() => jniAccessors.callMethodWithArgs(
+ reference, _id_getValueAsInt, jni.JniType.intType, []).integer;
- static final _getValueAsInt1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Int32)>>("JsonParser__getValueAsInt1")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_getValueAsInt1 =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsInt", "(I)I");
/// from: public int getValueAsInt(int def)
///
@@ -1951,13 +1762,11 @@
///@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) => _getValueAsInt1(reference, def).integer;
+ int getValueAsInt1(int def) => jniAccessors.callMethodWithArgs(
+ reference, _id_getValueAsInt1, jni.JniType.intType, [def]).integer;
- static final _getValueAsLong = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsLong")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getValueAsLong =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsLong", "()J");
/// from: public long getValueAsLong()
///
@@ -1974,13 +1783,11 @@
/// otherwise
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- int getValueAsLong() => _getValueAsLong(reference).long;
+ int getValueAsLong() => jniAccessors.callMethodWithArgs(
+ reference, _id_getValueAsLong, jni.JniType.longType, []).long;
- static final _getValueAsLong1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Int64)>>("JsonParser__getValueAsLong1")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_getValueAsLong1 =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsLong", "(J)J");
/// from: public long getValueAsLong(long def)
///
@@ -1997,13 +1804,11 @@
///@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) => _getValueAsLong1(reference, def).long;
+ int getValueAsLong1(int def) => jniAccessors.callMethodWithArgs(
+ reference, _id_getValueAsLong1, jni.JniType.longType, [def]).long;
- static final _getValueAsDouble = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsDouble")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getValueAsDouble =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsDouble", "()D");
/// from: public double getValueAsDouble()
///
@@ -2020,13 +1825,11 @@
/// otherwise
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- double getValueAsDouble() => _getValueAsDouble(reference).doubleFloat;
+ double getValueAsDouble() => jniAccessors.callMethodWithArgs(
+ reference, _id_getValueAsDouble, jni.JniType.doubleType, []).doubleFloat;
- static final _getValueAsDouble1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Double)>>("JsonParser__getValueAsDouble1")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, double)>();
+ static final _id_getValueAsDouble1 =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsDouble", "(D)D");
/// from: public double getValueAsDouble(double def)
///
@@ -2043,14 +1846,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) =>
- _getValueAsDouble1(reference, def).doubleFloat;
+ double getValueAsDouble1(double def) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_getValueAsDouble1,
+ jni.JniType.doubleType,
+ [def]).doubleFloat;
- static final _getValueAsBoolean = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsBoolean")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getValueAsBoolean =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsBoolean", "()Z");
/// from: public boolean getValueAsBoolean()
///
@@ -2067,13 +1870,11 @@
/// otherwise
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
- bool getValueAsBoolean() => _getValueAsBoolean(reference).boolean;
+ bool getValueAsBoolean() => jniAccessors.callMethodWithArgs(
+ reference, _id_getValueAsBoolean, jni.JniType.booleanType, []).boolean;
- static final _getValueAsBoolean1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Uint8)>>("JsonParser__getValueAsBoolean1")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_getValueAsBoolean1 =
+ jniAccessors.getMethodIDOf(_classRef, "getValueAsBoolean", "(Z)Z");
/// from: public boolean getValueAsBoolean(boolean def)
///
@@ -2090,14 +1891,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) =>
- _getValueAsBoolean1(reference, def ? 1 : 0).boolean;
+ bool getValueAsBoolean1(bool def) => jniAccessors.callMethodWithArgs(
+ reference,
+ _id_getValueAsBoolean1,
+ jni.JniType.booleanType,
+ [def]).boolean;
- static final _getValueAsString = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsString")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getValueAsString = jniAccessors.getMethodIDOf(
+ _classRef, "getValueAsString", "()Ljava/lang/String;");
/// from: public java.lang.String getValueAsString()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -2114,15 +1915,11 @@
/// JsonParseException for decoding problems
///@since 2.1
jni.JniString getValueAsString() =>
- jni.JniString.fromRef(_getValueAsString(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getValueAsString, jni.JniType.objectType, []).object);
- static final _getValueAsString1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__getValueAsString1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_getValueAsString1 = jniAccessors.getMethodIDOf(
+ _classRef, "getValueAsString", "(Ljava/lang/String;)Ljava/lang/String;");
/// from: public abstract java.lang.String getValueAsString(java.lang.String def)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -2139,14 +1936,15 @@
///@throws IOException for low-level read issues, or
/// JsonParseException for decoding problems
///@since 2.1
- jni.JniString getValueAsString1(jni.JniString def) => jni.JniString.fromRef(
- _getValueAsString1(reference, def.reference).object);
+ jni.JniString getValueAsString1(jni.JniString def) =>
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_getValueAsString1,
+ jni.JniType.objectType,
+ [def.reference]).object);
- static final _canReadObjectId = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__canReadObjectId")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_canReadObjectId =
+ jniAccessors.getMethodIDOf(_classRef, "canReadObjectId", "()Z");
/// from: public boolean canReadObjectId()
///
@@ -2161,13 +1959,11 @@
///@return {@code True} if the format being read supports native Object Ids;
/// {@code false} if not
///@since 2.3
- bool canReadObjectId() => _canReadObjectId(reference).boolean;
+ bool canReadObjectId() => jniAccessors.callMethodWithArgs(
+ reference, _id_canReadObjectId, jni.JniType.booleanType, []).boolean;
- static final _canReadTypeId = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__canReadTypeId")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_canReadTypeId =
+ jniAccessors.getMethodIDOf(_classRef, "canReadTypeId", "()Z");
/// from: public boolean canReadTypeId()
///
@@ -2182,13 +1978,11 @@
///@return {@code True} if the format being read supports native Type Ids;
/// {@code false} if not
///@since 2.3
- bool canReadTypeId() => _canReadTypeId(reference).boolean;
+ bool canReadTypeId() => jniAccessors.callMethodWithArgs(
+ reference, _id_canReadTypeId, jni.JniType.booleanType, []).boolean;
- static final _getObjectId = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getObjectId")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getObjectId = jniAccessors.getMethodIDOf(
+ _classRef, "getObjectId", "()Ljava/lang/Object;");
/// from: public java.lang.Object getObjectId()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -2207,13 +2001,11 @@
/// JsonParseException for decoding problems
///@since 2.3
jni.JniObject getObjectId() =>
- jni.JniObject.fromRef(_getObjectId(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getObjectId, jni.JniType.objectType, []).object);
- static final _getTypeId = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser__getTypeId")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getTypeId = jniAccessors.getMethodIDOf(
+ _classRef, "getTypeId", "()Ljava/lang/Object;");
/// from: public java.lang.Object getTypeId()
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -2232,15 +2024,11 @@
/// JsonParseException for decoding problems
///@since 2.3
jni.JniObject getTypeId() =>
- jni.JniObject.fromRef(_getTypeId(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_getTypeId, jni.JniType.objectType, []).object);
- static final _readValuesAs = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__readValuesAs")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_readValuesAs = jniAccessors.getMethodIDOf(
+ _classRef, "readValuesAs", "(Ljava/lang/Class;)Ljava/util/Iterator;");
/// from: public java.util.Iterator<T> readValuesAs(java.lang.Class<T> valueType)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -2253,16 +2041,17 @@
///@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) => jni.JniObject.fromRef(
- _readValuesAs(reference, valueType.reference).object);
+ jni.JniObject readValuesAs(jni.JniObject valueType) =>
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_readValuesAs,
+ jni.JniType.objectType,
+ [valueType.reference]).object);
- static final _readValuesAs1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Pointer<ffi.Void>)>>("JsonParser__readValuesAs1")
- .asFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();
+ static final _id_readValuesAs1 = jniAccessors.getMethodIDOf(
+ _classRef,
+ "readValuesAs",
+ "(Lcom/fasterxml/jackson/core/type/TypeReference;)Ljava/util/Iterator;");
/// from: public java.util.Iterator<T> readValuesAs(com.fasterxml.jackson.core.type.TypeReference<T> valueTypeRef)
/// The returned object must be deleted after use, by calling the `delete` method.
@@ -2276,83 +2065,84 @@
///@throws IOException if there is either an underlying I/O problem or decoding
/// issue at format layer
jni.JniObject readValuesAs1(jni.JniObject valueTypeRef) =>
- jni.JniObject.fromRef(
- _readValuesAs1(reference, valueTypeRef.reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference,
+ _id_readValuesAs1,
+ jni.JniType.objectType,
+ [valueTypeRef.reference]).object);
}
/// from: com.fasterxml.jackson.core.JsonParser$Feature
///
/// Enumeration that defines all on/off features for parsers.
class JsonParser_Feature extends jni.JniObject {
- JsonParser_Feature.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+ static final _classRef =
+ jniAccessors.getClassOf("com/fasterxml/jackson/core/JsonParser\$Feature");
+ JsonParser_Feature.fromRef(jni.JObject ref) : super.fromRef(ref);
- static final _values =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonParser_Feature__values")
- .asFunction<jni.JniResult Function()>();
+ static final _id_values = jniAccessors.getStaticMethodIDOf(_classRef,
+ "values", "()[Lcom/fasterxml/jackson/core/JsonParser\$Feature;");
/// 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() => jni.JniObject.fromRef(_values().object);
+ static jni.JniObject values() =>
+ jni.JniObject.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef, _id_values, jni.JniType.objectType, []).object);
- static final _valueOf = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser_Feature__valueOf")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_valueOf = jniAccessors.getStaticMethodIDOf(
+ _classRef,
+ "valueOf",
+ "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser\$Feature;");
/// 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) =>
- JsonParser_Feature.fromRef(_valueOf(name.reference).object);
+ JsonParser_Feature.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef,
+ _id_valueOf,
+ jni.JniType.objectType,
+ [name.reference]).object);
- static final _collectDefaults =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonParser_Feature__collectDefaults")
- .asFunction<jni.JniResult Function()>();
+ static final _id_collectDefaults =
+ jniAccessors.getStaticMethodIDOf(_classRef, "collectDefaults", "()I");
/// 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() => _collectDefaults().integer;
+ static int collectDefaults() => jniAccessors.callStaticMethodWithArgs(
+ _classRef, _id_collectDefaults, jni.JniType.intType, []).integer;
- static final _ctor =
- jniLookup<ffi.NativeFunction<jni.JniResult Function(ffi.Uint8)>>(
- "JsonParser_Feature__ctor")
- .asFunction<jni.JniResult Function(int)>();
+ static final _id_ctor =
+ jniAccessors.getMethodIDOf(_classRef, "<init>", "(Z)V");
/// from: private void <init>(boolean defaultState)
+ /// The returned object must be deleted after use, by calling the `delete` method.
JsonParser_Feature(bool defaultState)
- : super.fromRef(_ctor(defaultState ? 1 : 0).object);
+ : super.fromRef(jniAccessors
+ .newObjectWithArgs(_classRef, _id_ctor, [defaultState]).object);
- static final _enabledByDefault = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>(
- "JsonParser_Feature__enabledByDefault")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_enabledByDefault =
+ jniAccessors.getMethodIDOf(_classRef, "enabledByDefault", "()Z");
/// from: public boolean enabledByDefault()
- bool enabledByDefault() => _enabledByDefault(reference).boolean;
+ bool enabledByDefault() => jniAccessors.callMethodWithArgs(
+ reference, _id_enabledByDefault, jni.JniType.booleanType, []).boolean;
- static final _enabledIn = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>,
- ffi.Int32)>>("JsonParser_Feature__enabledIn")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_enabledIn =
+ jniAccessors.getMethodIDOf(_classRef, "enabledIn", "(I)Z");
/// from: public boolean enabledIn(int flags)
- bool enabledIn(int flags) => _enabledIn(reference, flags).boolean;
+ bool enabledIn(int flags) => jniAccessors.callMethodWithArgs(
+ reference, _id_enabledIn, jni.JniType.booleanType, [flags]).boolean;
- static final _getMask = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser_Feature__getMask")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_getMask =
+ jniAccessors.getMethodIDOf(_classRef, "getMask", "()I");
/// from: public int getMask()
- int getMask() => _getMask(reference).integer;
+ int getMask() => jniAccessors.callMethodWithArgs(
+ reference, _id_getMask, jni.JniType.intType, []).integer;
}
/// from: com.fasterxml.jackson.core.JsonParser$NumberType
@@ -2360,32 +2150,39 @@
/// Enumeration of possible "native" (optimal) types that can be
/// used for numbers.
class JsonParser_NumberType extends jni.JniObject {
- JsonParser_NumberType.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+ static final _classRef = jniAccessors
+ .getClassOf("com/fasterxml/jackson/core/JsonParser\$NumberType");
+ JsonParser_NumberType.fromRef(jni.JObject ref) : super.fromRef(ref);
- static final _values =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonParser_NumberType__values")
- .asFunction<jni.JniResult Function()>();
+ static final _id_values = jniAccessors.getStaticMethodIDOf(_classRef,
+ "values", "()[Lcom/fasterxml/jackson/core/JsonParser\$NumberType;");
/// 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() => jni.JniObject.fromRef(_values().object);
+ static jni.JniObject values() =>
+ jni.JniObject.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef, _id_values, jni.JniType.objectType, []).object);
- static final _valueOf = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonParser_NumberType__valueOf")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_valueOf = jniAccessors.getStaticMethodIDOf(
+ _classRef,
+ "valueOf",
+ "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonParser\$NumberType;");
/// 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) =>
- JsonParser_NumberType.fromRef(_valueOf(name.reference).object);
+ JsonParser_NumberType.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef,
+ _id_valueOf,
+ jni.JniType.objectType,
+ [name.reference]).object);
- static final _ctor = jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonParser_NumberType__ctor")
- .asFunction<jni.JniResult Function()>();
+ static final _id_ctor =
+ jniAccessors.getMethodIDOf(_classRef, "<init>", "()V");
/// from: private void <init>()
- JsonParser_NumberType() : super.fromRef(_ctor().object);
+ /// The returned object must be deleted after use, by calling the `delete` method.
+ JsonParser_NumberType()
+ : super.fromRef(
+ jniAccessors.newObjectWithArgs(_classRef, _id_ctor, []).object);
}
diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonToken.dart b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonToken.dart
index 01cfc9a..e7651e8 100644
--- a/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonToken.dart
+++ b/pkgs/jnigen/test/jackson_core_test/third_party/lib/com/fasterxml/jackson/core/JsonToken.dart
@@ -17,120 +17,108 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_field
+// ignore_for_file: unused_import
+// ignore_for_file: unused_shown_name
-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;
+import "package:jni/internal_helpers_for_jnigen.dart";
+
+import "../../../../_init.dart" show jniEnv, jniAccessors;
/// from: com.fasterxml.jackson.core.JsonToken
///
/// Enumeration for basic token types used for returning results
/// of parsing JSON content.
class JsonToken extends jni.JniObject {
- JsonToken.fromRef(ffi.Pointer<ffi.Void> ref) : super.fromRef(ref);
+ static final _classRef =
+ jniAccessors.getClassOf("com/fasterxml/jackson/core/JsonToken");
+ JsonToken.fromRef(jni.JObject ref) : super.fromRef(ref);
- static final _values =
- jniLookup<ffi.NativeFunction<jni.JniResult Function()>>(
- "JsonToken__values")
- .asFunction<jni.JniResult Function()>();
+ static final _id_values = jniAccessors.getStaticMethodIDOf(
+ _classRef, "values", "()[Lcom/fasterxml/jackson/core/JsonToken;");
/// 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() => jni.JniObject.fromRef(_values().object);
+ static jni.JniObject values() =>
+ jni.JniObject.fromRef(jniAccessors.callStaticMethodWithArgs(
+ _classRef, _id_values, jni.JniType.objectType, []).object);
- static final _valueOf = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__valueOf")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_valueOf = jniAccessors.getStaticMethodIDOf(_classRef,
+ "valueOf", "(Ljava/lang/String;)Lcom/fasterxml/jackson/core/JsonToken;");
/// 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) =>
- JsonToken.fromRef(_valueOf(name.reference).object);
+ JsonToken.fromRef(jniAccessors.callStaticMethodWithArgs(_classRef,
+ _id_valueOf, jni.JniType.objectType, [name.reference]).object);
- static final _ctor = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>, ffi.Int32)>>("JsonToken__ctor")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>, int)>();
+ static final _id_ctor =
+ jniAccessors.getMethodIDOf(_classRef, "<init>", "(Ljava/lang/String;I)V");
/// from: private void <init>(java.lang.String token, int id)
+ /// The returned object must be deleted after use, by calling the `delete` method.
///
/// @param token representation for this token, if there is a
/// single static representation; null otherwise
///@param id Numeric id from JsonTokenId
JsonToken(jni.JniString token, int id)
- : super.fromRef(_ctor(token.reference, id).object);
+ : super.fromRef(jniAccessors.newObjectWithArgs(
+ _classRef, _id_ctor, [token.reference, id]).object);
- static final _id = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer<ffi.Void>)>>("JsonToken__id")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_id = jniAccessors.getMethodIDOf(_classRef, "id", "()I");
/// from: public final int id()
- int id() => _id(reference).integer;
+ int id() => jniAccessors
+ .callMethodWithArgs(reference, _id_id, jni.JniType.intType, []).integer;
- static final _asString = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__asString")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_asString =
+ jniAccessors.getMethodIDOf(_classRef, "asString", "()Ljava/lang/String;");
/// from: public final java.lang.String asString()
/// The returned object must be deleted after use, by calling the `delete` method.
jni.JniString asString() =>
- jni.JniString.fromRef(_asString(reference).object);
+ jni.JniString.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_asString, jni.JniType.objectType, []).object);
- static final _asCharArray = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__asCharArray")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_asCharArray =
+ jniAccessors.getMethodIDOf(_classRef, "asCharArray", "()[C");
/// from: public final char[] asCharArray()
/// The returned object must be deleted after use, by calling the `delete` method.
jni.JniObject asCharArray() =>
- jni.JniObject.fromRef(_asCharArray(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_asCharArray, jni.JniType.objectType, []).object);
- static final _asByteArray = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__asByteArray")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_asByteArray =
+ jniAccessors.getMethodIDOf(_classRef, "asByteArray", "()[B");
/// from: public final byte[] asByteArray()
/// The returned object must be deleted after use, by calling the `delete` method.
jni.JniObject asByteArray() =>
- jni.JniObject.fromRef(_asByteArray(reference).object);
+ jni.JniObject.fromRef(jniAccessors.callMethodWithArgs(
+ reference, _id_asByteArray, jni.JniType.objectType, []).object);
- static final _isNumeric = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__isNumeric")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isNumeric =
+ jniAccessors.getMethodIDOf(_classRef, "isNumeric", "()Z");
/// 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() => _isNumeric(reference).boolean;
+ bool isNumeric() => jniAccessors.callMethodWithArgs(
+ reference, _id_isNumeric, jni.JniType.booleanType, []).boolean;
- static final _isStructStart = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__isStructStart")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isStructStart =
+ jniAccessors.getMethodIDOf(_classRef, "isStructStart", "()Z");
/// from: public final boolean isStructStart()
///
@@ -141,13 +129,11 @@
///@return {@code True} if this token is {@code START_OBJECT} or {@code START_ARRAY},
/// {@code false} otherwise
///@since 2.3
- bool isStructStart() => _isStructStart(reference).boolean;
+ bool isStructStart() => jniAccessors.callMethodWithArgs(
+ reference, _id_isStructStart, jni.JniType.booleanType, []).boolean;
- static final _isStructEnd = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__isStructEnd")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isStructEnd =
+ jniAccessors.getMethodIDOf(_classRef, "isStructEnd", "()Z");
/// from: public final boolean isStructEnd()
///
@@ -158,13 +144,11 @@
///@return {@code True} if this token is {@code END_OBJECT} or {@code END_ARRAY},
/// {@code false} otherwise
///@since 2.3
- bool isStructEnd() => _isStructEnd(reference).boolean;
+ bool isStructEnd() => jniAccessors.callMethodWithArgs(
+ reference, _id_isStructEnd, jni.JniType.booleanType, []).boolean;
- static final _isScalarValue = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__isScalarValue")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isScalarValue =
+ jniAccessors.getMethodIDOf(_classRef, "isScalarValue", "()Z");
/// from: public final boolean isScalarValue()
///
@@ -174,17 +158,16 @@
/// {@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() => _isScalarValue(reference).boolean;
+ bool isScalarValue() => jniAccessors.callMethodWithArgs(
+ reference, _id_isScalarValue, jni.JniType.booleanType, []).boolean;
- static final _isBoolean = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer<ffi.Void>)>>("JsonToken__isBoolean")
- .asFunction<jni.JniResult Function(ffi.Pointer<ffi.Void>)>();
+ static final _id_isBoolean =
+ jniAccessors.getMethodIDOf(_classRef, "isBoolean", "()Z");
/// from: public final boolean isBoolean()
///
/// @return {@code True} if this token is {@code VALUE_TRUE} or {@code VALUE_FALSE},
/// {@code false} otherwise
- bool isBoolean() => _isBoolean(reference).boolean;
+ bool isBoolean() => jniAccessors.callMethodWithArgs(
+ reference, _id_isBoolean, jni.JniType.booleanType, []).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
deleted file mode 100644
index a256c2f..0000000
--- a/pkgs/jnigen/test/jackson_core_test/third_party/src/.clang-format
+++ /dev/null
@@ -1,15 +0,0 @@
-# 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/CMakeLists.txt b/pkgs/jnigen/test/jackson_core_test/third_party/src/CMakeLists.txt
deleted file mode 100644
index 1df24fc..0000000
--- a/pkgs/jnigen/test/jackson_core_test/third_party/src/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-# jni_native_build (Build with jni:setup. Do not delete this line.)
-
-# The Flutter tooling requires that developers have CMake 3.10 or later
-# installed. You should not increase this version, as doing so will cause
-# the plugin to fail to compile for some customers of the plugin.
-cmake_minimum_required(VERSION 3.10)
-
-project(jackson_core_test VERSION 0.0.1 LANGUAGES C)
-
-add_library(jackson_core_test SHARED
- "./jackson_core_test.c"
-)
-
-set_target_properties(jackson_core_test PROPERTIES
- OUTPUT_NAME "jackson_core_test"
-)
-
-target_compile_definitions(jackson_core_test PUBLIC DART_SHARED_LIB)
-
-if(WIN32)
- set_target_properties(${TARGET_NAME} PROPERTIES
- LINK_FLAGS "/DELAYLOAD:jvm.dll")
-endif()
-
-if (ANDROID)
- target_link_libraries(jackson_core_test log)
-else()
- find_package(Java REQUIRED)
- find_package(JNI REQUIRED)
- include_directories(${JNI_INCLUDE_DIRS})
- target_link_libraries(jackson_core_test ${JNI_LIBRARIES})
-endif()
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
deleted file mode 100644
index efb9079..0000000
--- a/pkgs/jnigen/test/jackson_core_test/third_party/src/dartjni.h
+++ /dev/null
@@ -1,257 +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.
-
-#pragma once
-
-// Note: include appropriate system jni.h as found by CMake, not third_party/jni.h.
-#include <jni.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#if _WIN32
-#include <windows.h>
-#else
-#include <pthread.h>
-#include <unistd.h>
-#endif
-
-#if _WIN32
-#define FFI_PLUGIN_EXPORT __declspec(dllexport)
-#else
-#define FFI_PLUGIN_EXPORT
-#endif
-
-#if defined _WIN32
-#define thread_local __declspec(thread)
-#else
-#define thread_local __thread
-#endif
-
-#ifdef __ANDROID__
-#include <android/log.h>
-#endif
-
-#ifdef __ANDROID__
-#define __ENVP_CAST (JNIEnv**)
-#else
-#define __ENVP_CAST (void**)
-#endif
-
-/// Stores the global state of the JNI.
-typedef struct JniContext {
- JavaVM* jvm;
- jobject classLoader;
- jmethodID loadClassMethod;
- jobject currentActivity;
- jobject appContext;
-} JniContext;
-
-// jniEnv for this thread, used by inline functions in this header,
-// therefore declared as extern.
-extern thread_local JNIEnv* jniEnv;
-
-extern JniContext jni;
-
-/// Types used by JNI API to distinguish between primitive types.
-enum JniType {
- booleanType = 0,
- byteType = 1,
- shortType = 2,
- charType = 3,
- intType = 4,
- longType = 5,
- floatType = 6,
- doubleType = 7,
- objectType = 8,
- voidType = 9,
-};
-
-/// Result type for use by JNI.
-///
-/// If [exception] is null, it means the result is valid.
-/// It's assumed that the caller knows the expected type in [result].
-typedef struct JniResult {
- jvalue result;
- jthrowable exception;
-} JniResult;
-
-/// Similar to [JniResult] but for class lookups.
-typedef struct JniClassLookupResult {
- jclass classRef;
- jthrowable exception;
-} JniClassLookupResult;
-
-/// Similar to [JniResult] but for method/field ID lookups.
-typedef struct JniPointerResult {
- void* id;
- 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.
-///
-/// Flutter embedding checks for pending JNI exceptions before an FFI transition, which requires us
-/// to check for and clear the exception before returning to dart code, which requires these functions
-/// to return result types.
-typedef struct JniAccessors {
- JniClassLookupResult (*getClass)(char* internalName);
- JniPointerResult (*getFieldID)(jclass cls, char* fieldName, char* signature);
- JniPointerResult (*getStaticFieldID)(jclass cls,
- char* fieldName,
- char* signature);
- JniPointerResult (*getMethodID)(jclass cls,
- char* methodName,
- char* signature);
- JniPointerResult (*getStaticMethodID)(jclass cls,
- char* methodName,
- char* signature);
- JniResult (*newObject)(jclass cls, jmethodID ctor, jvalue* args);
- JniResult (*callMethod)(jobject obj,
- jmethodID methodID,
- int callType,
- jvalue* args);
- JniResult (*callStaticMethod)(jclass cls,
- jmethodID methodID,
- int callType,
- 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();
-
-FFI_PLUGIN_EXPORT JavaVM* GetJavaVM(void);
-
-FFI_PLUGIN_EXPORT JNIEnv* GetJniEnv(void);
-
-FFI_PLUGIN_EXPORT JNIEnv* SpawnJvm(JavaVMInitArgs* args);
-
-FFI_PLUGIN_EXPORT jclass LoadClass(const char* name);
-
-FFI_PLUGIN_EXPORT jobject GetClassLoader(void);
-
-FFI_PLUGIN_EXPORT jobject GetApplicationContext(void);
-
-FFI_PLUGIN_EXPORT jobject GetCurrentActivity(void);
-
-// Migration note: Below inline functions are required by C bindings, but can be moved to dartjni.c
-// once migration to pure dart bindings is complete.
-
-// `static inline` because `inline` doesn't work, it may still not
-// inline the function in which case a linker error may be produced.
-//
-// There has to be a better way to do this. Either to force inlining on target
-// platforms, or just leave it as normal function.
-
-static inline void __load_class_into(jclass* cls, const char* name) {
-#ifdef __ANDROID__
- jstring className = (*jniEnv)->NewStringUTF(jniEnv, name);
- *cls = (*jniEnv)->CallObjectMethod(jniEnv, jni.classLoader,
- jni.loadClassMethod, className);
- (*jniEnv)->DeleteLocalRef(jniEnv, className);
-#else
- *cls = (*jniEnv)->FindClass(jniEnv, name);
-#endif
-}
-
-static inline void load_class(jclass* cls, const char* name) {
- if (*cls == NULL) {
- __load_class_into(cls, name);
- }
-}
-
-static inline void load_class_gr(jclass* cls, const char* name) {
- if (*cls == NULL) {
- jclass tmp;
- __load_class_into(&tmp, name);
- *cls = (*jniEnv)->NewGlobalRef(jniEnv, tmp);
- (*jniEnv)->DeleteLocalRef(jniEnv, tmp);
- }
-}
-
-static inline void attach_thread() {
- if (jniEnv == NULL) {
- (*jni.jvm)->AttachCurrentThread(jni.jvm, __ENVP_CAST & jniEnv, NULL);
- }
-}
-
-static inline void load_method(jclass cls,
- jmethodID* res,
- const char* name,
- const char* sig) {
- if (*res == NULL) {
- *res = (*jniEnv)->GetMethodID(jniEnv, cls, name, sig);
- }
-}
-
-static inline void load_static_method(jclass cls,
- jmethodID* res,
- const char* name,
- const char* sig) {
- if (*res == NULL) {
- *res = (*jniEnv)->GetStaticMethodID(jniEnv, cls, name, sig);
- }
-}
-
-static inline void load_field(jclass cls,
- jfieldID* res,
- const char* name,
- const char* sig) {
- if (*res == NULL) {
- *res = (*jniEnv)->GetFieldID(jniEnv, cls, name, sig);
- }
-}
-
-static inline void load_static_field(jclass cls,
- jfieldID* res,
- const char* name,
- const char* sig) {
- if (*res == NULL) {
- *res = (*jniEnv)->GetStaticFieldID(jniEnv, cls, name, sig);
- }
-}
-
-static inline jobject to_global_ref(jobject ref) {
- jobject g = (*jniEnv)->NewGlobalRef(jniEnv, ref);
- (*jniEnv)->DeleteLocalRef(jniEnv, ref);
- return g;
-}
-
-// These functions are useful for C+Dart bindings, and not required for pure dart bindings.
-
-FFI_PLUGIN_EXPORT JniContext GetJniContext();
-/// For use by jni_gen's generated code
-/// don't use these.
-
-// these 2 fn ptr vars will be defined by generated code library
-extern JniContext (*context_getter)(void);
-extern JNIEnv* (*env_getter)(void);
-
-// this function will be exported by generated code library
-// it will set above 2 variables.
-FFI_PLUGIN_EXPORT void setJniGetters(struct JniContext (*cg)(void),
- JNIEnv* (*eg)(void));
-
-static inline void load_env() {
- if (jniEnv == NULL) {
- jni = context_getter();
- 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
deleted file mode 100644
index dea4555..0000000
--- a/pkgs/jnigen/test/jackson_core_test/third_party/src/jackson_core_test.c
+++ /dev/null
@@ -1,3736 +0,0 @@
-// Generated from jackson-core which is licensed under the Apache License 2.0.
-// The following copyright from the original authors applies.
-// See https://github.com/FasterXML/jackson-core/blob/2.14/LICENSE
-//
-// Copyright (c) 2007 - The Jackson Project Authors
-// Licensed 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!
-
-#include <stdint.h>
-#include "dartjni.h"
-#include "jni.h"
-
-thread_local JNIEnv* jniEnv;
-JniContext jni;
-
-JniContext (*context_getter)(void);
-JNIEnv* (*env_getter)(void);
-
-void setJniGetters(JniContext (*cg)(void), JNIEnv* (*eg)(void)) {
- context_getter = cg;
- env_getter = eg;
-}
-
-// com.fasterxml.jackson.core.JsonFactory
-jclass _c_JsonFactory = NULL;
-
-jmethodID _m_JsonFactory__ctor = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__ctor1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__ctor2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__ctor3 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__ctor4 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__rebuild = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__builder = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__copy = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__readResolve = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__requiresPropertyOrdering = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__canHandleBinaryNatively = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__canUseCharArrays = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__canParseAsync = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getFormatReadFeatureType = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getFormatWriteFeatureType = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__canUseSchema = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getFormatName = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__hasFormat = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__requiresCustomCodec = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__hasJSONFormat = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__version = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__configure = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__enable = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__disable = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__isEnabled = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getParserFeatures = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getGeneratorFeatures = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getFormatParserFeatures = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getFormatGeneratorFeatures = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__configure1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__enable1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__disable1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__isEnabled1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__isEnabled2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getInputDecorator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__setInputDecorator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__configure2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__enable2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__disable2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__isEnabled3 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__isEnabled4 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getCharacterEscapes = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__setCharacterEscapes = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getOutputDecorator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__setOutputDecorator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__setRootValueSeparator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getRootValueSeparator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__setCodec = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__getCodec = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createParser = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createParser1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createParser2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createParser3 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createParser4 = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "([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_JsonFactory__createParser5 = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "([BII)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_JsonFactory__createParser6 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createParser7 = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "([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_JsonFactory__createParser8 = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "([CII)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_JsonFactory__createParser9 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createNonBlockingByteArrayParser = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createGenerator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createGenerator1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createGenerator2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createGenerator3 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createGenerator4 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createGenerator5 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonParser = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonParser1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonParser2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonParser3 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonParser4 = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "([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_JsonFactory__createJsonParser5 = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "([BII)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_JsonFactory__createJsonParser6 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonGenerator = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonGenerator1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__createJsonGenerator2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__DEFAULT_FACTORY_FEATURE_FLAGS = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__DEFAULT_PARSER_FEATURE_FLAGS = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__DEFAULT_GENERATOR_FEATURE_FLAGS = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory__DEFAULT_ROOT_VALUE_SEPARATOR = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory_Feature = NULL;
-
-jmethodID _m_JsonFactory_Feature__values = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "()[Lcom/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_JsonFactory_Feature__valueOf = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory_Feature__collectDefaults = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory_Feature__ctor = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory_Feature__enabledByDefault = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory_Feature__enabledIn = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonFactory_Feature__getMask = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser = NULL;
-
-jmethodID _m_JsonParser__ctor = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__ctor1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getCodec = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__setCodec = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getInputSource = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__setRequestPayloadOnError = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__setRequestPayloadOnError1 = NULL;
-FFI_PLUGIN_EXPORT
-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", "([BLjava/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_JsonParser__setRequestPayloadOnError2 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__setSchema = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getSchema = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__canUseSchema = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__requiresCustomCodec = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__canParseAsync = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getNonBlockingInputFeeder = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getReadCapabilities = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__version = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__close = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__isClosed = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getParsingContext = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__currentLocation = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__currentTokenLocation = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getCurrentLocation = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getTokenLocation = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__currentValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__assignCurrentValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getCurrentValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__setCurrentValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__releaseBuffered = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__releaseBuffered1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__enable = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__disable = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__configure = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__isEnabled = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__isEnabled1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getFeatureMask = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__setFeatureMask = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__overrideStdFeatures = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getFormatFeatures = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__overrideFormatFeatures = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextFieldName = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextFieldName1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextTextValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextIntValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextLongValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__nextBooleanValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__skipChildren = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__finishToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__currentToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__currentTokenId = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getCurrentToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getCurrentTokenId = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__hasCurrentToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__hasTokenId = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__hasToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__isExpectedStartArrayToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__isExpectedStartObjectToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__isExpectedNumberIntToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__isNaN = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__clearCurrentToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getLastClearedToken = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__overrideCurrentName = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getCurrentName = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__currentName = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getText = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getText1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getTextCharacters = NULL;
-FFI_PLUGIN_EXPORT
-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", "()[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_JsonParser__getTextLength = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getTextOffset = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__hasTextCharacters = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getNumberValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getNumberValueExact = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getNumberType = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getByteValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getShortValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getIntValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getLongValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getBigIntegerValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getFloatValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getDoubleValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getDecimalValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getBooleanValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getEmbeddedObject = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getBinaryValue = NULL;
-FFI_PLUGIN_EXPORT
-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;)[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_JsonParser__getBinaryValue1 = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "()[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_JsonParser__readBinaryValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__readBinaryValue1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsInt = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsInt1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsLong = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsLong1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsDouble = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsDouble1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsBoolean = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsBoolean1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsString = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getValueAsString1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__canReadObjectId = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__canReadTypeId = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getObjectId = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__getTypeId = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__readValueAs = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__readValueAs1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__readValuesAs = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__readValuesAs1 = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__readValueAsTree = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser__DEFAULT_READ_CAPABILITIES = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_Feature = NULL;
-
-jmethodID _m_JsonParser_Feature__values = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "()[Lcom/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_JsonParser_Feature__valueOf = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_Feature__collectDefaults = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_Feature__ctor = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_Feature__enabledByDefault = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_Feature__enabledIn = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_Feature__getMask = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_NumberType = NULL;
-
-jmethodID _m_JsonParser_NumberType__values = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "()[Lcom/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_JsonParser_NumberType__valueOf = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonParser_NumberType__ctor = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken = NULL;
-
-jmethodID _m_JsonToken__values = NULL;
-FFI_PLUGIN_EXPORT
-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",
- "()[Lcom/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_JsonToken__valueOf = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__ctor = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__id = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__asString = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__asCharArray = NULL;
-FFI_PLUGIN_EXPORT
-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", "()[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_JsonToken__asByteArray = NULL;
-FFI_PLUGIN_EXPORT
-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", "()[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_JsonToken__isNumeric = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__isStructStart = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__isStructEnd = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__isScalarValue = NULL;
-FFI_PLUGIN_EXPORT
-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_JsonToken__isBoolean = NULL;
-FFI_PLUGIN_EXPORT
-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/simple_package_test/lib/simple_package.dart b/pkgs/jnigen/test/simple_package_test/lib/simple_package.dart
index a31e667..6dab932 100644
--- a/pkgs/jnigen/test/simple_package_test/lib/simple_package.dart
+++ b/pkgs/jnigen/test/simple_package_test/lib/simple_package.dart
@@ -4,14 +4,14 @@
// Autogenerated by jnigen. DO NOT EDIT!
-// ignore_for_file: camel_case_types
-// ignore_for_file: file_names
-// ignore_for_file: unused_import
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: constant_identifier_names
// ignore_for_file: annotate_overrides
+// ignore_for_file: camel_case_types
+// ignore_for_file: constant_identifier_names
+// ignore_for_file: file_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
+// ignore_for_file: non_constant_identifier_names
// ignore_for_file: unused_element
+// ignore_for_file: unused_import
import "dart:ffi" as ffi;
import "package:jni/internal_helpers_for_jnigen.dart";
diff --git a/pkgs/jnigen/test/test_util/test_util.dart b/pkgs/jnigen/test/test_util/test_util.dart
index 1a14265..27fa75b 100644
--- a/pkgs/jnigen/test/test_util/test_util.dart
+++ b/pkgs/jnigen/test/test_util/test_util.dart
@@ -7,20 +7,27 @@
import 'package:jnigen/jnigen.dart';
import 'package:path/path.dart' hide equals;
import 'package:test/test.dart';
+import 'package:logging/logging.dart' show Level;
+
+import 'package:jnigen/src/logging/logging.dart' show printError;
Future<bool> isEmptyOrNotExistDir(String path) async {
final dir = Directory(path);
return (!await dir.exists()) || (await dir.list().length == 0);
}
-/// Runs "$exec ${args...}" and returns exit code.
-/// Required because only Process.start provides inheritStdio argument
+/// Runs command, and prints output only if the exit status is non-zero.
Future<int> runCommand(String exec, List<String> args,
{String? workingDirectory}) async {
- stderr.writeln('[exec] $exec ${args.join(" ")}');
- final proc = await Process.start(exec, args,
- workingDirectory: workingDirectory, mode: ProcessStartMode.inheritStdio);
- return await proc.exitCode;
+ final proc =
+ await Process.run(exec, args, workingDirectory: workingDirectory);
+ if (proc.exitCode != 0) {
+ printError('command exited with exit status ${proc.exitCode}:\n'
+ '$exec ${args.join(" ")}\n');
+ printError(proc.stdout);
+ printError(proc.stderr);
+ }
+ return proc.exitCode;
}
/// List all JAR files in [testRoot]/jar
@@ -39,28 +46,18 @@
/// Read file normalizing CRLF to LF.
String readFile(File file) => file.readAsStringSync().replaceAll('\r\n', '\n');
-/// compares 2 hierarchies, with and without prefix 'test_'
+/// Compares 2 hierarchies using `git diff --no-index`.
void comparePaths(String path1, String path2) {
- if (File(path1).existsSync()) {
- expect(
- readFile(File(path1)),
- readFile(File(path2)),
- );
- return;
- }
- final list1 = Directory(path1).listSync(recursive: true);
- final list2 = Directory(path2).listSync(recursive: true);
- expect(list1.length, equals(list2.length));
- for (var list in [list1, list2]) {
- list.sort((a, b) => a.path.compareTo(b.path));
- }
- for (int i = 0; i < list1.length; i++) {
- if (list1[i].statSync().type != FileSystemEntityType.file) {
- continue;
- }
- final a = File(list1[i].path);
- final b = File(list2[i].path);
- expect(readFile(a), readFile(b));
+ final proc = Process.runSync("git", [
+ "diff",
+ "--no-index",
+ if (stderr.supportsAnsiEscapes) "--color=always",
+ path1,
+ path2,
+ ]);
+ if (proc.exitCode != 0) {
+ stderr.writeln('\n${proc.stdout}');
+ throw Exception("Files differ: ($path1, $path2)");
}
}
@@ -71,8 +68,11 @@
final tempLib = singleFile
? tempDir.uri.resolve("generated.dart")
: tempDir.uri.resolve("lib/");
- config.outputConfig.cConfig.path = tempSrc;
+ if (config.outputConfig.bindingsType == BindingsType.cBased) {
+ config.outputConfig.cConfig!.path = tempSrc;
+ }
config.outputConfig.dartConfig.path = tempLib;
+ config.logLevel = Level.WARNING;
await generateJniBindings(config);
}
@@ -89,7 +89,9 @@
try {
await _generateTempBindings(config, tempDir);
comparePaths(dartPath, tempLib.toFilePath());
- comparePaths(cPath, tempSrc.toFilePath());
+ if (config.outputConfig.bindingsType == BindingsType.cBased) {
+ comparePaths(cPath, tempSrc.toFilePath());
+ }
} finally {
tempDir.deleteSync(recursive: true);
}