diff --git a/analysis_options.yaml b/analysis_options.yaml index 736235588ba..09a526583d9 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -19,6 +19,7 @@ analyzer: exclude: # DIFFERENT FROM FLUTTER/FLUTTER # Ignore generated files - '**/*.g.dart' + - '**/*.gen.jni.dart' - '**/*.mocks.dart' # Mockito @GenerateMocks linter: diff --git a/packages/pigeon/example/app/lib/src/messages.g.dart b/packages/pigeon/example/app/lib/src/messages.g.dart index fe3f5abab66..bd0911c6933 100644 --- a/packages/pigeon/example/app/lib/src/messages.g.dart +++ b/packages/pigeon/example/app/lib/src/messages.g.dart @@ -47,7 +47,7 @@ bool _deepEquals(Object? a, Object? b) { enum Code { one, - two, + two; } class MessageData { diff --git a/packages/pigeon/lib/src/ast.dart b/packages/pigeon/lib/src/ast.dart index 116654458e5..0fe9b099dce 100644 --- a/packages/pigeon/lib/src/ast.dart +++ b/packages/pigeon/lib/src/ast.dart @@ -510,6 +510,24 @@ class TypeDeclaration { /// Associated [AstProxyApi], if any. final AstProxyApi? associatedProxyApi; + /// Returns the full annotated name of the type. + String getFullName({bool withNullable = true}) { + if (baseName == 'List' || baseName == 'Map') { + return '$baseName<$typeArgumentsString>${isNullable && withNullable ? '?' : ''}'; + } + return '$baseName${isNullable && withNullable ? '?' : ''}'; + } + + /// Returns the Type Arguments in annotation form. + String get typeArgumentsString { + if (baseName == 'List') { + return typeArguments.firstOrNull?.getFullName() ?? 'Object?'; + } else if (baseName == 'Map') { + return '${typeArguments.firstOrNull?.getFullName() ?? 'Object?'}, ${typeArguments.lastOrNull?.getFullName() ?? 'Object?'}'; + } + return ''; + } + @override int get hashCode { // This has to be implemented because TypeDeclaration is used as a Key to a @@ -541,32 +559,35 @@ class TypeDeclaration { /// Returns duplicated `TypeDeclaration` with attached `associatedEnum` value. TypeDeclaration copyWithEnum(Enum enumDefinition) { - return TypeDeclaration( + final TypeDeclaration newType = TypeDeclaration( baseName: baseName, isNullable: isNullable, associatedEnum: enumDefinition, typeArguments: typeArguments, ); + return newType; } /// Returns duplicated `TypeDeclaration` with attached `associatedClass` value. TypeDeclaration copyWithClass(Class classDefinition) { - return TypeDeclaration( + final TypeDeclaration newType = TypeDeclaration( baseName: baseName, isNullable: isNullable, associatedClass: classDefinition, typeArguments: typeArguments, ); + return newType; } /// Returns duplicated `TypeDeclaration` with attached `associatedProxyApi` value. TypeDeclaration copyWithProxyApi(AstProxyApi proxyApiDefinition) { - return TypeDeclaration( + final TypeDeclaration newType = TypeDeclaration( baseName: baseName, isNullable: isNullable, associatedProxyApi: proxyApiDefinition, typeArguments: typeArguments, ); + return newType; } /// Returns duplicated `TypeDeclaration` with attached `associatedProxyApi` value. @@ -814,6 +835,8 @@ class Root extends Node { required this.classes, required this.apis, required this.enums, + this.lists = const {}, + this.maps = const {}, this.containsHostApi = false, this.containsFlutterApi = false, this.containsProxyApi = false, @@ -822,7 +845,13 @@ class Root extends Node { /// Factory function for generating an empty root, usually used when early errors are encountered. factory Root.makeEmpty() { - return Root(apis: [], classes: [], enums: []); + return Root( + apis: [], + classes: [], + enums: [], + lists: {}, + maps: {}, + ); } /// All the classes contained in the AST. @@ -834,6 +863,12 @@ class Root extends Node { /// All of the enums contained in the AST. List enums; + /// All of the lists contained in the AST. + Map lists; + + /// All of the maps contained in the AST. + Map maps; + /// Whether the root has any Host API definitions. bool containsHostApi; @@ -856,6 +891,6 @@ class Root extends Node { @override String toString() { - return '(Root classes:$classes apis:$apis enums:$enums)'; + return '(Root classes:$classes apis:$apis enums:$enums lists:$lists maps:$maps containsHostApi:$containsHostApi containsFlutterApi:$containsFlutterApi containsProxyApi:$containsProxyApi)'; } } diff --git a/packages/pigeon/lib/src/cpp/cpp_generator.dart b/packages/pigeon/lib/src/cpp/cpp_generator.dart index 4a78d615a04..795f7107e1c 100644 --- a/packages/pigeon/lib/src/cpp/cpp_generator.dart +++ b/packages/pigeon/lib/src/cpp/cpp_generator.dart @@ -91,7 +91,7 @@ class CppOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [CppOptions]. CppOptions merge(CppOptions options) { - return CppOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return CppOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/dart/dart_generator.dart b/packages/pigeon/lib/src/dart/dart_generator.dart index a6955bcdfab..2c75c485d42 100644 --- a/packages/pigeon/lib/src/dart/dart_generator.dart +++ b/packages/pigeon/lib/src/dart/dart_generator.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'package:code_builder/code_builder.dart' as cb; +import 'package:collection/collection.dart'; import 'package:dart_style/dart_style.dart'; import 'package:path/path.dart' as path; import 'package:pub_semver/pub_semver.dart'; @@ -45,6 +46,8 @@ class DartOptions { this.copyrightHeader, this.sourceOutPath, this.testOutPath, + this.useJni = false, + this.dartOut, }); /// A copyright header that will get prepended to generated code. @@ -56,6 +59,12 @@ class DartOptions { /// Path to output generated Test file for tests. final String? testOutPath; + /// Whether to use Jni for generating kotlin interop code. + final bool useJni; + + /// Path to output generated Dart file. + final String? dartOut; + /// Creates a [DartOptions] from a Map representation where: /// `x = DartOptions.fromMap(x.toMap())`. static DartOptions fromMap(Map map) { @@ -65,6 +74,8 @@ class DartOptions { copyrightHeader: copyrightHeader?.cast(), sourceOutPath: map['sourceOutPath'] as String?, testOutPath: map['testOutPath'] as String?, + useJni: map['useJni'] as bool? ?? false, + dartOut: map['dartOut'] as String?, ); } @@ -75,6 +86,8 @@ class DartOptions { if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, if (sourceOutPath != null) 'sourceOutPath': sourceOutPath!, if (testOutPath != null) 'testOutPath': testOutPath!, + if (useJni) 'useJni': useJni, + if (dartOut != null) 'dartOut': dartOut!, }; return result; } @@ -82,10 +95,298 @@ class DartOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [DartOptions]. DartOptions merge(DartOptions options) { - return DartOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return DartOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); + } +} + +class _JniType { + _JniType({ + required this.type, + this.subTypeOne, + this.subTypeTwo, + }); + + final TypeDeclaration type; + final _JniType? subTypeOne; + final _JniType? subTypeTwo; + + static _JniType fromTypeDeclaration(TypeDeclaration? type) { + if (type == null) { + return _JniType( + type: + const TypeDeclaration(baseName: 'type was null', isNullable: false), + ); + } + if (type.baseName == 'List') { + final _JniType? subType = type.typeArguments.firstOrNull != null + ? _JniType.fromTypeDeclaration(type.typeArguments.firstOrNull) + : null; + final _JniType jniType = _JniType( + type: type, + subTypeOne: subType, + ); + return jniType; + } else if (type.baseName == 'Map') { + final _JniType? subTypeOne = type.typeArguments.firstOrNull != null + ? _JniType.fromTypeDeclaration(type.typeArguments.firstOrNull) + : null; + final _JniType? subTypeTwo = type.typeArguments.lastOrNull != null + ? _JniType.fromTypeDeclaration(type.typeArguments.lastOrNull) + : null; + final _JniType jniType = _JniType( + type: type, + subTypeOne: subTypeOne, + subTypeTwo: subTypeTwo, + ); + return jniType; + } + + return _JniType( + type: type, + ); + } + + static _JniType fromClass(Class classDefinition) { + final TypeDeclaration fakeType = TypeDeclaration( + baseName: classDefinition.name, + isNullable: true, + associatedClass: classDefinition); + return _JniType( + type: fakeType, + ); + } + + static _JniType fromEnum(Enum enumDefinition) { + final TypeDeclaration fakeType = TypeDeclaration( + baseName: enumDefinition.name, + isNullable: true, + associatedEnum: enumDefinition); + return _JniType( + type: fakeType, + ); + } + + String get jniName { + switch (type.baseName) { + case 'String': + return 'JString'; + case 'void': + return 'JVoid'; + case 'bool': + return 'JBoolean'; + case 'int': + return 'JLong'; + case 'double': + return 'JDouble'; + case 'Uint8List': + return 'JByteArray'; + case 'Int32List': + return 'JIntArray'; + case 'Int64List': + return 'JLongArray'; + case 'Float64List': + return 'JDoubleArray'; + case 'Object': + return 'JObject'; + case 'List': + return 'JList'; + case 'Map': + return 'JMap'; + default: + { + if (type.isClass || type.isEnum) { + return 'bridge.${type.baseName}'; + } + return 'There is something wrong, a type is not classified'; + } + } + } + + String get jniTypeGetter { + return type.isNullable ? 'nullableType' : 'type'; + } + + String get fullJniName { + if (type.baseName == 'List' || type.baseName == 'Map') { + return jniName + jniCollectionTypeAnnotations; + } + return jniName; + } + + String get fullJniType { + if (type.baseName == 'List' || type.baseName == 'Map') { + return '$jniName.$jniTypeGetter($getJniCollectionTypeTypes)'; + } + return '$jniName.$jniTypeGetter'; + } + + String get getJniCollectionTypeTypes { + if (type.baseName == 'List') { + return subTypeOne?.fullJniType ?? 'JObject.nullableType'; + } + if (type.baseName == 'Map') { + return '${subTypeOne?.fullJniType ?? 'JObject.type'}, ${subTypeTwo?.fullJniType ?? 'JObject.nullableType'}'; + } + + return '$jniName.$jniTypeGetter'; + } + + bool get nonNullableNeedsUnwrapping { + if (type.isClass || + type.isEnum || + type.baseName == 'String' || + type.baseName == 'Object' || + type.baseName == 'List' || + type.baseName == 'Map' || + type.baseName == 'Uint8List' || + type.baseName == 'Int32List' || + type.baseName == 'Int64List' || + type.baseName == 'Float64List') { + return true; + } + return false; + } + + String getJniGetterMethodName(String field) { + return 'get${toUpperCamelCase(field)}()'; + } + + String get primitiveToDartMethodName { + switch (type.baseName) { + case 'String': + return 'toDartString'; + case 'int': + return 'longValue'; + case 'double': + return 'doubleValue'; + case 'bool': + return 'booleanValue'; + default: + return ''; + } + } + + String getToDartCall( + TypeDeclaration type, { + String varName = '', + bool forceConversion = false, + }) { + if (type.isClass || type.isEnum) { + return '${type.baseName}.fromJni($varName)${_getForceNonNullSymbol(!type.isNullable)}'; + } + String asType = ' as ${getDartReturnType(true)}'; + String castCall = ''; + final String codecCall = + '_PigeonJniCodec.readValue($varName)${_getForceNonNullSymbol(!type.isNullable)}'; + String primitiveGetter(String converter, bool unwrap) { + return unwrap + ? '$varName${_getNullableSymbol(type.isNullable)}.$converter${'(releaseOriginal: true)'}' + : varName; + } + + switch (type.baseName) { + case 'String': + case 'int': + case 'double': + case 'bool': + return primitiveGetter(primitiveToDartMethodName, + type.baseName == 'String' || type.isNullable || forceConversion); + case 'Object': + asType = ''; + case 'List': + asType = ' as List${_getNullableSymbol(type.isNullable)}'; + castCall = + '${_getNullableSymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + case 'Map': + asType = + ' as Map${_getNullableSymbol(type.isNullable)}'; + castCall = + '${_getNullableSymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + } + return '${wrapConditionally( + '$codecCall$asType', + '(', + ')', + type.baseName != 'Object', + )}$castCall'; + } + + String getToJniCall( + TypeDeclaration type, + String name, + _JniType jniType, { + bool forceNonNull = false, + }) { + if (type.isClass || type.isEnum) { + return _wrapInNullCheckIfNullable(type.isNullable, name, + '$name${_getForceNonNullSymbol(type.isNullable && forceNonNull)}.toJni()'); + } else if (!type.isNullable && + (type.baseName == 'int' || + type.baseName == 'double' || + type.baseName == 'bool')) { + return name; + } + return '_PigeonJniCodec.writeValue<${getJniCallReturnType(true)}>($name)'; + } + + String getJniCallReturnType(bool forceUnwrap) { + if (forceUnwrap || type.isNullable || nonNullableNeedsUnwrapping) { + return '$jniName$jniCollectionTypeAnnotations${_getNullableSymbol(type.isNullable)}'; + } + return type.baseName; + } + + String getDartReturnType(bool forceUnwrap) { + if (forceUnwrap || type.isNullable || nonNullableNeedsUnwrapping) { + return '${type.baseName}$dartCollectionTypeAnnotations${_getNullableSymbol(type.isNullable)}'; + } + return type.baseName; + } + + String get dartCollectionTypeAnnotations { + if (type.baseName == 'List') { + return '<$dartCollectionTypes>'; + } else if (type.baseName == 'Map') { + return '<$dartCollectionTypes>'; + } + return ''; + } + + String get jniCollectionTypeAnnotations { + if (type.baseName == 'List') { + return '<$jniCollectionTypes>'; + } else if (type.baseName == 'Map') { + return '<$jniCollectionTypes>'; + } + return ''; + } + + String get dartCollectionTypes { + if (type.baseName == 'List') { + return subTypeOne?.getDartReturnType(true) ?? 'Object?'; + } else if (type.baseName == 'Map') { + return '${subTypeOne?.getDartReturnType(true) ?? 'Object?'}, ${subTypeTwo?.getDartReturnType(true) ?? 'Object?'}'; + } + return ''; + } + + String get jniCollectionTypes { + if (type.baseName == 'List') { + return subTypeOne?.getJniCallReturnType(true) ?? 'JObject?'; + } else if (type.baseName == 'Map') { + return '${subTypeOne?.getJniCallReturnType(true) ?? 'JObject'}, ${subTypeTwo?.getJniCallReturnType(true) ?? 'JObject?'}'; + } + return ''; } } +String _getNullableSymbol(bool nullable) => nullable ? '?' : ''; + +String _getForceNonNullSymbol(bool force) => force ? '!' : ''; + +String _wrapInNullCheckIfNullable(bool nullable, String varName, String code) => + nullable ? '$varName == null ? null : $code' : code; + /// Options that control how Dart code will be generated. class InternalDartOptions extends InternalOptions { /// Constructor for InternalDartOptions. @@ -93,6 +394,7 @@ class InternalDartOptions extends InternalOptions { this.copyrightHeader, this.dartOut, this.testOut, + this.useJni = false, }); /// Creates InternalDartOptions from DartOptions. @@ -103,7 +405,8 @@ class InternalDartOptions extends InternalOptions { String? testOut, }) : copyrightHeader = copyrightHeader ?? options.copyrightHeader, dartOut = (dartOut ?? options.sourceOutPath)!, - testOut = testOut ?? options.testOutPath; + testOut = testOut ?? options.testOutPath, + useJni = options.useJni; /// A copyright header that will get prepended to generated code. final Iterable? copyrightHeader; @@ -113,6 +416,9 @@ class InternalDartOptions extends InternalOptions { /// Path to output generated Test file for tests. final String? testOut; + + /// Whether to use Jni for generating kotlin interop code. + final bool useJni; } /// Class that manages all Dart code generation. @@ -159,6 +465,12 @@ class DartGenerator extends StructuredGenerator { "import 'package:flutter/widgets.dart' show WidgetsFlutterBinding;", ); } + if (generatorOptions.useJni) { + indent.writeln("import 'package:jni/jni.dart';"); + final String jniFileImportName = path.basename(generatorOptions.dartOut!); + indent.writeln( + "import './${path.withoutExtension(jniFileImportName)}.jni.dart' as bridge;"); + } } @override @@ -172,12 +484,29 @@ class DartGenerator extends StructuredGenerator { indent.newln(); addDocumentationComments( indent, anEnum.documentationComments, _docCommentSpec); - indent.write('enum ${anEnum.name} '); - indent.addScoped('{', '}', () { + indent.addScoped('enum ${anEnum.name} {', '}', () { for (final EnumMember member in anEnum.members) { + final String separatorSymbol = + member == anEnum.members.last ? ';' : ','; addDocumentationComments( indent, member.documentationComments, _docCommentSpec); - indent.writeln('${member.name},'); + indent.writeln('${member.name}$separatorSymbol'); + } + + if (generatorOptions.useJni) { + final _JniType jniType = _JniType.fromEnum(anEnum); + indent.newln(); + indent.writeScoped('${jniType.jniName} toJni() {', '}', () { + indent.writeln('return ${jniType.jniName}.Companion.ofRaw(index)!;'); + }); + + indent.newln(); + indent.writeScoped( + 'static ${anEnum.name}? fromJni(${jniType.jniName}? jniEnum) {', + '}', () { + indent.writeln( + 'return jniEnum == null ? null : ${anEnum.name}.values[jniEnum.getRaw()];'); + }); } }); } @@ -258,17 +587,6 @@ class DartGenerator extends StructuredGenerator { }); } - void _writeToList(Indent indent, Class classDefinition) { - indent.writeScoped('List _toList() {', '}', () { - indent.writeScoped('return [', '];', () { - for (final NamedType field - in getFieldsInSerializationOrder(classDefinition)) { - indent.writeln('${field.name},'); - } - }); - }); - } - @override void writeClassEncode( InternalDartOptions generatorOptions, @@ -277,6 +595,10 @@ class DartGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { + if (generatorOptions.useJni) { + _writeToJni(indent, classDefinition); + indent.newln(); + } indent.write('Object encode() '); indent.addScoped('{', '}', () { indent.write( @@ -285,6 +607,48 @@ class DartGenerator extends StructuredGenerator { }); } + void _writeToList(Indent indent, Class classDefinition) { + indent.writeScoped('List _toList() {', '}', () { + indent.writeScoped('return [', '];', () { + for (final NamedType field + in getFieldsInSerializationOrder(classDefinition)) { + indent.writeln('${field.name},'); + } + }); + }); + } + + void _writeToJni(Indent indent, Class classDefinition) { + indent.writeScoped('bridge.${classDefinition.name} toJni() {', '}', () { + indent.writeScoped('return bridge.${classDefinition.name} (', ');', () { + for (final NamedType field + in getFieldsInSerializationOrder(classDefinition)) { + final _JniType jniType = _JniType.fromTypeDeclaration(field.type); + indent.writeln( + '${jniType.getToJniCall(field.type, field.name, jniType, forceNonNull: true)},'); + } + }); + }); + } + + void _writeFromJni(Indent indent, Class classDefinition) { + final _JniType jniClass = _JniType.fromClass(classDefinition); + indent.writeScoped( + 'static ${jniClass.type.baseName}? fromJni(${jniClass.jniName}? jniClass) {', + '}', () { + indent.writeScoped( + 'return jniClass == null ? null : ${jniClass.type.baseName}(', ');', + () { + for (final NamedType field + in getFieldsInSerializationOrder(classDefinition)) { + final _JniType jniType = _JniType.fromTypeDeclaration(field.type); + indent.writeln( + '${field.name}: ${jniType.getToDartCall(field.type, varName: 'jniClass.${jniType.getJniGetterMethodName(field.name)}')},'); + } + }); + }); + } + @override void writeClassDecode( InternalDartOptions generatorOptions, @@ -293,6 +657,10 @@ class DartGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { + if (generatorOptions.useJni) { + _writeFromJni(indent, classDefinition); + indent.newln(); + } void writeValueDecode(NamedType field, int index) { final String resultAt = 'result[$index]'; final String castCallPrefix = field.type.isNullable ? '?' : '!'; @@ -315,10 +683,8 @@ class DartGenerator extends StructuredGenerator { } } - indent.write( - 'static ${classDefinition.name} decode(Object result) ', - ); - indent.addScoped('{', '}', () { + indent.writeScoped( + 'static ${classDefinition.name} decode(Object result) {', '}', () { indent.writeln('result as List;'); indent.write('return ${classDefinition.name}'); indent.addScoped('(', ');', () { @@ -376,6 +742,12 @@ class DartGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + if (generatorOptions.useJni && + !root.containsProxyApi && + !root.containsEventChannel && + !root.containsFlutterApi) { + return; + } void writeEncodeLogic( EnumeratedType customType, int nonSerializedClassCount) { indent.writeScoped('else if (value is ${customType.name}) {', '}', () { @@ -555,6 +927,93 @@ class DartGenerator extends StructuredGenerator { }); } + @override + void writeApis(InternalDartOptions generatorOptions, Root root, Indent indent, + {required String dartPackageName}) { + if (generatorOptions.useJni) { + indent.writeln( + "const String defaultInstanceName = 'PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u';"); + } + super.writeApis(generatorOptions, root, indent, + dartPackageName: dartPackageName); + } + + void _writeJniApi( + InternalDartOptions generatorOptions, + Root root, + Indent indent, + AstHostApi api, { + required String dartPackageName, + }) { + final String dartApiName = api.name; + final String jniApiRegistrarName = 'bridge.${dartApiName}Registrar'; + indent.newln(); + indent.writeScoped('class $dartApiName {', '}', () { + indent.format(''' + $dartApiName._withRegistrar($jniApiRegistrarName api) : _api = api; + + /// Returns instance of $dartApiName with specified [channelName] if one has been registered. + static $dartApiName? getInstance({String channelName = defaultInstanceName}) { + final $jniApiRegistrarName? link = + $jniApiRegistrarName().getInstance(JString.fromString(channelName)); + if (link == null) { + String nameString = 'named \$channelName'; + if (channelName == defaultInstanceName) { + nameString = 'with no name'; + } + final String error = 'No instance \$nameString has been registered.'; + throw ArgumentError(error); + } + final $dartApiName res = $dartApiName._withRegistrar(link); + return res; + } + + late final $jniApiRegistrarName _api; +'''); + for (final Method method in api.methods) { + indent.writeScoped( + '${method.isAsynchronous ? 'Future<' : ''}${_addGenericTypesNullable(method.returnType)}${method.isAsynchronous ? '>' : ''} ${method.name}(${_getMethodParameterSignature(method.parameters)}) ${method.isAsynchronous ? 'async ' : ''}{', + '}', () { + final _JniType returnType = + _JniType.fromTypeDeclaration(method.returnType); + final String methodCallReturnString = returnType.type.baseName == + 'void' && + method.isAsynchronous + ? '' + : (!returnType.nonNullableNeedsUnwrapping && + !method.returnType.isNullable && + !method.isAsynchronous) + ? 'return ' + : 'final ${returnType.getJniCallReturnType(method.isAsynchronous)} res = '; + indent.writeScoped('try {', '}', () { + indent.writeln( + '$methodCallReturnString${method.isAsynchronous ? 'await ' : ''}_api.${method.name}(${_getJniMethodCallArguments(method.parameters)});'); + if ((method.returnType.isNullable || + method.isAsynchronous || + returnType.nonNullableNeedsUnwrapping) && + returnType.type.baseName != 'void') { + indent.writeln( + 'final ${returnType.getDartReturnType(method.isAsynchronous)} dartTypeRes = ${returnType.getToDartCall(method.returnType, varName: 'res', forceConversion: method.isAsynchronous)};'); + indent.writeln('return dartTypeRes;'); + } + }); + indent.writeScoped(' on JniException catch (e) {', '}', () { + indent.writeln( + "throw PlatformException(code: 'PlatformException', message: e.message, stacktrace: e.stackTrace,);"); + }); + }); + indent.newln(); + } + }); + } + + String _getJniMethodCallArguments(Iterable parameters) { + return parameters.map((Parameter parameter) { + final _JniType jniType = _JniType.fromTypeDeclaration(parameter.type); + return jniType.getToJniCall(parameter.type, parameter.name, jniType); + }).join(', '); + } + /// Writes the code for host [Api], [api]. /// Example: /// class FooCodec extends StandardMessageCodec {...} @@ -580,6 +1039,11 @@ class DartGenerator extends StructuredGenerator { AstHostApi api, { required String dartPackageName, }) { + if (generatorOptions.useJni) { + _writeJniApi(generatorOptions, root, indent, api, + dartPackageName: dartPackageName); + return; + } indent.newln(); bool first = true; addDocumentationComments( @@ -1075,7 +1539,8 @@ final BinaryMessenger? ${varNamePrefix}binaryMessenger; Indent indent, { required String dartPackageName, }) { - if (root.containsHostApi || root.containsProxyApi) { + if ((root.containsHostApi && !generatorOptions.useJni) || + root.containsProxyApi) { _writeCreateConnectionError(indent); } if (root.containsFlutterApi || @@ -1086,8 +1551,237 @@ final BinaryMessenger? ${varNamePrefix}binaryMessenger; if (root.classes.isNotEmpty && root.classes.any((Class dataClass) => dataClass.fields .any((NamedType field) => isCollectionType(field.type)))) { + indent.newln(); _writeDeepEquals(indent); } + if (generatorOptions.useJni) { + _writeJniCodec(indent, root); + } + } + + int _sortByObjectCount(TypeDeclaration a, TypeDeclaration b) { + int aTotal = 0; + int bTotal = 0; + + aTotal += a.getFullName(withNullable: false).split('?').length; + bTotal += b.getFullName(withNullable: false).split('?').length; + + aTotal += a.getFullName(withNullable: false).split('Object').length * 100; + bTotal += b.getFullName(withNullable: false).split('Object').length * 100; + + return aTotal < bTotal ? -1 : 1; + } + + void _writeJniCodec(Indent indent, Root root) { + indent.newln(); + indent.format(''' +bool isType (Type t) => T == t; + +bool isTypeOrNullableType (Type t) => isType(t) || isType(t); + +class _PigeonJniCodec { + static Object? readValue(JObject? value) { + if (value == null) { + return null; + } else if (value.isA(JLong.type)) { + return (value.as(JLong.type)).longValue(); + } else if (value.isA(JDouble.type)) { + return (value.as(JDouble.type)).doubleValue(); + } else if (value.isA(JString.type)) { + return (value.as(JString.type)).toDartString(); + } else if (value.isA(JBoolean.type)) { + return (value.as(JBoolean.type)).booleanValue(); + } else if (value.isA(JByteArray.type)) { + final Uint8List list = Uint8List(value.as(JByteArray.type).length); + for (int i = 0; i < value.as(JByteArray.type).length; i++) { + list[i] = value.as(JByteArray.type)[i]; + } + return list; + } else if (value.isA(JIntArray.type)) { + final Int32List list = Int32List(value.as(JIntArray.type).length); + for (int i = 0; i < value.as(JIntArray.type).length; i++) { + list[i] = value.as(JIntArray.type)[i]; + } + return list; + } else if (value.isA(JLongArray.type)) { + final Int64List list = Int64List(value.as(JLongArray.type).length); + for (int i = 0; i < value.as(JLongArray.type).length; i++) { + list[i] = value.as(JLongArray.type)[i]; + } + return list; + } else if (value.isA(JDoubleArray.type)) { + final Float64List list = Float64List(value.as(JDoubleArray.type).length); + for (int i = 0; i < value.as(JDoubleArray.type).length; i++) { + list[i] = value.as(JDoubleArray.type)[i]; + } + return list; + } else if (value.isA>(JList.type(JObject.type))) { + final JList list = (value.as(JList.type(JObject.nullableType))); + final List res = []; + for (int i = 0; i < list.length; i++) { + res.add(readValue(list[i])); + } + return res; + } else if (value.isA>( + JMap.type(JObject.type, JObject.type))) { + final JMap map = + (value.as(JMap.type(JObject.nullableType, JObject.nullableType))); + final Map res = {}; + for (final MapEntry entry in map.entries) { + res[readValue(entry.key)] = readValue(entry.value); + } + return res; + ${root.classes.map((Class dataClass) { + final _JniType jniType = _JniType.fromClass(dataClass); + return ''' + } else if (value.isA<${jniType.jniName}>( + ${jniType.jniName}.type)) { + return ${jniType.type.baseName}.fromJni(value.as(${jniType.jniName}.type)); + '''; + }).join()} + ${root.enums.map((Enum enumDefinition) { + final _JniType jniType = _JniType.fromEnum(enumDefinition); + return ''' + } else if (value.isA<${jniType.jniName}>( + ${jniType.jniName}.type)) { + return ${jniType.type.baseName}.fromJni(value.as(${jniType.jniName}.type)); + '''; + }).join()} + } else { + throw ArgumentError.value(value); + } + } + + static T writeValue(Object? value) { + if (value == null) { + return null as T; + } else if (value is bool) { + return JBoolean(value) as T; + } else if (value is double) { + return JDouble(value) as T; + // ignore: avoid_double_and_int_checks + } else if (value is int) { + return JLong(value) as T; + } else if (value is String) { + return JString.fromString(value) as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JByteArray array = JByteArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JIntArray array = JIntArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JLongArray array = JLongArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JDoubleArray array = JDoubleArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + ${root.lists.values.sorted(_sortByObjectCount).map((TypeDeclaration list) { + if (list.typeArguments.isEmpty || + list.typeArguments.first.baseName == 'Object') { + return ''; + } + final _JniType jniType = _JniType.fromTypeDeclaration(list); + return ''' + } else if (value is ${jniType.type.getFullName(withNullable: false)} && isTypeOrNullableType<${jniType.fullJniName}>(T)) { + final ${jniType.fullJniName} res = + ${jniType.fullJniName}.array(${jniType.subTypeOne?.fullJniType ?? 'JObject.nullableType'}); + for (final ${jniType.dartCollectionTypes} entry in value) { + res.add(writeValue(entry)); + } + return res as T; + '''; + }).join()} + } else if (value is List) { + final JList res = JList.array(JObject.type); + for (int i = 0; i < value.length; i++) { + res.add(writeValue(value[i])); + } + return res as T; + } else if (value is List) { + final JList res = JList.array(JObject.nullableType); + for (int i = 0; i < value.length; i++) { + res.add(writeValue(value[i])); + } + return res as T; + ${root.maps.entries.sorted((MapEntry a, MapEntry b) => _sortByObjectCount(a.value, b.value)).map((MapEntry mapType) { + if (mapType.value.typeArguments.isEmpty || + (mapType.value.typeArguments.first.baseName == 'Object' && + mapType.value.typeArguments.last.baseName == 'Object')) { + return ''; + } + final _JniType jniType = _JniType.fromTypeDeclaration(mapType.value); + return ''' + } else if (value is ${jniType.type.getFullName(withNullable: false)} && isTypeOrNullableType<${jniType.fullJniName}>(T)) { + final ${jniType.fullJniName} res = + ${jniType.fullJniName}.hash(${jniType.subTypeOne?.fullJniType ?? 'JObject.nullableType'}, ${jniType.subTypeTwo?.fullJniType ?? 'JObject.nullableType'}); + for (final MapEntry${jniType.dartCollectionTypeAnnotations} entry in value.entries) { + res[writeValue(entry.key)] = + writeValue(entry.value); + } + return res as T; + '''; + }).join()} + } else if (value is Map) { + final JMap res = + JMap.hash(JObject.type, JObject.type); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = + writeValue(entry.value); + } + return res as T; + } else if (value is Map) { + final JMap res = + JMap.hash(JObject.type, JObject.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = + writeValue(entry.value); + } + return res as T; + } else if (value is Map) { + final JMap res = + JMap.hash(JObject.type, JObject.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = + writeValue(entry.value); + } + return res as T; + ${root.classes.map((Class dataClass) { + final _JniType jniType = _JniType.fromClass(dataClass); + return ''' + } else if (value is ${jniType.type.baseName}) { + return value.toJni() as T; + '''; + }).join()} + ${root.enums.map((Enum enumDefinition) { + final _JniType jniType = _JniType.fromEnum(enumDefinition); + return ''' + } else if (value is ${jniType.type.baseName}) { + return value.toJni() as T; + '''; + }).join()} + } else { + throw ArgumentError.value(value); + } + } +} + '''); } /// Writes [wrapResponse] method. @@ -1122,8 +1816,7 @@ bool _deepEquals(Object? a, Object? b) { _deepEquals(a[key], b[key])); } return a == b; -} - '''); +}'''); } void _writeCreateConnectionError(Indent indent) { @@ -1222,15 +1915,10 @@ if (wrapped == null) { required bool addSuffixVariable, bool insideAsyncMethod = true, }) { - String sendArgument = 'null'; - if (parameters.isNotEmpty) { - final Iterable argExpressions = - indexMap(parameters, (int index, NamedType type) { - final String name = _getParameterName(index, type); - return name; - }); - sendArgument = '[${argExpressions.join(', ')}]'; - } + final String? arguments = _getArgumentsForMethodCall(parameters); + final String sendArgument = + arguments == null ? 'null' : '[$arguments]'; + final String channelSuffix = addSuffixVariable ? '\$$_suffixVarName' : ''; final String constOrFinal = addSuffixVariable ? 'final' : 'const'; indent.writeln( @@ -2343,7 +3031,7 @@ String _flattenTypeArguments(List args) { /// Creates the type declaration for use in Dart code from a [NamedType] making sure /// that type arguments are used for primitive generic types. -String _addGenericTypes(TypeDeclaration type) { +String _addGenericTypes(TypeDeclaration type, {bool useJni = false}) { final List typeArguments = type.typeArguments; switch (type.baseName) { case 'List': @@ -2355,13 +3043,16 @@ String _addGenericTypes(TypeDeclaration type) { ? 'Map' : 'Map<${_flattenTypeArguments(typeArguments)}>'; default: - return type.baseName; + return useJni + ? _JniType.fromTypeDeclaration(type).jniName + : type.baseName; } } -String _addGenericTypesNullable(TypeDeclaration type) { - final String genericType = _addGenericTypes(type); - return type.isNullable ? '$genericType?' : genericType; +String _addGenericTypesNullable(TypeDeclaration type, {bool useJni = false}) { + final String genericType = _addGenericTypes(type, useJni: useJni); + final String nullableSymbol = type.isNullable ? '?' : ''; + return '$genericType$nullableSymbol'; } /// Converts [inputPath] to a posix absolute path. @@ -2369,3 +3060,13 @@ String _posixify(String inputPath) { final path.Context context = path.Context(style: path.Style.posix); return context.fromUri(path.toUri(path.absolute(inputPath))); } + +String? _getArgumentsForMethodCall(Iterable parameters) { + if (parameters.isNotEmpty) { + return indexMap(parameters, (int index, NamedType type) { + final String name = _getParameterName(index, type); + return name; + }).join(', '); + } + return null; +} diff --git a/packages/pigeon/lib/src/generator_tools.dart b/packages/pigeon/lib/src/generator_tools.dart index 7b9a41e4e1b..25dfdbb60f9 100644 --- a/packages/pigeon/lib/src/generator_tools.dart +++ b/packages/pigeon/lib/src/generator_tools.dart @@ -392,7 +392,7 @@ void addLines(Indent indent, Iterable lines, {String? linePrefix}) { /// /// In other words, whenever there is a conflict over the value of a key path, /// [modification]'s value for that key path is selected. -Map mergeMaps( +Map mergePigeonMaps( Map base, Map modification, ) { @@ -402,8 +402,8 @@ Map mergeMaps( final Object entryValue = entry.value; if (entryValue is Map) { assert(base[entry.key] is Map); - result[entry.key] = - mergeMaps((base[entry.key] as Map?)!, entryValue); + result[entry.key] = mergePigeonMaps( + (base[entry.key] as Map?)!, entryValue); } else { result[entry.key] = entry.value; } @@ -547,13 +547,13 @@ Map> getReferencedTypes( final Class aClass = classes.firstWhere((Class x) => x.name == next, orElse: () => Class(name: '', fields: [])); for (final NamedType field in aClass.fields) { + references.add(field.type, field.offset); if (_isUnseenCustomType(field.type, referencedTypeNames)) { - references.add(field.type, field.offset); classesToCheck.add(field.type.baseName); } for (final TypeDeclaration typeArg in field.type.typeArguments) { + references.add(typeArg, field.offset); if (_isUnseenCustomType(typeArg, referencedTypeNames)) { - references.add(typeArg, field.offset); classesToCheck.add(typeArg.baseName); } } @@ -870,3 +870,8 @@ bool isCollectionType(TypeDeclaration type) { !type.isProxyApi && (type.baseName.contains('List') || type.baseName == 'Map'); } + +/// Wraps provided [toWrap] with [start] and [end] if [wrap] is true. +String wrapConditionally(String toWrap, String start, String end, bool wrap) { + return wrap ? '$start$toWrap$end' : toWrap; +} diff --git a/packages/pigeon/lib/src/gobject/gobject_generator.dart b/packages/pigeon/lib/src/gobject/gobject_generator.dart index 7c86d2d1663..53fff9230a6 100644 --- a/packages/pigeon/lib/src/gobject/gobject_generator.dart +++ b/packages/pigeon/lib/src/gobject/gobject_generator.dart @@ -69,7 +69,7 @@ class GObjectOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [GObjectOptions]. GObjectOptions merge(GObjectOptions options) { - return GObjectOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return GObjectOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/java/java_generator.dart b/packages/pigeon/lib/src/java/java_generator.dart index 4b9c1e4db76..a418eb8dcf8 100644 --- a/packages/pigeon/lib/src/java/java_generator.dart +++ b/packages/pigeon/lib/src/java/java_generator.dart @@ -85,7 +85,7 @@ class JavaOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [JavaOptions]. JavaOptions merge(JavaOptions options) { - return JavaOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return JavaOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/kotlin/jnigen_yaml_generator.dart b/packages/pigeon/lib/src/kotlin/jnigen_yaml_generator.dart new file mode 100644 index 00000000000..242468ba593 --- /dev/null +++ b/packages/pigeon/lib/src/kotlin/jnigen_yaml_generator.dart @@ -0,0 +1,81 @@ +// Copyright 2013 The Flutter Authors. 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:path/path.dart' as path; + +import '../ast.dart'; +import '../dart/dart_generator.dart' show InternalDartOptions; +import '../generator.dart'; +import '../generator_tools.dart'; +import 'kotlin_generator.dart' show InternalKotlinOptions; + +/// Options for [JnigenYamlGenerator]. +class InternalJnigenYamlOptions extends InternalOptions { + /// Creates a [InternalJnigenYamlOptions]. + InternalJnigenYamlOptions( + this.dartOptions, + this.kotlinOptions, + this.basePath, + this.dartOut, + this.exampleAppDirectory, + ); + + /// Dart options. + final InternalDartOptions dartOptions; + + /// Kotlin options. + final InternalKotlinOptions kotlinOptions; + + /// A base path to be prepended to all provided output paths. + final String? basePath; + + /// Dart output path. + final String? dartOut; + + /// Android example app directory. + final String? exampleAppDirectory; +} + +/// Generator for jnigen yaml configuration file. +class JnigenYamlGenerator extends Generator { + @override + void generate( + InternalJnigenYamlOptions generatorOptions, Root root, StringSink sink, + {required String dartPackageName}) { + final Indent indent = Indent(sink); + + indent.format(''' + android_sdk_config: + add_gradle_deps: true + android_example: '${generatorOptions.exampleAppDirectory ?? ''}' + + # source_path: + # - 'android/src/main/java' + + summarizer: + backend: asm + + output: + dart: + path: ${path.posix.join(generatorOptions.basePath ?? '', path.withoutExtension(generatorOptions.dartOut ?? ''))}.jni.dart + structure: single_file + + log_level: all + '''); + indent.writeScoped('classes:', '', () { + for (final Api api in root.apis) { + if (api is AstHostApi) { + indent.writeln("- '${api.name}'"); + indent.writeln("- '${api.name}Registrar'"); + } + } + for (final Class dataClass in root.classes) { + indent.writeln("- '${dataClass.name}'"); + } + for (final Enum enumType in root.enums) { + indent.writeln("- '${enumType.name}'"); + } + }); + } +} diff --git a/packages/pigeon/lib/src/kotlin/kotlin_generator.dart b/packages/pigeon/lib/src/kotlin/kotlin_generator.dart index f64dacae70b..abe18f4e87c 100644 --- a/packages/pigeon/lib/src/kotlin/kotlin_generator.dart +++ b/packages/pigeon/lib/src/kotlin/kotlin_generator.dart @@ -41,6 +41,8 @@ class KotlinOptions { const KotlinOptions({ this.package, this.copyrightHeader, + this.useJni = false, + this.exampleAppDirectory, this.errorClassName, this.includeErrorClass = true, this.fileSpecificClassNameComponent, @@ -52,6 +54,12 @@ class KotlinOptions { /// A copyright header that will get prepended to generated code. final Iterable? copyrightHeader; + /// Whether to use Jni when possible. + final bool useJni; + + /// The directory that the example app exists in, this is required for Jni APIs. + final String? exampleAppDirectory; + /// The name of the error class used for passing custom error parameters. final String? errorClassName; @@ -69,6 +77,8 @@ class KotlinOptions { static KotlinOptions fromMap(Map map) { return KotlinOptions( package: map['package'] as String?, + useJni: map['useJni'] as bool? ?? false, + exampleAppDirectory: map['exampleAppDirectory'] as String?, copyrightHeader: map['copyrightHeader'] as Iterable?, errorClassName: map['errorClassName'] as String?, includeErrorClass: map['includeErrorClass'] as bool? ?? true, @@ -82,6 +92,9 @@ class KotlinOptions { Map toMap() { final Map result = { if (package != null) 'package': package!, + if (useJni) 'useJni': useJni, + if (exampleAppDirectory != null) + 'exampleAppDirectory': exampleAppDirectory!, if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!, if (errorClassName != null) 'errorClassName': errorClassName!, 'includeErrorClass': includeErrorClass, @@ -94,7 +107,7 @@ class KotlinOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [KotlinOptions]. KotlinOptions merge(KotlinOptions options) { - return KotlinOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return KotlinOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } @@ -107,6 +120,8 @@ class InternalKotlinOptions extends InternalOptions { this.copyrightHeader, this.errorClassName, this.includeErrorClass = true, + this.useJni = false, + this.exampleAppDirectory, this.fileSpecificClassNameComponent, }); @@ -119,6 +134,8 @@ class InternalKotlinOptions extends InternalOptions { copyrightHeader = options.copyrightHeader ?? copyrightHeader, errorClassName = options.errorClassName, includeErrorClass = options.includeErrorClass, + useJni = options.useJni, + exampleAppDirectory = options.exampleAppDirectory, fileSpecificClassNameComponent = options.fileSpecificClassNameComponent ?? kotlinOut.split('/').lastOrNull?.split('.').first; @@ -141,6 +158,12 @@ class InternalKotlinOptions extends InternalOptions { /// Kotlin file in the same directory. final bool includeErrorClass; + /// Whether to use Jni for generating kotlin interop code. + final bool useJni; + + /// The directory that the example app exists in, this is required for Jni APIs. + final String? exampleAppDirectory; + /// A String to augment class names to avoid cross file collisions. final String? fileSpecificClassNameComponent; } @@ -202,11 +225,14 @@ class KotlinGenerator extends StructuredGenerator { required String dartPackageName, }) { indent.newln(); - if (generatorOptions.package != null) { + if (generatorOptions.package != null && !generatorOptions.useJni) { indent.writeln('package ${generatorOptions.package}'); } indent.newln(); indent.writeln('import android.util.Log'); + if (generatorOptions.useJni) { + indent.writeln('import androidx.annotation.Keep'); + } indent.writeln('import io.flutter.plugin.common.BasicMessageChannel'); indent.writeln('import io.flutter.plugin.common.BinaryMessenger'); indent.writeln('import io.flutter.plugin.common.EventChannel'); @@ -448,6 +474,12 @@ class KotlinGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + if (generatorOptions.useJni && + !root.containsEventChannel && + !root.containsFlutterApi && + !root.containsProxyApi) { + return; + } final List enumeratedTypes = getEnumeratedTypes(root, excludeSealedClasses: true).toList(); @@ -683,6 +715,86 @@ if (wrapped == null) { }); } + void _writeJniApi( + InternalKotlinOptions generatorOptions, + Root root, + Indent indent, + AstHostApi api, { + required String dartPackageName, + }) { + indent.writeln( + 'val ${api.name}Instances: MutableMap = mutableMapOf()'); + indent.writeln('@Keep'); + indent.writeScoped('abstract class ${api.name} {', '}', () { + for (final Method method in api.methods) { + _writeMethodDeclaration( + indent, + name: method.name, + documentationComments: method.documentationComments, + returnType: method.returnType, + parameters: method.parameters, + isAsynchronous: method.isAsynchronous, + useJni: true, + isAbstract: true, + ); + } + }); + + indent.writeln('@Keep'); + indent.writeScoped('class ${api.name}Registrar : ${api.name}() {', '}', () { + indent.writeln('var api: ${api.name}? = null'); + + indent.writeScoped('fun register(', '):', () { + indent.writeln('api: ${api.name},'); + indent.writeln( + 'name: String = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u"'); + }, addTrailingNewline: false); + indent.writeScoped(' ${api.name}Registrar {', '}', () { + indent.writeln('this.api = api'); + indent.writeln('${api.name}Instances[name] = this'); + indent.writeln('return this'); + }); + + indent.writeln('@Keep'); + indent.writeScoped( + 'fun getInstance(name: String): ${api.name}Registrar? {', '}', () { + indent.writeln('return ${api.name}Instances[name]'); + }); + + for (final Method method in api.methods) { + _writeMethodDeclaration( + indent, + name: method.name, + documentationComments: method.documentationComments, + returnType: method.returnType, + parameters: method.parameters, + isAsynchronous: method.isAsynchronous, + isOverride: true, + useJni: true, + ); + final String argNames = + method.parameters.map((Parameter arg) => arg.name).join(', '); + indent.addScoped(' {', '}', () { + indent.writeScoped('api?.let {', '}', () { + indent.writeScoped( + 'try {', + '}', + () { + indent.writeln('return api!!.${method.name}($argNames)'); + }, + addTrailingNewline: false, + ); + indent.addScoped(' catch (e: Exception) {', '}', () { + indent.writeln('throw e'); + }); + }); + + indent.writeln('error("${api.name} has not been set")'); + }); + } + }); + } + /// Write the kotlin code that represents a host [Api], [api]. /// Example: /// interface Foo { @@ -700,6 +812,11 @@ if (wrapped == null) { AstHostApi api, { required String dartPackageName, }) { + if (generatorOptions.useJni) { + _writeJniApi(generatorOptions, root, indent, api, + dartPackageName: dartPackageName); + return; + } final String apiName = api.name; const List generatedMessages = [ @@ -1293,7 +1410,8 @@ private fun deepEquals${generatorOptions.fileSpecificClassNameComponent}(a: Any? Indent indent, { required String dartPackageName, }) { - if (root.containsHostApi || root.containsProxyApi) { + if ((root.containsHostApi && !generatorOptions.useJni) || + root.containsProxyApi) { _writeWrapResult(indent); _writeWrapError(generatorOptions, indent); } @@ -1320,6 +1438,8 @@ private fun deepEquals${generatorOptions.fileSpecificClassNameComponent}(a: Any? bool isAsynchronous = false, bool isOpen = false, bool isAbstract = false, + bool isOverride = false, + bool useJni = false, String Function(int index, NamedType type) getArgumentName = _getArgumentName, }) { @@ -1352,20 +1472,25 @@ private fun deepEquals${generatorOptions.fileSpecificClassNameComponent}(a: Any? } final String openKeyword = isOpen ? 'open ' : ''; - final String abstractKeyword = isAbstract ? 'abstract ' : ''; - - if (isAsynchronous) { + final String inheritanceKeyword = isAbstract + ? 'abstract ' + : isOverride + ? 'override ' + : ''; + final String suspendKeyword = isAsynchronous && useJni ? 'suspend ' : ''; + + if (isAsynchronous && !useJni) { argSignature.add('callback: (Result<$resultType>) -> Unit'); indent.writeln( - '$openKeyword${abstractKeyword}fun $name(${argSignature.join(', ')})', + '$openKeyword$inheritanceKeyword${suspendKeyword}fun $name(${argSignature.join(', ')})', ); } else if (returnType.isVoid) { indent.writeln( - '$openKeyword${abstractKeyword}fun $name(${argSignature.join(', ')})', + '$openKeyword$inheritanceKeyword${suspendKeyword}fun $name(${argSignature.join(', ')})', ); } else { indent.writeln( - '$openKeyword${abstractKeyword}fun $name(${argSignature.join(', ')}): $returnTypeString', + '$openKeyword$inheritanceKeyword${suspendKeyword}fun $name(${argSignature.join(', ')}): $returnTypeString', ); } } diff --git a/packages/pigeon/lib/src/objc/objc_generator.dart b/packages/pigeon/lib/src/objc/objc_generator.dart index 1755bc29d48..cf0f8283e6c 100644 --- a/packages/pigeon/lib/src/objc/objc_generator.dart +++ b/packages/pigeon/lib/src/objc/objc_generator.dart @@ -88,7 +88,7 @@ class ObjcOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [ObjcOptions]. ObjcOptions merge(ObjcOptions options) { - return ObjcOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return ObjcOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/lib/src/pigeon_lib.dart b/packages/pigeon/lib/src/pigeon_lib.dart index a60659ac3c5..5fb44b76246 100644 --- a/packages/pigeon/lib/src/pigeon_lib.dart +++ b/packages/pigeon/lib/src/pigeon_lib.dart @@ -403,7 +403,7 @@ class PigeonOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [PigeonOptions]. PigeonOptions merge(PigeonOptions options) { - return PigeonOptions.fromMap(mergeMaps(toMap(), options.toMap())); + return PigeonOptions.fromMap(mergePigeonMaps(toMap(), options.toMap())); } /// Returns provided or deduced package name, throws `Exception` if none found. @@ -658,6 +658,7 @@ ${_argParser.usage}'''; JavaGeneratorAdapter(), SwiftGeneratorAdapter(), KotlinGeneratorAdapter(), + JnigenYamlGeneratorAdapter(), CppGeneratorAdapter(), GObjectGeneratorAdapter(), DartTestGeneratorAdapter(), @@ -686,7 +687,7 @@ ${_argParser.usage}'''; if (parseResults.pigeonOptions != null && mergeDefinitionFileOptions) { options = PigeonOptions.fromMap( - mergeMaps(options.toMap(), parseResults.pigeonOptions!)); + mergePigeonMaps(options.toMap(), parseResults.pigeonOptions!)); } final InternalPigeonOptions internalOptions = diff --git a/packages/pigeon/lib/src/pigeon_lib_internal.dart b/packages/pigeon/lib/src/pigeon_lib_internal.dart index 842fbe7c13d..f33eff1b23c 100644 --- a/packages/pigeon/lib/src/pigeon_lib_internal.dart +++ b/packages/pigeon/lib/src/pigeon_lib_internal.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// ignore_for_file: avoid_print - import 'dart:convert'; import 'dart:io'; @@ -23,6 +21,7 @@ import 'dart/dart_generator.dart'; import 'generator_tools.dart'; import 'gobject/gobject_generator.dart'; import 'java/java_generator.dart'; +import 'kotlin/jnigen_yaml_generator.dart'; import 'kotlin/kotlin_generator.dart'; import 'objc/objc_generator.dart'; import 'pigeon_lib.dart'; @@ -619,6 +618,51 @@ class KotlinGeneratorAdapter implements GeneratorAdapter { List validate(InternalPigeonOptions options, Root root) => []; } +/// A [GeneratorAdapter] that generates JnigenYaml source code. +class JnigenYamlGeneratorAdapter implements GeneratorAdapter { + /// Constructor for [JnigenYamlGeneratorAdapter]. + JnigenYamlGeneratorAdapter( + {this.fileTypeList = const [FileType.na]}); + + @override + List fileTypeList; + + @override + void generate(StringSink sink, InternalPigeonOptions options, Root root, + FileType fileType) { + if (options.kotlinOptions == null) { + return; + } + final JnigenYamlGenerator generator = JnigenYamlGenerator(); + final InternalJnigenYamlOptions jnigenYamlOptions = + InternalJnigenYamlOptions( + options.dartOptions!, + options.kotlinOptions!, + options.basePath, + options.dartOptions?.dartOut, + options.kotlinOptions!.exampleAppDirectory, + ); + + generator.generate( + jnigenYamlOptions, + root, + sink, + dartPackageName: options.dartPackageName, + ); + } + + @override + IOSink? shouldGenerate(InternalPigeonOptions options, FileType _) => + options.kotlinOptions?.kotlinOut != null && + (options.kotlinOptions?.useJni ?? false) + ? _openSink('jnigen.yaml', + basePath: options.kotlinOptions?.exampleAppDirectory ?? '') + : null; + + @override + List validate(InternalPigeonOptions options, Root root) => []; +} + dart_ast.Annotation? _findMetadata( dart_ast.NodeList metadata, String query) { final Iterable annotations = metadata @@ -1147,19 +1191,24 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { ParseResults results() { _storeCurrentApi(); _storeCurrentClass(); + final Map referencedLists = + {}; + final Map referencedMaps = + {}; final Map> referencedTypes = getReferencedTypes(_apis, _classes); final Set referencedTypeNames = referencedTypes.keys.map((TypeDeclaration e) => e.baseName).toSet(); - final List nonReferencedTypes = List.from(_classes); - nonReferencedTypes + final List nonReferencedClasses = List.from(_classes); + nonReferencedClasses .removeWhere((Class x) => referencedTypeNames.contains(x.name)); - for (final Class x in nonReferencedTypes) { + for (final Class x in nonReferencedClasses) { x.isReferenced = false; } final List referencedEnums = List.from(_enums); + bool containsHostApi = false; bool containsFlutterApi = false; bool containsProxyApi = false; @@ -1176,18 +1225,14 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { case AstEventChannelApi(): containsEventChannel = true; } + if (containsEventChannel && + containsFlutterApi && + containsProxyApi && + containsHostApi) { + break; + } } - final Root completeRoot = Root( - apis: _apis, - classes: _classes, - enums: referencedEnums, - containsHostApi: containsHostApi, - containsFlutterApi: containsFlutterApi, - containsProxyApi: containsProxyApi, - containsEventChannel: containsEventChannel, - ); - final List totalErrors = List.from(_errors); for (final MapEntry> element @@ -1245,13 +1290,43 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { api.interfaces = newInterfaceSet; } } + + final Map> referencedTypesAfterAssoc = + getReferencedTypes(_apis, _classes); + + for (final TypeDeclaration type in referencedTypesAfterAssoc.keys) { + if (type.baseName == 'List') { + referencedLists[type.getFullName(withNullable: false)] = type; + } else if (type.baseName == 'Map') { + referencedMaps[type.getFullName(withNullable: false)] = type; + } + } + + final Root completeRoot = Root( + apis: _apis, + classes: _classes, + enums: referencedEnums, + lists: referencedLists, + maps: referencedMaps, + containsHostApi: containsHostApi, + containsFlutterApi: containsFlutterApi, + containsProxyApi: containsProxyApi, + containsEventChannel: containsEventChannel, + ); + final List validateErrors = _validateAst(completeRoot, source); totalErrors.addAll(validateErrors); return ParseResults( root: totalErrors.isEmpty ? completeRoot - : Root(apis: [], classes: [], enums: []), + : Root( + apis: [], + classes: [], + enums: [], + lists: {}, + maps: {}, + ), errors: totalErrors, pigeonOptions: _pigeonOptions, ); @@ -1668,7 +1743,10 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { } else { return Parameter( name: '', - type: const TypeDeclaration(baseName: '', isNullable: false), + type: const TypeDeclaration( + baseName: '', + isNullable: false, + ), offset: formalParameter.offset, ); } diff --git a/packages/pigeon/lib/src/swift/swift_generator.dart b/packages/pigeon/lib/src/swift/swift_generator.dart index 1f1ece7feda..ed2760eccfc 100644 --- a/packages/pigeon/lib/src/swift/swift_generator.dart +++ b/packages/pigeon/lib/src/swift/swift_generator.dart @@ -74,7 +74,7 @@ class SwiftOptions { /// Overrides any non-null parameters from [options] into this to make a new /// [SwiftOptions]. SwiftOptions merge(SwiftOptions options) { - return SwiftOptions.fromList(mergeMaps(toMap(), options.toMap())); + return SwiftOptions.fromList(mergePigeonMaps(toMap(), options.toMap())); } } diff --git a/packages/pigeon/pigeons/jni_tests.dart b/packages/pigeon/pigeons/jni_tests.dart new file mode 100644 index 00000000000..218ce5fb45c --- /dev/null +++ b/packages/pigeon/pigeons/jni_tests.dart @@ -0,0 +1,939 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: always_specify_types, strict_raw_type + +import 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon(PigeonOptions( + dartOptions: DartOptions(useJni: true), + kotlinOptions: KotlinOptions(useJni: true), +)) +enum JniAnEnum { + one, + two, + three, + fortyTwo, + fourHundredTwentyTwo, +} + +// Enums require special logic, having multiple ensures that the logic can be +// replicated without collision. +enum JniAnotherEnum { + justInCase, +} + +// This exists to show that unused data classes still generate. +class JniUnusedClass { + JniUnusedClass({this.aField}); + + Object? aField; +} + +/// A class containing all supported types. +class JniAllTypes { + JniAllTypes({ + this.aBool = false, + this.anInt = 0, + this.anInt64 = 0, + this.aDouble = 0, + required this.aByteArray, + required this.a4ByteArray, + required this.a8ByteArray, + required this.aFloatArray, + this.anEnum = JniAnEnum.one, + this.anotherEnum = JniAnotherEnum.justInCase, + this.aString = '', + this.anObject = 0, + + // Lists + // This name is in a different format than the others to ensure that name + // collision with the word 'list' doesn't occur in the generated files. + required this.list, + required this.stringList, + required this.intList, + required this.doubleList, + required this.boolList, + required this.enumList, + required this.objectList, + required this.listList, + required this.mapList, + + // Maps + required this.map, + required this.stringMap, + required this.intMap, + required this.enumMap, + required this.objectMap, + required this.listMap, + required this.mapMap, + }); + + bool aBool; + int anInt; + int anInt64; + double aDouble; + Uint8List aByteArray; + Int32List a4ByteArray; + Int64List a8ByteArray; + Float64List aFloatArray; + JniAnEnum anEnum; + JniAnotherEnum anotherEnum; + String aString; + Object anObject; + + // Lists + List list; + List stringList; + List intList; + List doubleList; + List boolList; + List enumList; + List objectList; + List> listList; + List> mapList; + + // Maps + Map map; + Map stringMap; + Map intMap; + Map enumMap; + Map objectMap; + Map> listMap; + Map> mapMap; +} + +/// A class containing all supported nullable types. +@SwiftClass() +class JniAllNullableTypes { + JniAllNullableTypes( + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + this.allNullableTypes, + + // Lists + // This name is in a different format than the others to ensure that name + // collision with the word 'list' doesn't occur in the generated files. + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + this.recursiveClassList, + + // Maps + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + this.recursiveClassMap, + ); + + bool? aNullableBool; + int? aNullableInt; + int? aNullableInt64; + double? aNullableDouble; + Uint8List? aNullableByteArray; + Int32List? aNullable4ByteArray; + Int64List? aNullable8ByteArray; + Float64List? aNullableFloatArray; + JniAnEnum? aNullableEnum; + JniAnotherEnum? anotherNullableEnum; + String? aNullableString; + Object? aNullableObject; + JniAllNullableTypes? allNullableTypes; + + // Lists + List? list; + List? stringList; + List? intList; + List? doubleList; + List? boolList; + List? enumList; + List? objectList; + List?>? listList; + List?>? mapList; + List? recursiveClassList; + + // Maps + Map? map; + Map? stringMap; + Map? intMap; + Map? enumMap; + Map? objectMap; + Map?>? listMap; + Map?>? mapMap; + Map? recursiveClassMap; +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [JniAllNullableTypes] class is being used to +/// test Swift classes. +class JniAllNullableTypesWithoutRecursion { + JniAllNullableTypesWithoutRecursion( + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + + // Lists + // This name is in a different format than the others to ensure that name + // collision with the word 'list' doesn't occur in the generated files. + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + + // Maps + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + ); + + bool? aNullableBool; + int? aNullableInt; + int? aNullableInt64; + double? aNullableDouble; + Uint8List? aNullableByteArray; + Int32List? aNullable4ByteArray; + Int64List? aNullable8ByteArray; + Float64List? aNullableFloatArray; + JniAnEnum? aNullableEnum; + JniAnotherEnum? anotherNullableEnum; + String? aNullableString; + Object? aNullableObject; + + // Lists + List? list; + List? stringList; + List? intList; + List? doubleList; + List? boolList; + List? enumList; + List? objectList; + List?>? listList; + List?>? mapList; + + // Maps + Map? map; + Map? stringMap; + Map? intMap; + Map? enumMap; + Map? objectMap; + Map?>? listMap; + Map?>? mapMap; +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `JniAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `JniAllTypes` when testing doesn't require both (ie. testing null classes). +class JniAllClassesWrapper { + JniAllClassesWrapper( + this.allNullableTypes, + this.allNullableTypesWithoutRecursion, + this.allTypes, + this.classList, + this.classMap, + this.nullableClassList, + this.nullableClassMap, + ); + JniAllNullableTypes allNullableTypes; + JniAllNullableTypesWithoutRecursion? allNullableTypesWithoutRecursion; + JniAllTypes? allTypes; + List classList; + List? nullableClassList; + Map classMap; + Map? nullableClassMap; +} + +/// The core interface that each host language plugin must implement in +/// platform_test integration tests. +@HostApi() +abstract class JniHostIntegrationCoreApi { + // ========== Synchronous method tests ========== + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + void noop(); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoAllTypes:') + @SwiftFunction('echo(_:)') + JniAllTypes echoAllTypes(JniAllTypes everything); + + /// Returns an error, to test error handling. + Object? throwError(); + + /// Returns an error from a void function, to test error handling. + void throwErrorFromVoid(); + + /// Returns a Flutter error, to test error handling. + Object? throwFlutterError(); + + /// Returns passed in int. + @ObjCSelector('echoInt:') + @SwiftFunction('echo(_:)') + int echoInt(int anInt); + + /// Returns passed in double. + @ObjCSelector('echoDouble:') + @SwiftFunction('echo(_:)') + double echoDouble(double aDouble); + + /// Returns the passed in boolean. + @ObjCSelector('echoBool:') + @SwiftFunction('echo(_:)') + bool echoBool(bool aBool); + + /// Returns the passed in string. + @ObjCSelector('echoString:') + @SwiftFunction('echo(_:)') + String echoString(String aString); + + /// Returns the passed in Uint8List. + @ObjCSelector('echoUint8List:') + @SwiftFunction('echo(_:)') + Uint8List echoUint8List(Uint8List aUint8List); + + /// Returns the passed in Int32List. + @ObjCSelector('echoInt32List:') + @SwiftFunction('echo(_:)') + Int32List echoInt32List(Int32List aInt32List); + + /// Returns the passed in Int64List. + @ObjCSelector('echoInt64List:') + @SwiftFunction('echo(_:)') + Int64List echoInt64List(Int64List aInt64List); + + /// Returns the passed in Float64List. + @ObjCSelector('echoFloat64List:') + @SwiftFunction('echo(_:)') + Float64List echoFloat64List(Float64List aFloat64List); + + /// Returns the passed in generic Object. + @ObjCSelector('echoObject:') + @SwiftFunction('echo(_:)') + Object echoObject(Object anObject); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoList:') + @SwiftFunction('echo(_:)') + List echoList(List list); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoEnumList:') + @SwiftFunction('echo(enumList:)') + List echoEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoClassList:') + @SwiftFunction('echo(classList:)') + List echoClassList( + List classList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNonNullEnumList:') + @SwiftFunction('echoNonNull(enumList:)') + List echoNonNullEnumList(List enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNonNullClassList:') + @SwiftFunction('echoNonNull(classList:)') + List echoNonNullClassList( + List classList); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoMap:') + @SwiftFunction('echo(_:)') + Map echoMap(Map map); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoStringMap:') + @SwiftFunction('echo(stringMap:)') + Map echoStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoIntMap:') + @SwiftFunction('echo(intMap:)') + Map echoIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoEnumMap:') + @SwiftFunction('echo(enumMap:)') + Map echoEnumMap(Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoClassMap:') + @SwiftFunction('echo(classMap:)') + Map echoClassMap( + Map classMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullStringMap:') + @SwiftFunction('echoNonNull(stringMap:)') + Map echoNonNullStringMap(Map stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullIntMap:') + @SwiftFunction('echoNonNull(intMap:)') + Map echoNonNullIntMap(Map intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullEnumMap:') + @SwiftFunction('echoNonNull(enumMap:)') + Map echoNonNullEnumMap( + Map enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNonNullClassMap:') + @SwiftFunction('echoNonNull(classMap:)') + Map echoNonNullClassMap( + Map classMap); + + /// Returns the passed class to test nested class serialization and deserialization. + @ObjCSelector('echoClassWrapper:') + @SwiftFunction('echo(_:)') + JniAllClassesWrapper echoClassWrapper(JniAllClassesWrapper wrapper); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoEnum:') + @SwiftFunction('echo(_:)') + JniAnEnum echoEnum(JniAnEnum anEnum); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoAnotherEnum:') + @SwiftFunction('echo(_:)') + JniAnotherEnum echoAnotherEnum(JniAnotherEnum anotherEnum); + + /// Returns the default string. + @ObjCSelector('echoNamedDefaultString:') + @SwiftFunction('echoNamedDefault(_:)') + String echoNamedDefaultString({String aString = 'default'}); + + /// Returns passed in double. + @ObjCSelector('echoOptionalDefaultDouble:') + @SwiftFunction('echoOptionalDefault(_:)') + double echoOptionalDefaultDouble([double aDouble = 3.14]); + + /// Returns passed in int. + @ObjCSelector('echoRequiredInt:') + @SwiftFunction('echoRequired(_:)') + int echoRequiredInt({required int anInt}); + + // ========== Synchronous nullable method tests ========== + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoAllNullableTypes:') + @SwiftFunction('echo(_:)') + JniAllNullableTypes? echoAllNullableTypes(JniAllNullableTypes? everything); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoAllNullableTypesWithoutRecursion:') + @SwiftFunction('echo(_:)') + JniAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? everything); + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @ObjCSelector('extractNestedNullableStringFrom:') + @SwiftFunction('extractNestedNullableString(from:)') + String? extractNestedNullableString(JniAllClassesWrapper wrapper); + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @ObjCSelector('createNestedObjectWithNullableString:') + @SwiftFunction('createNestedObject(with:)') + JniAllClassesWrapper createNestedNullableString(String? nullableString); + + /// Returns passed in arguments of multiple types. + @ObjCSelector('sendMultipleNullableTypesABool:anInt:aString:') + @SwiftFunction('sendMultipleNullableTypes(aBool:anInt:aString:)') + JniAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, int? aNullableInt, String? aNullableString); + + /// Returns passed in arguments of multiple types. + @ObjCSelector('sendMultipleNullableTypesWithoutRecursionABool:anInt:aString:') + @SwiftFunction( + 'sendMultipleNullableTypesWithoutRecursion(aBool:anInt:aString:)') + JniAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, int? aNullableInt, String? aNullableString); + + /// Returns passed in int. + @ObjCSelector('echoNullableInt:') + @SwiftFunction('echo(_:)') + int? echoNullableInt(int? aNullableInt); + + /// Returns passed in double. + @ObjCSelector('echoNullableDouble:') + @SwiftFunction('echo(_:)') + double? echoNullableDouble(double? aNullableDouble); + + /// Returns the passed in boolean. + @ObjCSelector('echoNullableBool:') + @SwiftFunction('echo(_:)') + bool? echoNullableBool(bool? aNullableBool); + + /// Returns the passed in string. + @ObjCSelector('echoNullableString:') + @SwiftFunction('echo(_:)') + String? echoNullableString(String? aNullableString); + + /// Returns the passed in Uint8List. + @ObjCSelector('echoNullableUint8List:') + @SwiftFunction('echo(_:)') + Uint8List? echoNullableUint8List(Uint8List? aNullableUint8List); + + /// Returns the passed in Int32List. + @ObjCSelector('echoNullableInt32List:') + @SwiftFunction('echo(_:)') + Int32List? echoNullableInt32List(Int32List? aNullableInt32List); + + /// Returns the passed in Int64List. + @ObjCSelector('echoNullableInt64List:') + @SwiftFunction('echo(_:)') + Int64List? echoNullableInt64List(Int64List? aNullableInt64List); + + /// Returns the passed in Float64List. + @ObjCSelector('echoNullableFloat64List:') + @SwiftFunction('echo(_:)') + Float64List? echoNullableFloat64List(Float64List? aNullableFloat64List); + + /// Returns the passed in generic Object. + @ObjCSelector('echoNullableObject:') + @SwiftFunction('echo(_:)') + Object? echoNullableObject(Object? aNullableObject); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableList:') + @SwiftFunction('echoNullable(_:)') + List? echoNullableList(List? aNullableList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableEnumList:') + @SwiftFunction('echoNullable(enumList:)') + List? echoNullableEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableClassList:') + @SwiftFunction('echoNullable(classList:)') + List? echoNullableClassList( + List? classList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullEnumList:') + @SwiftFunction('echoNullableNonNull(enumList:)') + List? echoNullableNonNullEnumList(List? enumList); + + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullClassList:') + @SwiftFunction('echoNullableNonNull(classList:)') + List? echoNullableNonNullClassList( + List? classList); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableMap:') + @SwiftFunction('echoNullable(_:)') + Map? echoNullableMap(Map? map); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableStringMap:') + @SwiftFunction('echoNullable(stringMap:)') + Map? echoNullableStringMap( + Map? stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableIntMap:') + @SwiftFunction('echoNullable(intMap:)') + Map? echoNullableIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableEnumMap:') + @SwiftFunction('echoNullable(enumMap:)') + Map? echoNullableEnumMap( + Map? enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableClassMap:') + @SwiftFunction('echoNullable(classMap:)') + Map? echoNullableClassMap( + Map? classMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullStringMap:') + @SwiftFunction('echoNullableNonNull(stringMap:)') + Map? echoNullableNonNullStringMap( + Map? stringMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullIntMap:') + @SwiftFunction('echoNullableNonNull(intMap:)') + Map? echoNullableNonNullIntMap(Map? intMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullEnumMap:') + @SwiftFunction('echoNullableNonNull(enumMap:)') + Map? echoNullableNonNullEnumMap( + Map? enumMap); + + /// Returns the passed map, to test serialization and deserialization. + @ObjCSelector('echoNullableNonNullClassMap:') + @SwiftFunction('echoNullableNonNull(classMap:)') + Map? echoNullableNonNullClassMap( + Map? classMap); + + @ObjCSelector('echoNullableEnum:') + @SwiftFunction('echoNullable(_:)') + JniAnEnum? echoNullableEnum(JniAnEnum? anEnum); + + @ObjCSelector('echoAnotherNullableEnum:') + @SwiftFunction('echoNullable(_:)') + JniAnotherEnum? echoAnotherNullableEnum(JniAnotherEnum? anotherEnum); + + /// Returns passed in int. + @ObjCSelector('echoOptionalNullableInt:') + @SwiftFunction('echoOptional(_:)') + int? echoOptionalNullableInt([int? aNullableInt]); + + /// Returns the passed in string. + @ObjCSelector('echoNamedNullableString:') + @SwiftFunction('echoNamed(_:)') + String? echoNamedNullableString({String? aNullableString}); + + // ========== Asynchronous method tests ========== + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + @async + void noopAsync(); + + /// Returns passed in int asynchronously. + @async + @ObjCSelector('echoAsyncInt:') + @SwiftFunction('echoAsync(_:)') + int echoAsyncInt(int anInt); + + /// Returns passed in double asynchronously. + @async + @ObjCSelector('echoAsyncDouble:') + @SwiftFunction('echoAsync(_:)') + double echoAsyncDouble(double aDouble); + + /// Returns the passed in boolean asynchronously. + @async + @ObjCSelector('echoAsyncBool:') + @SwiftFunction('echoAsync(_:)') + bool echoAsyncBool(bool aBool); + + /// Returns the passed string asynchronously. + @async + @ObjCSelector('echoAsyncString:') + @SwiftFunction('echoAsync(_:)') + String echoAsyncString(String aString); + + /// Returns the passed in Uint8List asynchronously. + @async + @ObjCSelector('echoAsyncUint8List:') + @SwiftFunction('echoAsync(_:)') + Uint8List echoAsyncUint8List(Uint8List aUint8List); + + /// Returns the passed in Int32List asynchronously. + @async + @ObjCSelector('echoAsyncInt32List:') + @SwiftFunction('echoAsync(_:)') + Int32List echoAsyncInt32List(Int32List aInt32List); + + /// Returns the passed in Int64List asynchronously. + @async + @ObjCSelector('echoAsyncInt64List:') + @SwiftFunction('echoAsync(_:)') + Int64List echoAsyncInt64List(Int64List aInt64List); + + /// Returns the passed in Float64List asynchronously. + @async + @ObjCSelector('echoAsyncFloat64List:') + @SwiftFunction('echoAsync(_:)') + Float64List echoAsyncFloat64List(Float64List aFloat64List); + + /// Returns the passed in generic Object asynchronously. + @async + @ObjCSelector('echoAsyncObject:') + @SwiftFunction('echoAsync(_:)') + Object echoAsyncObject(Object anObject); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncList:') + @SwiftFunction('echoAsync(_:)') + List echoAsyncList(List list); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncEnumList:') + @SwiftFunction('echoAsync(enumList:)') + List echoAsyncEnumList(List enumList); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncClassList:') + @SwiftFunction('echoAsync(classList:)') + List echoAsyncClassList( + List classList); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncMap:') + @SwiftFunction('echoAsync(_:)') + Map echoAsyncMap(Map map); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncStringMap:') + @SwiftFunction('echoAsync(stringMap:)') + Map echoAsyncStringMap(Map stringMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncIntMap:') + @SwiftFunction('echoAsync(intMap:)') + Map echoAsyncIntMap(Map intMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncEnumMap:') + @SwiftFunction('echoAsync(enumMap:)') + Map echoAsyncEnumMap( + Map enumMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncClassMap:') + @SwiftFunction('echoAsync(classMap:)') + Map echoAsyncClassMap( + Map classMap); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncEnum:') + @SwiftFunction('echoAsync(_:)') + JniAnEnum echoAsyncEnum(JniAnEnum anEnum); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAnotherAsyncEnum:') + @SwiftFunction('echoAsync(_:)') + JniAnotherEnum echoAnotherAsyncEnum(JniAnotherEnum anotherEnum); + + /// Responds with an error from an async function returning a value. + @async + Object? throwAsyncError(); + + /// Responds with an error from an async void function. + @async + void throwAsyncErrorFromVoid(); + + /// Responds with a Flutter error from an async function returning a value. + @async + Object? throwAsyncFlutterError(); + + /// Returns the passed object, to test async serialization and deserialization. + @async + @ObjCSelector('echoAsyncJniAllTypes:') + @SwiftFunction('echoAsync(_:)') + JniAllTypes echoAsyncJniAllTypes(JniAllTypes everything); + + /// Returns the passed object, to test serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableJniAllNullableTypes:') + @SwiftFunction('echoAsync(_:)') + JniAllNullableTypes? echoAsyncNullableJniAllNullableTypes( + JniAllNullableTypes? everything); + + /// Returns the passed object, to test serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableJniAllNullableTypesWithoutRecursion:') + @SwiftFunction('echoAsync(_:)') + JniAllNullableTypesWithoutRecursion? + echoAsyncNullableJniAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? everything); + + /// Returns passed in int asynchronously. + @async + @ObjCSelector('echoAsyncNullableInt:') + @SwiftFunction('echoAsyncNullable(_:)') + int? echoAsyncNullableInt(int? anInt); + + /// Returns passed in double asynchronously. + @async + @ObjCSelector('echoAsyncNullableDouble:') + @SwiftFunction('echoAsyncNullable(_:)') + double? echoAsyncNullableDouble(double? aDouble); + + /// Returns the passed in boolean asynchronously. + @async + @ObjCSelector('echoAsyncNullableBool:') + @SwiftFunction('echoAsyncNullable(_:)') + bool? echoAsyncNullableBool(bool? aBool); + + /// Returns the passed string asynchronously. + @async + @ObjCSelector('echoAsyncNullableString:') + @SwiftFunction('echoAsyncNullable(_:)') + String? echoAsyncNullableString(String? aString); + + /// Returns the passed in Uint8List asynchronously. + @async + @ObjCSelector('echoAsyncNullableUint8List:') + @SwiftFunction('echoAsyncNullable(_:)') + Uint8List? echoAsyncNullableUint8List(Uint8List? aUint8List); + + /// Returns the passed in Int32List asynchronously. + @async + @ObjCSelector('echoAsyncNullableInt32List:') + @SwiftFunction('echoAsyncNullable(_:)') + Int32List? echoAsyncNullableInt32List(Int32List? aInt32List); + + /// Returns the passed in Int64List asynchronously. + @async + @ObjCSelector('echoAsyncNullableInt64List:') + @SwiftFunction('echoAsyncNullable(_:)') + Int64List? echoAsyncNullableInt64List(Int64List? aInt64List); + + /// Returns the passed in Float64List asynchronously. + @async + @ObjCSelector('echoAsyncNullableFloat64List:') + @SwiftFunction('echoAsyncNullable(_:)') + Float64List? echoAsyncNullableFloat64List(Float64List? aFloat64List); + + /// Returns the passed in generic Object asynchronously. + @async + @ObjCSelector('echoAsyncNullableObject:') + @SwiftFunction('echoAsyncNullable(_:)') + Object? echoAsyncNullableObject(Object? anObject); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableList:') + @SwiftFunction('echoAsyncNullable(_:)') + List? echoAsyncNullableList(List? list); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableEnumList:') + @SwiftFunction('echoAsyncNullable(enumList:)') + List? echoAsyncNullableEnumList(List? enumList); + + /// Returns the passed list, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableClassList:') + @SwiftFunction('echoAsyncNullable(classList:)') + List? echoAsyncNullableClassList( + List? classList); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableMap:') + @SwiftFunction('echoAsyncNullable(_:)') + Map? echoAsyncNullableMap(Map? map); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableStringMap:') + @SwiftFunction('echoAsyncNullable(stringMap:)') + Map? echoAsyncNullableStringMap( + Map? stringMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableIntMap:') + @SwiftFunction('echoAsyncNullable(intMap:)') + Map? echoAsyncNullableIntMap(Map? intMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableEnumMap:') + @SwiftFunction('echoAsyncNullable(enumMap:)') + Map? echoAsyncNullableEnumMap( + Map? enumMap); + + /// Returns the passed map, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableClassMap:') + @SwiftFunction('echoAsyncNullable(classMap:)') + Map? echoAsyncNullableClassMap( + Map? classMap); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableEnum:') + @SwiftFunction('echoAsyncNullable(_:)') + JniAnEnum? echoAsyncNullableEnum(JniAnEnum? anEnum); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAnotherAsyncNullableEnum:') + @SwiftFunction('echoAsyncNullable(_:)') + JniAnotherEnum? echoAnotherAsyncNullableEnum(JniAnotherEnum? anotherEnum); +} + +/// An API that can be implemented for minimal, compile-only tests. +// +// This is also here to test that multiple host APIs can be generated +// successfully in all languages (e.g., in Java where it requires having a +// wrapper class). +@HostApi() +abstract class JniHostTrivialApi { + void noop(); +} + +/// A simple API implemented in some unit tests. +// +// This is separate from JniHostIntegrationCoreApi to avoid having to update a +// lot of unit tests every time we add something to the integration test API. +// TODO(stuartmorgan): Restructure the unit tests to reduce the number of +// different APIs we define. +@HostApi() +abstract class JniHostSmallApi { + @async + @ObjCSelector('echoString:') + String echo(String aString); + + @async + void voidVoid(); +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ffi_integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ffi_integration_tests.dart new file mode 100644 index 00000000000..064a7485020 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ffi_integration_tests.dart @@ -0,0 +1,1840 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: unused_local_variable + +import 'package:flutter/foundation.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'ffi_test_types.dart'; +import 'src/generated/jni_tests.gen.dart'; + +/// Possible host languages that test can target. +enum TargetGenerator { + /// The Windows C++ generator. + cpp, + + /// The Linux GObject generator. + gobject, + + /// The Android Java generator. + java, + + /// The Android Kotlin generator. + kotlin, + + /// The iOS Objective-C generator. + objc, + + /// The iOS or macOS Swift generator. + swift, +} + +/// Host languages that support generating Proxy APIs. +const Set proxyApiSupportedLanguages = { + TargetGenerator.kotlin, + TargetGenerator.swift, +}; + +/// Sets up and runs the integration tests. +void runPigeonIntegrationTests(TargetGenerator targetGenerator) { + // testWidgets('jni', (WidgetTester _) async { + // final JniMessageApi? jniMessage = JniMessageApi.getInstance(); + // expect(jniMessage, isNotNull); + // expect(jniMessage!.echoString('hello'), 'hello'); + // final SomeTypes toSend = SomeTypes( + // aString: 'hi', + // anInt: 5, + // aDouble: 5.0, + // aBool: false, + // a4ByteArray: Int32List(1), + // a8ByteArray: Int64List(1), + // aByteArray: Uint8List(1), + // aFloatArray: Float64List(1), + // anObject: 'obj', + // anEnum: SomeEnum.value2, + // someNullableTypes: SomeNullableTypes(), + // list: nonNullList, + // map: nonNullMap, + // stringList: nonNullStringList, + // intList: nonNullIntList, + // doubleList: nonNullDoubleList, + // boolList: nonNullBoolList, + // objectList: nonNullList, + // enumList: [SomeEnum.value1, SomeEnum.value3], + // classList: [SomeNullableTypes()], + // mapList: >[ + // nonNullMap, + // nonNullStringMap, + // nonNullDoubleMap, + // nonNullIntMap, + // nonNullBoolMap, + // ], + // stringMap: nonNullStringMap, + // intMap: nonNullIntMap, + // objectMap: nonNullMap, + // enumMap: { + // SomeEnum.value1: SomeEnum.value1, + // SomeEnum.value2: SomeEnum.value3 + // }, + // classMap: { + // SomeNullableTypes(): SomeNullableTypes() + // }, + // listList: >[ + // nonNullList, + // nonNullStringList, + // nonNullIntList, + // nonNullDoubleList, + // nonNullBoolList, + // ], + // mapMap: >{ + // 0: nonNullMap, + // 1: nonNullStringMap, + // 2: nonNullDoubleMap, + // 4: nonNullIntMap, + // 5: nonNullBoolMap, + // }, + // listMap: >{ + // 0: nonNullList, + // 1: nonNullStringList, + // 2: nonNullDoubleList, + // 4: nonNullIntList, + // 5: nonNullBoolList, + // }, + // ); + // final SomeTypes sync = jniMessage.sendSomeTypes(toSend); + // expect(sync, toSend); + // expect(jniMessage.echoBool(true), true); + // expect(jniMessage.echoBool(false), false); + // expect(jniMessage.echoDouble(2.0), 2.0); + // expect(jniMessage.echoInt(2), 2); + // expect(jniMessage.echoString('hello'), 'hello'); + // expect(jniMessage.echoObj('hello'), 'hello'); + // expect(jniMessage.echoObj(toSend), toSend); + // expect(jniMessage.sendSomeEnum(SomeEnum.value2), SomeEnum.value2); + // //nullable + // final JniMessageApiNullable? jniMessageNullable = + // JniMessageApiNullable.getInstance(); + // expect(jniMessageNullable, isNotNull); + // expect(jniMessageNullable!.echoString('hello'), 'hello'); + // expect(jniMessageNullable.echoString(null), null); + // final SomeNullableTypes? syncNullable = + // jniMessageNullable.sendSomeNullableTypes(SomeNullableTypes()); + // expect(syncNullable!.aString, null); + // expect(syncNullable.anInt, null); + // expect(syncNullable.aDouble, null); + // expect(syncNullable.aBool, null); + // expect(syncNullable.anObject, null); + // final SomeNullableTypes? syncNull = + // jniMessageNullable.sendSomeNullableTypes(null); + // expect(syncNull, null); + // expect(jniMessageNullable.echoBool(true), true); + // expect(jniMessageNullable.echoBool(false), false); + // expect(jniMessageNullable.echoDouble(2.0), 2.0); + // expect(jniMessageNullable.echoInt(2), 2); + // expect(jniMessageNullable.echoString('hello'), 'hello'); + // expect(jniMessageNullable.echoObj('hello'), 'hello'); + // expect(jniMessageNullable.echoObj(syncNullable), syncNullable); + // expect(jniMessageNullable.sendSomeEnum(SomeEnum.value3), SomeEnum.value3); + // expect(jniMessageNullable.echoBool(null), null); + // expect(jniMessageNullable.echoDouble(null), null); + // expect(jniMessageNullable.echoInt(null), null); + // expect(jniMessageNullable.echoString(null), null); + // expect(jniMessageNullable.echoObj(null), null); + // //async + // final JniMessageApiAsync? jniMessageAsync = + // JniMessageApiAsync.getInstance(); + + // final SomeTypes nonSync = await jniMessageAsync!.sendSomeTypes(toSend); + // expect(nonSync, toSend); + // expect(await jniMessageAsync.echoBool(true), true); + // expect(await jniMessageAsync.echoBool(false), false); + // expect(await jniMessageAsync.echoDouble(2.0), 2.0); + // expect(await jniMessageAsync.echoInt(2), 2); + // expect(await jniMessageAsync.echoString('hello'), 'hello'); + // expect(await jniMessageAsync.echoObj('hello'), 'hello'); + // expect(await jniMessageAsync.echoObj(sync), sync); + // expect( + // await jniMessageAsync.sendSomeEnum(SomeEnum.value3), SomeEnum.value3); + // //nullable async + // final JniMessageApiNullableAsync? jniMessageNullableAsync = + // JniMessageApiNullableAsync.getInstance(); + // expect(jniMessageNullableAsync, isNotNull); + // expect(await jniMessageNullableAsync!.echoString('hello'), 'hello'); + // expect(await jniMessageNullableAsync.echoString(null), null); + // final SomeNullableTypes? syncNullableAsync = await jniMessageNullableAsync + // .sendSomeNullableTypes(SomeNullableTypes()); + // expect(syncNullableAsync!.aString, null); + // expect(syncNullableAsync.anInt, null); + // expect(syncNullableAsync.aDouble, null); + // expect(syncNullableAsync.aBool, null); + // expect(syncNullableAsync.anObject, null); + // final SomeNullableTypes? syncNullAsync = + // await jniMessageNullableAsync.sendSomeNullableTypes(null); + // expect(syncNull, null); + // expect(await jniMessageNullableAsync.echoBool(true), true); + // expect(await jniMessageNullableAsync.echoBool(false), false); + // expect(await jniMessageNullableAsync.echoDouble(2.0), 2.0); + // expect(await jniMessageNullableAsync.echoInt(2), 2); + // expect(await jniMessageNullableAsync.echoString('hello'), 'hello'); + // expect(await jniMessageNullableAsync.echoObj('hello'), 'hello'); + // expect(await jniMessageNullableAsync.echoObj(syncNullable), syncNullable); + // expect(await jniMessageNullableAsync.sendSomeEnum(SomeEnum.value3), + // SomeEnum.value3); + // expect(await jniMessageNullableAsync.echoBool(null), null); + // expect(await jniMessageNullableAsync.echoDouble(null), null); + // expect(await jniMessageNullableAsync.echoInt(null), null); + // expect(await jniMessageNullableAsync.echoString(null), null); + // expect(await jniMessageNullableAsync.echoObj(null), null); + // //named + // final JniMessageApi? jniMessageNamed = + // JniMessageApi.getInstance(channelName: 'name'); + // final JniMessageApiAsync? jniMessageAsyncNamed = + // JniMessageApiAsync.getInstance(channelName: 'name'); + // expect(jniMessageNamed, isNotNull); + // expect(jniMessageNamed!.echoString('hello'), 'hello1'); + // expect(await jniMessageAsync.echoInt(5), 5); + // expect(await jniMessageAsyncNamed!.echoInt(5), 6); + // }, skip: targetGenerator != TargetGenerator.kotlin); + + group('Host sync API tests', () { + testWidgets('basic void->void call works', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + try { + api!.noop(); + } catch (e) { + fail(e.toString()); + } + }); + + testWidgets('all datatypes serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllTypes echoObject = api!.echoAllTypes(genericJniAllTypes); + expect(echoObject, genericJniAllTypes); + }); + + testWidgets('all nullable datatypes serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes? echoObject = + api!.echoAllNullableTypes(recursiveJniAllNullableTypes); + + expect(echoObject, recursiveJniAllNullableTypes); + }); + + testWidgets('all null datatypes serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes allTypesNull = JniAllNullableTypes(); + + final JniAllNullableTypes? echoNullFilledClass = + api!.echoAllNullableTypes(allTypesNull); + expect(allTypesNull, echoNullFilledClass); + }); + + testWidgets('Classes with list of null serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes listTypes = + JniAllNullableTypes(list: ['String', null]); + + final JniAllNullableTypes? echoNullFilledClass = + api!.echoAllNullableTypes(listTypes); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets('Classes with map of null serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes listTypes = JniAllNullableTypes( + map: {'String': 'string', 'null': null}); + + final JniAllNullableTypes? echoNullFilledClass = + api!.echoAllNullableTypes(listTypes); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets( + 'all nullable datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypesWithoutRecursion? echoObject = api! + .echoAllNullableTypesWithoutRecursion( + genericJniAllNullableTypesWithoutRecursion); + + expect(echoObject, genericJniAllNullableTypesWithoutRecursion); + }); + + testWidgets( + 'all null datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypesWithoutRecursion allTypesNull = + JniAllNullableTypesWithoutRecursion(); + + final JniAllNullableTypesWithoutRecursion? echoNullFilledClass = + api!.echoAllNullableTypesWithoutRecursion(allTypesNull); + expect(allTypesNull, echoNullFilledClass); + }); + + testWidgets( + 'Classes without recursion with list of null serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypesWithoutRecursion listTypes = + JniAllNullableTypesWithoutRecursion( + list: ['String', null], + ); + + final JniAllNullableTypesWithoutRecursion? echoNullFilledClass = + api!.echoAllNullableTypesWithoutRecursion(listTypes); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets( + 'Classes without recursion with map of null serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypesWithoutRecursion listTypes = + JniAllNullableTypesWithoutRecursion( + map: {'String': 'string', 'null': null}, + ); + + final JniAllNullableTypesWithoutRecursion? echoNullFilledClass = + api!.echoAllNullableTypesWithoutRecursion(listTypes); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets('errors are returned correctly', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + expect(() async { + api!.throwError(); + }, throwsA(isA())); + }); + + testWidgets('errors are returned from void methods correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + expect(() async { + api!.throwErrorFromVoid(); + }, throwsA(isA())); + }); + + // testWidgets('flutter errors are returned correctly', + // (WidgetTester _) async { + // final JniHostIntegrationCoreApi? api = + // JniHostIntegrationCoreApi.getInstance(); + // expect( + // () => api!.throwFlutterError(), + // throwsA((dynamic e) => + // e is PlatformException && + // e.code == 'code' && + // e.message == 'message' && + // e.details == 'details')); + // }); + + testWidgets('nested objects can be sent correctly', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final JniAllClassesWrapper classWrapper = classWrapperMaker(); + final String? receivedString = + api!.extractNestedNullableString(classWrapper); + expect(receivedString, classWrapper.allNullableTypes.aNullableString); + }); + + testWidgets('nested objects can be received correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const String sentString = 'Some string'; + final JniAllClassesWrapper receivedObject = + api!.createNestedNullableString(sentString); + expect(receivedObject.allNullableTypes.aNullableString, sentString); + }); + + testWidgets('nested classes can serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final JniAllClassesWrapper classWrapper = classWrapperMaker(); + + final JniAllClassesWrapper receivedClassWrapper = + api!.echoClassWrapper(classWrapper); + expect(classWrapper, receivedClassWrapper); + }); + + testWidgets('nested null classes can serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final JniAllClassesWrapper classWrapper = classWrapperMaker(); + + classWrapper.allTypes = null; + + final JniAllClassesWrapper receivedClassWrapper = + api!.echoClassWrapper(classWrapper); + expect(classWrapper, receivedClassWrapper); + }); + + testWidgets( + 'Arguments of multiple types serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const String aNullableString = 'this is a String'; + const bool aNullableBool = false; + const int aNullableInt = regularInt; + + final JniAllNullableTypes echoObject = api!.sendMultipleNullableTypes( + aNullableBool, aNullableInt, aNullableString); + expect(echoObject.aNullableInt, aNullableInt); + expect(echoObject.aNullableBool, aNullableBool); + expect(echoObject.aNullableString, aNullableString); + }); + + testWidgets( + 'Arguments of multiple null types serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes echoNullFilledClass = + api!.sendMultipleNullableTypes(null, null, null); + expect(echoNullFilledClass.aNullableInt, null); + expect(echoNullFilledClass.aNullableBool, null); + expect(echoNullFilledClass.aNullableString, null); + }); + + testWidgets( + 'Arguments of multiple types serialize and deserialize correctly (WithoutRecursion)', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const String aNullableString = 'this is a String'; + const bool aNullableBool = false; + const int aNullableInt = regularInt; + + final JniAllNullableTypesWithoutRecursion echoObject = api! + .sendMultipleNullableTypesWithoutRecursion( + aNullableBool, aNullableInt, aNullableString); + expect(echoObject.aNullableInt, aNullableInt); + expect(echoObject.aNullableBool, aNullableBool); + expect(echoObject.aNullableString, aNullableString); + }); + + testWidgets( + 'Arguments of multiple null types serialize and deserialize correctly (WithoutRecursion)', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypesWithoutRecursion echoNullFilledClass = + api!.sendMultipleNullableTypesWithoutRecursion(null, null, null); + expect(echoNullFilledClass.aNullableInt, null); + expect(echoNullFilledClass.aNullableBool, null); + expect(echoNullFilledClass.aNullableString, null); + }); + + testWidgets('Int serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const int sentInt = regularInt; + final int receivedInt = api!.echoInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Int64 serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = biggerThanBigInt; + final int receivedInt = api!.echoInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Doubles serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const double sentDouble = 2.0694; + final double receivedDouble = api!.echoDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('booleans serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + for (final bool sentBool in [true, false]) { + final bool receivedBool = api!.echoBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('strings serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const String sentString = 'default'; + final String receivedString = api!.echoString(sentString); + expect(receivedString, sentString); + }); + + testWidgets('Uint8List serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final List data = [ + 102, + 111, + 114, + 116, + 121, + 45, + 116, + 119, + 111, + 0 + ]; + final Uint8List sentUint8List = Uint8List.fromList(data); + final Uint8List receivedUint8List = api!.echoUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets('generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const Object sentString = "I'm a computer"; + final Object receivedString = api!.echoObject(sentString); + expect(receivedString, sentString); + + // Echo a second type as well to ensure the handling is generic. + const Object sentInt = regularInt; + final Object receivedInt = api.echoObject(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = api!.echoList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = api!.echoEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = + api!.echoClassList(allNullableTypesList); + for (final (int index, JniAllNullableTypes? value) + in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('NonNull enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = + api!.echoNonNullEnumList(nonNullEnumList); + expect(listEquals(echoObject, nonNullEnumList), true); + }); + + testWidgets('NonNull class lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = + api!.echoNonNullClassList(nonNullJniAllNullableTypesList); + for (final (int index, JniAllNullableTypes value) in echoObject.indexed) { + expect(value, nonNullJniAllNullableTypesList[index]); + } + }); + + testWidgets('maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = api!.echoMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = api!.echoStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = api!.echoIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = api!.echoEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = + api!.echoClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('NonNull string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = + api!.echoNonNullStringMap(nonNullStringMap); + expect(mapEquals(echoObject, nonNullStringMap), true); + }); + + testWidgets('NonNull int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = api!.echoNonNullIntMap(nonNullIntMap); + expect(mapEquals(echoObject, nonNullIntMap), true); + }); + + testWidgets('NonNull enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = + api!.echoNonNullEnumMap(nonNullEnumMap); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }); + + testWidgets('NonNull class maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = + api!.echoNonNullClassMap(nonNullJniAllNullableTypesMap); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, nonNullJniAllNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.two; + final JniAnEnum receivedEnum = api!.echoEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnotherEnum sentEnum = JniAnotherEnum.justInCase; + final JniAnotherEnum receivedEnum = api!.echoAnotherEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.fortyTwo; + final JniAnEnum receivedEnum = api!.echoEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('required named parameter', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + // This number corresponds with the default value of this method. + const int sentInt = regularInt; + final int receivedInt = api!.echoRequiredInt(anInt: sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('optional default parameter no arg', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + // This number corresponds with the default value of this method. + const double sentDouble = 3.14; + final double receivedDouble = api!.echoOptionalDefaultDouble(); + expect(receivedDouble, sentDouble); + }); + + testWidgets('optional default parameter with arg', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const double sentDouble = 3.15; + final double receivedDouble = api!.echoOptionalDefaultDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('named default parameter no arg', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + // This string corresponds with the default value of this method. + const String sentString = 'default'; + final String receivedString = api!.echoNamedDefaultString(); + expect(receivedString, sentString); + }); + + testWidgets('named default parameter with arg', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + // This string corresponds with the default value of this method. + const String sentString = 'notDefault'; + final String receivedString = + api!.echoNamedDefaultString(aString: sentString); + expect(receivedString, sentString); + }); + + testWidgets('Nullable Int serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = api!.echoNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Nullable Int64 serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = biggerThanBigInt; + final int? receivedInt = api!.echoNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Null Ints serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final int? receivedNullInt = api!.echoNullableInt(null); + expect(receivedNullInt, null); + }); + + testWidgets('Nullable Doubles serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const double sentDouble = 2.0694; + final double? receivedDouble = api!.echoNullableDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('Null Doubles serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final double? receivedNullDouble = api!.echoNullableDouble(null); + expect(receivedNullDouble, null); + }); + + testWidgets('Nullable booleans serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + for (final bool? sentBool in [true, false]) { + final bool? receivedBool = api!.echoNullableBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('Null booleans serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const bool? sentBool = null; + final bool? receivedBool = api!.echoNullableBool(sentBool); + expect(receivedBool, sentBool); + }); + + testWidgets('Nullable strings serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const String sentString = "I'm a computer"; + final String? receivedString = api!.echoNullableString(sentString); + expect(receivedString, sentString); + }); + + testWidgets('Null strings serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final String? receivedNullString = api!.echoNullableString(null); + expect(receivedNullString, null); + }); + + testWidgets('Nullable Uint8List serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final List data = [ + 102, + 111, + 114, + 116, + 121, + 45, + 116, + 119, + 111, + 0 + ]; + final Uint8List sentUint8List = Uint8List.fromList(data); + final Uint8List? receivedUint8List = + api!.echoNullableUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets('Null Uint8List serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Uint8List? receivedNullUint8List = api!.echoNullableUint8List(null); + expect(receivedNullUint8List, null); + }); + + testWidgets('generic nullable Objects serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const Object sentString = "I'm a computer"; + final Object? receivedString = api!.echoNullableObject(sentString); + expect(receivedString, sentString); + + // Echo a second type as well to ensure the handling is generic. + const Object sentInt = regularInt; + final Object? receivedInt = api.echoNullableObject(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Null generic Objects serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Object? receivedNullObject = api!.echoNullableObject(null); + expect(receivedNullObject, null); + }); + + testWidgets('nullable lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = api!.echoNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('nullable enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = api!.echoNullableEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('nullable lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = + api!.echoNullableClassList(allNullableTypesList); + for (final (int index, JniAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets( + 'nullable NonNull enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = + api!.echoNullableNonNullEnumList(nonNullEnumList); + expect(listEquals(echoObject, nonNullEnumList), true); + }); + + testWidgets('nullable NonNull lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = + api!.echoNullableClassList(nonNullJniAllNullableTypesList); + for (final (int index, JniAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, nonNullJniAllNullableTypesList[index]); + } + }); + + testWidgets('nullable maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = api!.echoNullableMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('nullable string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + api!.echoNullableStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('nullable int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = api!.echoNullableIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('nullable enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + api!.echoNullableEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('nullable class maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + api!.echoNullableClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets( + 'nullable NonNull string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + api!.echoNullableNonNullStringMap(nonNullStringMap); + expect(mapEquals(echoObject, nonNullStringMap), true); + }); + + testWidgets('nullable NonNull int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + api!.echoNullableNonNullIntMap(nonNullIntMap); + expect(mapEquals(echoObject, nonNullIntMap), true); + }); + + testWidgets( + 'nullable NonNull enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + api!.echoNullableNonNullEnumMap(nonNullEnumMap); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }); + + testWidgets( + 'nullable NonNull class maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + api!.echoNullableNonNullClassMap(nonNullJniAllNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, nonNullJniAllNullableTypesMap[entry.key]); + } + }); + + testWidgets('nullable enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.three; + final JniAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnotherEnum sentEnum = JniAnotherEnum.justInCase; + final JniAnotherEnum? echoEnum = api!.echoAnotherNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word nullable enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.fourHundredTwentyTwo; + final JniAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = api!.echoNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('null maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Map? echoObject = api!.echoNullableMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Map? echoObject = + api!.echoNullableStringMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Map? echoObject = api!.echoNullableIntMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum? sentEnum = null; + final JniAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly (again)', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnotherEnum? sentEnum = null; + final JniAnotherEnum? echoEnum = api!.echoAnotherNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null classes serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes? echoObject = api!.echoAllNullableTypes(null); + + expect(echoObject, isNull); + }); + + testWidgets('optional nullable parameter', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = api!.echoOptionalNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Null optional nullable parameter', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final int? receivedNullInt = api!.echoOptionalNullableInt(); + expect(receivedNullInt, null); + }); + + testWidgets('named nullable parameter', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const String sentString = "I'm a computer"; + final String? receivedString = + api!.echoNamedNullableString(aNullableString: sentString); + expect(receivedString, sentString); + }); + + testWidgets('Null named nullable parameter', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final String? receivedNullString = api!.echoNamedNullableString(); + expect(receivedNullString, null); + }); + }); + + group('Host async API tests', () { + testWidgets('basic void->void call works', (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + expect(api!.noopAsync(), completes); + }); + + testWidgets('async errors are returned from non void methods correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + expect(() async { + await api!.throwAsyncError(); + }, throwsA(isA())); + }); + + testWidgets('async errors are returned from void methods correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + expect(() async { + await api!.throwAsyncErrorFromVoid(); + }, throwsA(isA())); + }); + + // testWidgets( + // 'async flutter errors are returned from non void methods correctly', + // (WidgetTester _) async { + // final JniHostIntegrationCoreApi? api = + // JniHostIntegrationCoreApi.getInstance(); + + // expect( + // () => api!.throwAsyncFlutterError(), + // throwsA((dynamic e) => + // e is PlatformException && + // e.code == 'code' && + // e.message == 'message' && + // e.details == 'details')); + // }); + + testWidgets('all datatypes async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllTypes echoObject = + await api!.echoAsyncJniAllTypes(genericJniAllTypes); + + expect(echoObject, genericJniAllTypes); + }); + + testWidgets( + 'all nullable async datatypes serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes? echoObject = await api! + .echoAsyncNullableJniAllNullableTypes(recursiveJniAllNullableTypes); + + expect(echoObject, recursiveJniAllNullableTypes); + }); + + testWidgets('all null datatypes async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypes allTypesNull = JniAllNullableTypes(); + + final JniAllNullableTypes? echoNullFilledClass = + await api!.echoAsyncNullableJniAllNullableTypes(allTypesNull); + expect(echoNullFilledClass, allTypesNull); + }); + + testWidgets( + 'all nullable async datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypesWithoutRecursion? echoObject = await api! + .echoAsyncNullableJniAllNullableTypesWithoutRecursion( + genericJniAllNullableTypesWithoutRecursion); + + expect(echoObject, genericJniAllNullableTypesWithoutRecursion); + }); + + testWidgets( + 'all null datatypes without recursion async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final JniAllNullableTypesWithoutRecursion allTypesNull = + JniAllNullableTypesWithoutRecursion(); + + final JniAllNullableTypesWithoutRecursion? echoNullFilledClass = + await api!.echoAsyncNullableJniAllNullableTypesWithoutRecursion( + allTypesNull); + expect(echoNullFilledClass, allTypesNull); + }); + + testWidgets('Int async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = regularInt; + final int receivedInt = await api!.echoAsyncInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Int64 async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = biggerThanBigInt; + final int receivedInt = await api!.echoAsyncInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Doubles async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const double sentDouble = 2.0694; + final double receivedDouble = await api!.echoAsyncDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('booleans async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + for (final bool sentBool in [true, false]) { + final bool receivedBool = await api!.echoAsyncBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('strings async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const String sentObject = 'Hello, asynchronously!'; + + final String echoObject = await api!.echoAsyncString(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('Uint8List async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final List data = [ + 102, + 111, + 114, + 116, + 121, + 45, + 116, + 119, + 111, + 0 + ]; + final Uint8List sentUint8List = Uint8List.fromList(data); + final Uint8List receivedUint8List = + await api!.echoAsyncUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets('generic Objects async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const Object sentString = "I'm a computer"; + final Object receivedString = await api!.echoAsyncObject(sentString); + expect(receivedString, sentString); + + // Echo a second type as well to ensure the handling is generic. + const Object sentInt = regularInt; + final Object receivedInt = await api.echoAsyncObject(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = await api!.echoAsyncList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = + await api!.echoAsyncEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List echoObject = + await api!.echoAsyncClassList(allNullableTypesList); + for (final (int index, JniAllNullableTypes? value) + in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = await api!.echoAsyncMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = + await api!.echoAsyncStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = await api!.echoAsyncIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = + await api!.echoAsyncEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map echoObject = + await api!.echoAsyncClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.three; + final JniAnEnum echoEnum = await api!.echoAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnotherEnum sentEnum = JniAnotherEnum.justInCase; + final JniAnotherEnum echoEnum = await api!.echoAnotherAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.fourHundredTwentyTwo; + final JniAnEnum echoEnum = await api!.echoAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable Int async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = await api!.echoAsyncNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('nullable Int64 async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const int sentInt = biggerThanBigInt; + final int? receivedInt = await api!.echoAsyncNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('nullable Doubles async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const double sentDouble = 2.0694; + final double? receivedDouble = + await api!.echoAsyncNullableDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('nullable booleans async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + for (final bool sentBool in [true, false]) { + final bool? receivedBool = await api!.echoAsyncNullableBool(sentBool); + expect(receivedBool, sentBool); + } + }); + + testWidgets('nullable strings async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const String sentObject = 'Hello, asynchronously!'; + + final String? echoObject = await api!.echoAsyncNullableString(sentObject); + expect(echoObject, sentObject); + }); + + testWidgets('nullable Uint8List async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final List data = [ + 102, + 111, + 114, + 116, + 121, + 45, + 116, + 119, + 111, + 0 + ]; + final Uint8List sentUint8List = Uint8List.fromList(data); + final Uint8List? receivedUint8List = + await api!.echoAsyncNullableUint8List(sentUint8List); + expect(receivedUint8List, sentUint8List); + }); + + testWidgets( + 'nullable generic Objects async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + const Object sentString = "I'm a computer"; + final Object? receivedString = + await api!.echoAsyncNullableObject(sentString); + expect(receivedString, sentString); + + // Echo a second type as well to ensure the handling is generic. + const Object sentInt = regularInt; + final Object? receivedInt = await api.echoAsyncNullableObject(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('nullable lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('nullable enum lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = + await api!.echoAsyncNullableEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('nullable class lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = + await api!.echoAsyncNullableClassList(allNullableTypesList); + for (final (int index, JniAllNullableTypes? value) + in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('nullable maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + await api!.echoAsyncNullableMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('nullable string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + await api!.echoAsyncNullableStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('nullable int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + await api!.echoAsyncNullableIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('nullable enum maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + await api!.echoAsyncNullableEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('nullable class maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Map? echoObject = + await api!.echoAsyncNullableClassMap(allNullableTypesMap); + for (final MapEntry entry + in echoObject!.entries) { + expect(entry.value, allNullableTypesMap[entry.key]); + } + }); + + testWidgets('nullable enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.three; + final JniAnEnum? echoEnum = await api!.echoAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnotherEnum sentEnum = JniAnotherEnum.justInCase; + final JniAnotherEnum? echoEnum = + await api!.echoAnotherAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum sentEnum = JniAnEnum.fortyTwo; + final JniAnEnum? echoEnum = await api!.echoAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null Ints async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final int? receivedInt = await api!.echoAsyncNullableInt(null); + expect(receivedInt, null); + }); + + testWidgets('null Doubles async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final double? receivedDouble = await api!.echoAsyncNullableDouble(null); + expect(receivedDouble, null); + }); + + testWidgets('null booleans async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final bool? receivedBool = await api!.echoAsyncNullableBool(null); + expect(receivedBool, null); + }); + + testWidgets('null strings async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final String? echoObject = await api!.echoAsyncNullableString(null); + expect(echoObject, null); + }); + + testWidgets('null Uint8List async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Uint8List? receivedUint8List = + await api!.echoAsyncNullableUint8List(null); + expect(receivedUint8List, null); + }); + + testWidgets( + 'null generic Objects async serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + final Object? receivedString = await api!.echoAsyncNullableObject(null); + expect(receivedString, null); + }); + + testWidgets('null lists serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('null maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Map? echoObject = + await api!.echoAsyncNullableMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null string maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Map? echoObject = + await api!.echoAsyncNullableStringMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null int maps serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + final Map? echoObject = + await api!.echoAsyncNullableIntMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnEnum? sentEnum = null; + final JniAnEnum? echoEnum = await api!.echoAsyncNullableEnum(null); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly', + (WidgetTester _) async { + final JniHostIntegrationCoreApi? api = + JniHostIntegrationCoreApi.getInstance(); + + const JniAnotherEnum? sentEnum = null; + final JniAnotherEnum? echoEnum = + await api!.echoAnotherAsyncNullableEnum(null); + expect(echoEnum, sentEnum); + }); + }); + + group('Host API with suffix', () { + testWidgets('echo string succeeds with suffix with multiple instances', + (_) async { + final JniHostSmallApi? apiWithSuffixOne = + JniHostSmallApi.getInstance(channelName: 'suffixOne'); + final JniHostSmallApi? apiWithSuffixTwo = + JniHostSmallApi.getInstance(channelName: 'suffixTwo'); + const String sentString = "I'm a computer"; + final String echoStringOne = await apiWithSuffixOne!.echo(sentString); + final String echoStringTwo = await apiWithSuffixTwo!.echo(sentString); + expect(sentString, echoStringOne); + expect(sentString, echoStringTwo); + }); + + testWidgets('multiple instances will have different instance names', + (_) async { + // The only way to get the channel name back is to throw an exception. + // These APIs have no corresponding APIs on the host platforms. + const String sentString = "I'm a computer"; + try { + final JniHostSmallApi? apiWithSuffixOne = + JniHostSmallApi.getInstance(channelName: 'suffixWithNoHost'); + await apiWithSuffixOne!.echo(sentString); + } on ArgumentError catch (e) { + expect(e.message, contains('suffixWithNoHost')); + } catch (e) { + print(e); + } + try { + final JniHostSmallApi? apiWithSuffixTwo = + JniHostSmallApi.getInstance(channelName: 'suffixWithoutHost'); + await apiWithSuffixTwo!.echo(sentString); + } on ArgumentError catch (e) { + expect(e.message, contains('suffixWithoutHost')); + } catch (e) { + print(e); + } + }); + }); +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ffi_test_types.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ffi_test_types.dart new file mode 100644 index 00000000000..1c5d1eefa08 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/ffi_test_types.dart @@ -0,0 +1,461 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: public_member_api_docs + +import 'package:flutter/foundation.dart'; + +import 'src/generated/jni_tests.gen.dart'; + +const int biggerThanBigInt = 3000000000; +const int regularInt = 42; +const double doublePi = 3.14159; + +final List nonNullList = [ + 'Thing 1', + 2, + true, + 3.14, +]; + +final List nonNullStringList = [ + 'Thing 1', + '2', + 'true', + '3.14', +]; + +final List nonNullIntList = [ + 1, + 2, + 3, + 4, +]; + +final List nonNullDoubleList = [ + 1, + 2.99999, + 3, + 3.14, +]; + +final List nonNullBoolList = [ + true, + false, + true, + false, +]; + +final List nonNullEnumList = [ + JniAnEnum.one, + JniAnEnum.two, + JniAnEnum.three, + JniAnEnum.fortyTwo, + JniAnEnum.fourHundredTwentyTwo, +]; + +final List> nonNullListList = >[ + nonNullList, + nonNullStringList, + nonNullIntList, + nonNullDoubleList, + nonNullBoolList, + nonNullEnumList, +]; + +final Map nonNullMap = { + 'a': 1, + 'b': 2.0, + 'c': 'three', + 'd': false, +}; + +final Map nonNullStringMap = { + 'a': '1', + 'b': '2.0', + 'c': 'three', + 'd': 'false', +}; + +final Map nonNullIntMap = { + 0: 0, + 1: 1, + 2: 3, + 4: -1, +}; + +final Map nonNullDoubleMap = { + 0.0: 0, + 1.1: 2.0, + 3: 0.3, + -.4: -0.2, +}; + +final Map nonNullBoolMap = { + 0: true, + 1: false, + 2: true, +}; + +final Map nonNullEnumMap = { + JniAnEnum.one: JniAnEnum.one, + JniAnEnum.two: JniAnEnum.two, + JniAnEnum.three: JniAnEnum.three, + JniAnEnum.fortyTwo: JniAnEnum.fortyTwo, +}; + +final Map> nonNullListMap = >{ + 0: nonNullList, + 1: nonNullStringList, + 2: nonNullDoubleList, + 4: nonNullIntList, + 5: nonNullBoolList, + 6: nonNullEnumList, +}; + +final Map> nonNullMapMap = >{ + 0: nonNullMap, + 1: nonNullStringMap, + 2: nonNullDoubleMap, + 4: nonNullIntMap, + 5: nonNullBoolMap, + 6: nonNullEnumMap, +}; + +final List> nonNullMapList = >[ + nonNullMap, + nonNullStringMap, + nonNullDoubleMap, + nonNullIntMap, + nonNullBoolMap, + nonNullEnumMap, +]; + +final List list = [ + 'Thing 1', + 2, + true, + 3.14, + null, +]; + +final List stringList = [ + 'Thing 1', + '2', + 'true', + '3.14', + null, +]; + +final List intList = [ + 1, + 2, + 3, + 4, + null, +]; + +final List doubleList = [ + 1, + 2.99999, + 3, + 3.14, + null, +]; + +final List boolList = [ + true, + false, + true, + false, + null, +]; + +final List enumList = [ + JniAnEnum.one, + JniAnEnum.two, + JniAnEnum.three, + JniAnEnum.fortyTwo, + JniAnEnum.fourHundredTwentyTwo, + null +]; + +final List?> listList = ?>[ + list, + stringList, + intList, + doubleList, + boolList, + enumList, + null +]; + +final Map map = { + 'a': 1, + 'b': 2.0, + 'c': 'three', + 'd': false, + 'e': null +}; + +final Map stringMap = { + 'a': '1', + 'b': '2.0', + 'c': 'three', + 'd': 'false', + 'e': 'null', + 'f': null +}; + +final Map intMap = { + 0: 0, + 1: 1, + 2: 3, + 4: -1, + 5: null, +}; + +final Map doubleMap = { + 0.0: 0, + 1.1: 2.0, + 3: 0.3, + -.4: -0.2, + 1111111111111111.11111111111111111111111111111111111111111111: null +}; + +final Map boolMap = { + 0: true, + 1: false, + 2: true, + 3: null, +}; + +final Map enumMap = { + JniAnEnum.one: JniAnEnum.one, + JniAnEnum.two: JniAnEnum.two, + JniAnEnum.three: JniAnEnum.three, + JniAnEnum.fortyTwo: JniAnEnum.fortyTwo, + JniAnEnum.fourHundredTwentyTwo: null, +}; + +final Map?> listMap = ?>{ + 0: list, + 1: stringList, + 2: doubleList, + 4: intList, + 5: boolList, + 6: enumList, + 7: null +}; + +final Map?> mapMap = ?>{ + 0: map, + 1: stringMap, + 2: doubleMap, + 4: intMap, + 5: boolMap, + 6: enumMap, + 7: null +}; + +final List?> mapList = ?>[ + map, + stringMap, + doubleMap, + intMap, + boolMap, + enumMap, + null +]; + +final JniAllNullableTypesWithoutRecursion + genericJniAllNullableTypesWithoutRecursion = + JniAllNullableTypesWithoutRecursion( + aNullableBool: true, + aNullableInt: regularInt, + aNullableInt64: biggerThanBigInt, + aNullableDouble: doublePi, + aNullableString: 'Hello host!', + aNullableByteArray: Uint8List.fromList([1, 2, 3]), + aNullable4ByteArray: Int32List.fromList([4, 5, 6]), + aNullable8ByteArray: Int64List.fromList([7, 8, 9]), + aNullableFloatArray: Float64List.fromList([2.71828, doublePi]), + aNullableEnum: JniAnEnum.fourHundredTwentyTwo, + aNullableObject: 0, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: list, + listList: listList, + mapList: mapList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: map, + listMap: listMap, + mapMap: mapMap, +); + +final List + allNullableTypesWithoutRecursionClassList = + [ + genericJniAllNullableTypesWithoutRecursion, + JniAllNullableTypesWithoutRecursion(), + null, +]; + +final Map + allNullableTypesWithoutRecursionClassMap = + { + 0: genericJniAllNullableTypesWithoutRecursion, + 1: JniAllNullableTypesWithoutRecursion(), + 2: null, +}; + +final JniAllTypes genericJniAllTypes = JniAllTypes( + aBool: true, + anInt: regularInt, + anInt64: biggerThanBigInt, + aDouble: doublePi, + aString: 'Hello host!', + aByteArray: Uint8List.fromList([1, 2, 3]), + a4ByteArray: Int32List.fromList([4, 5, 6]), + a8ByteArray: Int64List.fromList([7, 8, 9]), + aFloatArray: Float64List.fromList([2.71828, doublePi]), + anEnum: JniAnEnum.fortyTwo, + anObject: 1, + list: list, + stringList: nonNullStringList, + intList: nonNullIntList, + doubleList: nonNullDoubleList, + boolList: nonNullBoolList, + enumList: nonNullEnumList, + objectList: nonNullList, + listList: nonNullListList, + mapList: nonNullMapList, + map: nonNullMap, + stringMap: nonNullStringMap, + intMap: nonNullIntMap, + // doubleMap: nonNullDoubleMap, + // boolMap: nonNullBoolMap, + enumMap: nonNullEnumMap, + objectMap: nonNullMap, + listMap: nonNullListMap, + mapMap: nonNullMapMap, +); + +final List allTypesClassList = [ + genericJniAllTypes, + null, +]; + +final Map allTypesClassMap = { + 0: genericJniAllTypes, + 1: null, +}; + +final JniAllNullableTypes genericJniAllNullableTypes = JniAllNullableTypes( + aNullableBool: true, + aNullableInt: regularInt, + aNullableInt64: biggerThanBigInt, + aNullableDouble: doublePi, + aNullableString: 'Hello host!', + aNullableByteArray: Uint8List.fromList([1, 2, 3]), + aNullable4ByteArray: Int32List.fromList([4, 5, 6]), + aNullable8ByteArray: Int64List.fromList([7, 8, 9]), + aNullableFloatArray: Float64List.fromList([2.71828, doublePi]), + aNullableEnum: JniAnEnum.fourHundredTwentyTwo, + aNullableObject: 0, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: list, + listList: listList, + mapList: mapList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: map, + listMap: listMap, + mapMap: mapMap, +); + +final List nonNullJniAllNullableTypesList = + [ + genericJniAllNullableTypes, + JniAllNullableTypes(), +]; + +final Map nonNullJniAllNullableTypesMap = + { + 0: genericJniAllNullableTypes, + 1: JniAllNullableTypes(), +}; + +final List allNullableTypesList = [ + genericJniAllNullableTypes, + JniAllNullableTypes(), + null, +]; + +final Map allNullableTypesMap = + { + 0: genericJniAllNullableTypes, + 1: JniAllNullableTypes(), + 2: null, +}; + +final JniAllNullableTypes recursiveJniAllNullableTypes = JniAllNullableTypes( + aNullableBool: true, + aNullableInt: regularInt, + aNullableInt64: biggerThanBigInt, + aNullableDouble: doublePi, + aNullableString: 'Hello host!', + aNullableByteArray: Uint8List.fromList([1, 2, 3]), + aNullable4ByteArray: Int32List.fromList([4, 5, 6]), + aNullable8ByteArray: Int64List.fromList([7, 8, 9]), + aNullableFloatArray: Float64List.fromList([2.71828, doublePi]), + aNullableEnum: JniAnEnum.fourHundredTwentyTwo, + aNullableObject: 0, + allNullableTypes: genericJniAllNullableTypes, + list: list, + stringList: stringList, + intList: intList, + doubleList: doubleList, + boolList: boolList, + enumList: enumList, + objectList: list, + listList: listList, + mapList: mapList, + recursiveClassList: allNullableTypesList, + map: map, + stringMap: stringMap, + intMap: intMap, + enumMap: enumMap, + objectMap: map, + listMap: listMap, + mapMap: mapMap, + recursiveClassMap: allNullableTypesMap, +); + +JniAllClassesWrapper classWrapperMaker() { + return JniAllClassesWrapper( + allNullableTypes: recursiveJniAllNullableTypes, + allNullableTypesWithoutRecursion: + genericJniAllNullableTypesWithoutRecursion, + allTypes: genericJniAllTypes, + classList: allTypesClassList, + classMap: allTypesClassMap, + nullableClassList: allNullableTypesWithoutRecursionClassList, + nullableClassMap: allNullableTypesWithoutRecursionClassMap, + ); +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 48b495dd6a3..90d92e0451c 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -11,6 +11,8 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; +import 'ffi_integration_tests.dart' as ffi_tests + show TargetGenerator, runPigeonIntegrationTests; import 'generated.dart'; import 'test_types.dart'; @@ -45,6 +47,13 @@ const Set proxyApiSupportedLanguages = { void runPigeonIntegrationTests(TargetGenerator targetGenerator) { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + if (targetGenerator == TargetGenerator.kotlin) { + ffi_tests.runPigeonIntegrationTests( + targetGenerator == TargetGenerator.kotlin + ? ffi_tests.TargetGenerator.kotlin + : ffi_tests.TargetGenerator.swift); + } + group('Host sync API tests', () { testWidgets('basic void->void call works', (WidgetTester _) async { final HostIntegrationCoreApi api = HostIntegrationCoreApi(); diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart index 46be9723deb..5ffccdbb870 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart @@ -51,11 +51,11 @@ enum AnEnum { two, three, fortyTwo, - fourHundredTwentyTwo, + fourHundredTwentyTwo; } enum AnotherEnum { - justInCase, + justInCase; } class UnusedClass { diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart index 290a812f757..9d1d11656dc 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/enum.gen.dart @@ -42,7 +42,7 @@ enum EnumState { Error, /// This comment is to test enum member (SnakeCase) documentation comments. - SnakeCase, + SnakeCase; } /// This comment is to test class documentation comments. diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart index 51e63738aae..99aaa011591 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart @@ -33,11 +33,11 @@ enum EventEnum { two, three, fortyTwo, - fourHundredTwentyTwo, + fourHundredTwentyTwo; } enum AnotherEventEnum { - justInCase, + justInCase; } /// A class containing all supported nullable types. diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/jni_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/jni_tests.gen.dart new file mode 100644 index 00000000000..580b82a0a7b --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/jni_tests.gen.dart @@ -0,0 +1,3626 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; +import 'package:jni/jni.dart'; +import './jni_tests.gen.jni.dart' as bridge; + +bool _deepEquals(Object? a, Object? b) { + if (a is List && b is List) { + return a.length == b.length && + a.indexed + .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); + } + if (a is Map && b is Map) { + final Iterable keys = (a as Map).keys; + return a.length == b.length && + keys.every((Object? key) => + (b as Map).containsKey(key) && + _deepEquals(a[key], b[key])); + } + return a == b; +} + +bool isType(Type t) => T == t; + +bool isTypeOrNullableType(Type t) => isType(t) || isType(t); + +class _PigeonJniCodec { + static Object? readValue(JObject? value) { + if (value == null) { + return null; + } else if (value.isA(JLong.type)) { + return (value.as(JLong.type)).longValue(); + } else if (value.isA(JDouble.type)) { + return (value.as(JDouble.type)).doubleValue(); + } else if (value.isA(JString.type)) { + return (value.as(JString.type)).toDartString(); + } else if (value.isA(JBoolean.type)) { + return (value.as(JBoolean.type)).booleanValue(); + } else if (value.isA(JByteArray.type)) { + final Uint8List list = Uint8List(value.as(JByteArray.type).length); + for (int i = 0; i < value.as(JByteArray.type).length; i++) { + list[i] = value.as(JByteArray.type)[i]; + } + return list; + } else if (value.isA(JIntArray.type)) { + final Int32List list = Int32List(value.as(JIntArray.type).length); + for (int i = 0; i < value.as(JIntArray.type).length; i++) { + list[i] = value.as(JIntArray.type)[i]; + } + return list; + } else if (value.isA(JLongArray.type)) { + final Int64List list = Int64List(value.as(JLongArray.type).length); + for (int i = 0; i < value.as(JLongArray.type).length; i++) { + list[i] = value.as(JLongArray.type)[i]; + } + return list; + } else if (value.isA(JDoubleArray.type)) { + final Float64List list = Float64List(value.as(JDoubleArray.type).length); + for (int i = 0; i < value.as(JDoubleArray.type).length; i++) { + list[i] = value.as(JDoubleArray.type)[i]; + } + return list; + } else if (value.isA>(JList.type(JObject.type))) { + final JList list = + (value.as(JList.type(JObject.nullableType))); + final List res = []; + for (int i = 0; i < list.length; i++) { + res.add(readValue(list[i])); + } + return res; + } else if (value.isA>( + JMap.type(JObject.type, JObject.type))) { + final JMap map = (value.as( + JMap.type( + JObject.nullableType, JObject.nullableType))); + final Map res = {}; + for (final MapEntry entry in map.entries) { + res[readValue(entry.key)] = readValue(entry.value); + } + return res; + } else if (value.isA(bridge.JniUnusedClass.type)) { + return JniUnusedClass.fromJni(value.as(bridge.JniUnusedClass.type)); + } else if (value.isA(bridge.JniAllTypes.type)) { + return JniAllTypes.fromJni(value.as(bridge.JniAllTypes.type)); + } else if (value + .isA(bridge.JniAllNullableTypes.type)) { + return JniAllNullableTypes.fromJni( + value.as(bridge.JniAllNullableTypes.type)); + } else if (value.isA( + bridge.JniAllNullableTypesWithoutRecursion.type)) { + return JniAllNullableTypesWithoutRecursion.fromJni( + value.as(bridge.JniAllNullableTypesWithoutRecursion.type)); + } else if (value + .isA(bridge.JniAllClassesWrapper.type)) { + return JniAllClassesWrapper.fromJni( + value.as(bridge.JniAllClassesWrapper.type)); + } else if (value.isA(bridge.JniAnEnum.type)) { + return JniAnEnum.fromJni(value.as(bridge.JniAnEnum.type)); + } else if (value.isA(bridge.JniAnotherEnum.type)) { + return JniAnotherEnum.fromJni(value.as(bridge.JniAnotherEnum.type)); + } else { + throw ArgumentError.value(value); + } + } + + static T writeValue(Object? value) { + if (value == null) { + return null as T; + } else if (value is bool) { + return JBoolean(value) as T; + } else if (value is double) { + return JDouble(value) as T; + // ignore: avoid_double_and_int_checks + } else if (value is int) { + return JLong(value) as T; + } else if (value is String) { + return JString.fromString(value) as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JByteArray array = JByteArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JIntArray array = JIntArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JLongArray array = JLongArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + } else if (isTypeOrNullableType(T)) { + value as List; + final JDoubleArray array = JDoubleArray(value.length); + for (int i = 0; i < value.length; i++) { + array[i] = value[i]; + } + return array as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = JList.array(JBoolean.type); + for (final bool entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = JList.array(JDouble.type); + for (final double entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && isTypeOrNullableType>(T)) { + final JList res = JList.array(JLong.type); + for (final int entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = JList.array(JString.type); + for (final String entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = + JList.array( + bridge.JniAllNullableTypes.type); + for (final JniAllNullableTypes entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = + JList.array(bridge.JniAnEnum.type); + for (final JniAnEnum entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType< + JList>(T)) { + final JList res = + JList.array( + bridge.JniAllNullableTypesWithoutRecursion.nullableType); + for (final JniAllNullableTypesWithoutRecursion? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = + JList.array(bridge.JniAllTypes.nullableType); + for (final JniAllTypes? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = + JList.array(JBoolean.nullableType); + for (final bool? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = JList.array(JDouble.nullableType); + for (final double? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && isTypeOrNullableType>(T)) { + final JList res = JList.array(JLong.nullableType); + for (final int? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = JList.array(JString.nullableType); + for (final String? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = + JList.array( + bridge.JniAllNullableTypes.nullableType); + for (final JniAllNullableTypes? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List && + isTypeOrNullableType>(T)) { + final JList res = + JList.array(bridge.JniAnEnum.nullableType); + for (final JniAnEnum? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List> && + isTypeOrNullableType>>(T)) { + final JList> res = + JList>.array(JList.type(JObject.nullableType)); + for (final List entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List?> && + isTypeOrNullableType?>>(T)) { + final JList?> res = JList?>.array( + JList.nullableType(JObject.nullableType)); + for (final List? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List> && + isTypeOrNullableType>>(T)) { + final JList> res = + JList>.array( + JMap.type(JObject.nullableType, JObject.nullableType)); + for (final Map entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List?> && + isTypeOrNullableType?>>(T)) { + final JList?> res = + JList?>.array( + JMap.nullableType(JObject.nullableType, JObject.nullableType)); + for (final Map? entry in value) { + res.add(writeValue(entry)); + } + return res as T; + } else if (value is List) { + final JList res = JList.array(JObject.type); + for (int i = 0; i < value.length; i++) { + res.add(writeValue(value[i])); + } + return res as T; + } else if (value is List) { + final JList res = JList.array(JObject.nullableType); + for (int i = 0; i < value.length; i++) { + res.add(writeValue(value[i])); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash( + JLong.type, bridge.JniAllNullableTypes.type); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash( + bridge.JniAnEnum.type, bridge.JniAnEnum.type); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash(JLong.type, JLong.type); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash(JString.type, JString.type); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType< + JMap>(T)) { + final JMap res = + JMap.hash( + JLong.nullableType, + bridge.JniAllNullableTypesWithoutRecursion.nullableType); + for (final MapEntry entry + in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash( + JLong.nullableType, bridge.JniAllTypes.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash( + JLong.nullableType, bridge.JniAllNullableTypes.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash( + bridge.JniAnEnum.nullableType, bridge.JniAnEnum.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = + JMap.hash(JLong.nullableType, JLong.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map && + isTypeOrNullableType>(T)) { + final JMap res = JMap.hash( + JString.nullableType, JString.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map> && + isTypeOrNullableType>>(T)) { + final JMap> res = + JMap>.hash( + JLong.type, JList.type(JObject.nullableType)); + for (final MapEntry> entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map?> && + isTypeOrNullableType?>>(T)) { + final JMap?> res = + JMap?>.hash( + JLong.nullableType, JList.nullableType(JObject.nullableType)); + for (final MapEntry?> entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map> && + isTypeOrNullableType>>(T)) { + final JMap> res = + JMap>.hash(JLong.type, + JMap.type(JObject.nullableType, JObject.nullableType)); + for (final MapEntry> entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map?> && + isTypeOrNullableType?>>(T)) { + final JMap?> res = + JMap?>.hash(JLong.nullableType, + JMap.nullableType(JObject.nullableType, JObject.nullableType)); + for (final MapEntry?> entry + in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map) { + final JMap res = + JMap.hash(JObject.type, JObject.type); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map) { + final JMap res = + JMap.hash(JObject.type, JObject.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is Map) { + final JMap res = + JMap.hash(JObject.type, JObject.nullableType); + for (final MapEntry entry in value.entries) { + res[writeValue(entry.key)] = writeValue(entry.value); + } + return res as T; + } else if (value is JniUnusedClass) { + return value.toJni() as T; + } else if (value is JniAllTypes) { + return value.toJni() as T; + } else if (value is JniAllNullableTypes) { + return value.toJni() as T; + } else if (value is JniAllNullableTypesWithoutRecursion) { + return value.toJni() as T; + } else if (value is JniAllClassesWrapper) { + return value.toJni() as T; + } else if (value is JniAnEnum) { + return value.toJni() as T; + } else if (value is JniAnotherEnum) { + return value.toJni() as T; + } else { + throw ArgumentError.value(value); + } + } +} + +enum JniAnEnum { + one, + two, + three, + fortyTwo, + fourHundredTwentyTwo; + + bridge.JniAnEnum toJni() { + return bridge.JniAnEnum.Companion.ofRaw(index)!; + } + + static JniAnEnum? fromJni(bridge.JniAnEnum? jniEnum) { + return jniEnum == null ? null : JniAnEnum.values[jniEnum.getRaw()]; + } +} + +enum JniAnotherEnum { + justInCase; + + bridge.JniAnotherEnum toJni() { + return bridge.JniAnotherEnum.Companion.ofRaw(index)!; + } + + static JniAnotherEnum? fromJni(bridge.JniAnotherEnum? jniEnum) { + return jniEnum == null ? null : JniAnotherEnum.values[jniEnum.getRaw()]; + } +} + +class JniUnusedClass { + JniUnusedClass({ + this.aField, + }); + + Object? aField; + + List _toList() { + return [ + aField, + ]; + } + + bridge.JniUnusedClass toJni() { + return bridge.JniUnusedClass( + _PigeonJniCodec.writeValue(aField), + ); + } + + Object encode() { + return _toList(); + } + + static JniUnusedClass? fromJni(bridge.JniUnusedClass? jniClass) { + return jniClass == null + ? null + : JniUnusedClass( + aField: _PigeonJniCodec.readValue(jniClass.getAField()), + ); + } + + static JniUnusedClass decode(Object result) { + result as List; + return JniUnusedClass( + aField: result[0], + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! JniUnusedClass || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return aField == other.aField; + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +/// A class containing all supported types. +class JniAllTypes { + JniAllTypes({ + this.aBool = false, + this.anInt = 0, + this.anInt64 = 0, + this.aDouble = 0, + required this.aByteArray, + required this.a4ByteArray, + required this.a8ByteArray, + required this.aFloatArray, + this.anEnum = JniAnEnum.one, + this.anotherEnum = JniAnotherEnum.justInCase, + this.aString = '', + this.anObject = 0, + required this.list, + required this.stringList, + required this.intList, + required this.doubleList, + required this.boolList, + required this.enumList, + required this.objectList, + required this.listList, + required this.mapList, + required this.map, + required this.stringMap, + required this.intMap, + required this.enumMap, + required this.objectMap, + required this.listMap, + required this.mapMap, + }); + + bool aBool; + + int anInt; + + int anInt64; + + double aDouble; + + Uint8List aByteArray; + + Int32List a4ByteArray; + + Int64List a8ByteArray; + + Float64List aFloatArray; + + JniAnEnum anEnum; + + JniAnotherEnum anotherEnum; + + String aString; + + Object anObject; + + List list; + + List stringList; + + List intList; + + List doubleList; + + List boolList; + + List enumList; + + List objectList; + + List> listList; + + List> mapList; + + Map map; + + Map stringMap; + + Map intMap; + + Map enumMap; + + Map objectMap; + + Map> listMap; + + Map> mapMap; + + List _toList() { + return [ + aBool, + anInt, + anInt64, + aDouble, + aByteArray, + a4ByteArray, + a8ByteArray, + aFloatArray, + anEnum, + anotherEnum, + aString, + anObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ]; + } + + bridge.JniAllTypes toJni() { + return bridge.JniAllTypes( + aBool, + anInt, + anInt64, + aDouble, + _PigeonJniCodec.writeValue(aByteArray), + _PigeonJniCodec.writeValue(a4ByteArray), + _PigeonJniCodec.writeValue(a8ByteArray), + _PigeonJniCodec.writeValue(aFloatArray), + anEnum.toJni(), + anotherEnum.toJni(), + _PigeonJniCodec.writeValue(aString), + _PigeonJniCodec.writeValue(anObject), + _PigeonJniCodec.writeValue>(list), + _PigeonJniCodec.writeValue>(stringList), + _PigeonJniCodec.writeValue>(intList), + _PigeonJniCodec.writeValue>(doubleList), + _PigeonJniCodec.writeValue>(boolList), + _PigeonJniCodec.writeValue>(enumList), + _PigeonJniCodec.writeValue>(objectList), + _PigeonJniCodec.writeValue>>(listList), + _PigeonJniCodec.writeValue>>(mapList), + _PigeonJniCodec.writeValue>(map), + _PigeonJniCodec.writeValue>(stringMap), + _PigeonJniCodec.writeValue>(intMap), + _PigeonJniCodec.writeValue>( + enumMap), + _PigeonJniCodec.writeValue>(objectMap), + _PigeonJniCodec.writeValue>>(listMap), + _PigeonJniCodec.writeValue>>(mapMap), + ); + } + + Object encode() { + return _toList(); + } + + static JniAllTypes? fromJni(bridge.JniAllTypes? jniClass) { + return jniClass == null + ? null + : JniAllTypes( + aBool: jniClass.getABool(), + anInt: jniClass.getAnInt(), + anInt64: jniClass.getAnInt64(), + aDouble: jniClass.getADouble(), + aByteArray: (_PigeonJniCodec.readValue(jniClass.getAByteArray())! + as Uint8List), + a4ByteArray: (_PigeonJniCodec.readValue(jniClass.getA4ByteArray())! + as Int32List), + a8ByteArray: (_PigeonJniCodec.readValue(jniClass.getA8ByteArray())! + as Int64List), + aFloatArray: (_PigeonJniCodec.readValue(jniClass.getAFloatArray())! + as Float64List), + anEnum: JniAnEnum.fromJni(jniClass.getAnEnum())!, + anotherEnum: JniAnotherEnum.fromJni(jniClass.getAnotherEnum())!, + aString: jniClass.getAString().toDartString(releaseOriginal: true), + anObject: _PigeonJniCodec.readValue(jniClass.getAnObject())!, + list: (_PigeonJniCodec.readValue(jniClass.getList())! + as List) + .cast(), + stringList: (_PigeonJniCodec.readValue(jniClass.getStringList())! + as List) + .cast(), + intList: (_PigeonJniCodec.readValue(jniClass.getIntList())! + as List) + .cast(), + doubleList: (_PigeonJniCodec.readValue(jniClass.getDoubleList())! + as List) + .cast(), + boolList: (_PigeonJniCodec.readValue(jniClass.getBoolList())! + as List) + .cast(), + enumList: (_PigeonJniCodec.readValue(jniClass.getEnumList())! + as List) + .cast(), + objectList: (_PigeonJniCodec.readValue(jniClass.getObjectList())! + as List) + .cast(), + listList: (_PigeonJniCodec.readValue(jniClass.getListList())! + as List) + .cast>(), + mapList: (_PigeonJniCodec.readValue(jniClass.getMapList())! + as List) + .cast>(), + map: (_PigeonJniCodec.readValue(jniClass.getMap())! + as Map) + .cast(), + stringMap: (_PigeonJniCodec.readValue(jniClass.getStringMap())! + as Map) + .cast(), + intMap: (_PigeonJniCodec.readValue(jniClass.getIntMap())! + as Map) + .cast(), + enumMap: (_PigeonJniCodec.readValue(jniClass.getEnumMap())! + as Map) + .cast(), + objectMap: (_PigeonJniCodec.readValue(jniClass.getObjectMap())! + as Map) + .cast(), + listMap: (_PigeonJniCodec.readValue(jniClass.getListMap())! + as Map) + .cast>(), + mapMap: (_PigeonJniCodec.readValue(jniClass.getMapMap())! + as Map) + .cast>(), + ); + } + + static JniAllTypes decode(Object result) { + result as List; + return JniAllTypes( + aBool: result[0]! as bool, + anInt: result[1]! as int, + anInt64: result[2]! as int, + aDouble: result[3]! as double, + aByteArray: result[4]! as Uint8List, + a4ByteArray: result[5]! as Int32List, + a8ByteArray: result[6]! as Int64List, + aFloatArray: result[7]! as Float64List, + anEnum: result[8]! as JniAnEnum, + anotherEnum: result[9]! as JniAnotherEnum, + aString: result[10]! as String, + anObject: result[11]!, + list: result[12]! as List, + stringList: (result[13] as List?)!.cast(), + intList: (result[14] as List?)!.cast(), + doubleList: (result[15] as List?)!.cast(), + boolList: (result[16] as List?)!.cast(), + enumList: (result[17] as List?)!.cast(), + objectList: (result[18] as List?)!.cast(), + listList: (result[19] as List?)!.cast>(), + mapList: (result[20] as List?)!.cast>(), + map: result[21]! as Map, + stringMap: (result[22] as Map?)!.cast(), + intMap: (result[23] as Map?)!.cast(), + enumMap: + (result[24] as Map?)!.cast(), + objectMap: (result[25] as Map?)!.cast(), + listMap: + (result[26] as Map?)!.cast>(), + mapMap: (result[27] as Map?)! + .cast>(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! JniAllTypes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return aBool == other.aBool && + anInt == other.anInt && + anInt64 == other.anInt64 && + aDouble == other.aDouble && + _deepEquals(aByteArray, other.aByteArray) && + _deepEquals(a4ByteArray, other.a4ByteArray) && + _deepEquals(a8ByteArray, other.a8ByteArray) && + _deepEquals(aFloatArray, other.aFloatArray) && + anEnum == other.anEnum && + anotherEnum == other.anotherEnum && + aString == other.aString && + anObject == other.anObject && + _deepEquals(list, other.list) && + _deepEquals(stringList, other.stringList) && + _deepEquals(intList, other.intList) && + _deepEquals(doubleList, other.doubleList) && + _deepEquals(boolList, other.boolList) && + _deepEquals(enumList, other.enumList) && + _deepEquals(objectList, other.objectList) && + _deepEquals(listList, other.listList) && + _deepEquals(mapList, other.mapList) && + _deepEquals(map, other.map) && + _deepEquals(stringMap, other.stringMap) && + _deepEquals(intMap, other.intMap) && + _deepEquals(enumMap, other.enumMap) && + _deepEquals(objectMap, other.objectMap) && + _deepEquals(listMap, other.listMap) && + _deepEquals(mapMap, other.mapMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +/// A class containing all supported nullable types. +class JniAllNullableTypes { + JniAllNullableTypes({ + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + this.allNullableTypes, + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + this.recursiveClassList, + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + this.recursiveClassMap, + }); + + bool? aNullableBool; + + int? aNullableInt; + + int? aNullableInt64; + + double? aNullableDouble; + + Uint8List? aNullableByteArray; + + Int32List? aNullable4ByteArray; + + Int64List? aNullable8ByteArray; + + Float64List? aNullableFloatArray; + + JniAnEnum? aNullableEnum; + + JniAnotherEnum? anotherNullableEnum; + + String? aNullableString; + + Object? aNullableObject; + + JniAllNullableTypes? allNullableTypes; + + List? list; + + List? stringList; + + List? intList; + + List? doubleList; + + List? boolList; + + List? enumList; + + List? objectList; + + List?>? listList; + + List?>? mapList; + + List? recursiveClassList; + + Map? map; + + Map? stringMap; + + Map? intMap; + + Map? enumMap; + + Map? objectMap; + + Map?>? listMap; + + Map?>? mapMap; + + Map? recursiveClassMap; + + List _toList() { + return [ + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + allNullableTypes, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + recursiveClassList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + recursiveClassMap, + ]; + } + + bridge.JniAllNullableTypes toJni() { + return bridge.JniAllNullableTypes( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableInt64), + _PigeonJniCodec.writeValue(aNullableDouble), + _PigeonJniCodec.writeValue(aNullableByteArray), + _PigeonJniCodec.writeValue(aNullable4ByteArray), + _PigeonJniCodec.writeValue(aNullable8ByteArray), + _PigeonJniCodec.writeValue(aNullableFloatArray), + aNullableEnum == null ? null : aNullableEnum!.toJni(), + anotherNullableEnum == null ? null : anotherNullableEnum!.toJni(), + _PigeonJniCodec.writeValue(aNullableString), + _PigeonJniCodec.writeValue(aNullableObject), + allNullableTypes == null ? null : allNullableTypes!.toJni(), + _PigeonJniCodec.writeValue?>(list), + _PigeonJniCodec.writeValue?>(stringList), + _PigeonJniCodec.writeValue?>(intList), + _PigeonJniCodec.writeValue?>(doubleList), + _PigeonJniCodec.writeValue?>(boolList), + _PigeonJniCodec.writeValue?>(enumList), + _PigeonJniCodec.writeValue?>(objectList), + _PigeonJniCodec.writeValue?>?>(listList), + _PigeonJniCodec.writeValue?>?>(mapList), + _PigeonJniCodec.writeValue?>( + recursiveClassList), + _PigeonJniCodec.writeValue?>(map), + _PigeonJniCodec.writeValue?>(stringMap), + _PigeonJniCodec.writeValue?>(intMap), + _PigeonJniCodec.writeValue?>( + enumMap), + _PigeonJniCodec.writeValue?>(objectMap), + _PigeonJniCodec.writeValue?>?>(listMap), + _PigeonJniCodec.writeValue?>?>( + mapMap), + _PigeonJniCodec.writeValue?>( + recursiveClassMap), + ); + } + + Object encode() { + return _toList(); + } + + static JniAllNullableTypes? fromJni(bridge.JniAllNullableTypes? jniClass) { + return jniClass == null + ? null + : JniAllNullableTypes( + aNullableBool: jniClass + .getANullableBool() + ?.booleanValue(releaseOriginal: true), + aNullableInt: + jniClass.getANullableInt()?.longValue(releaseOriginal: true), + aNullableInt64: + jniClass.getANullableInt64()?.longValue(releaseOriginal: true), + aNullableDouble: jniClass + .getANullableDouble() + ?.doubleValue(releaseOriginal: true), + aNullableByteArray: + (_PigeonJniCodec.readValue(jniClass.getANullableByteArray()) + as Uint8List?), + aNullable4ByteArray: + (_PigeonJniCodec.readValue(jniClass.getANullable4ByteArray()) + as Int32List?), + aNullable8ByteArray: + (_PigeonJniCodec.readValue(jniClass.getANullable8ByteArray()) + as Int64List?), + aNullableFloatArray: + (_PigeonJniCodec.readValue(jniClass.getANullableFloatArray()) + as Float64List?), + aNullableEnum: JniAnEnum.fromJni(jniClass.getANullableEnum()), + anotherNullableEnum: + JniAnotherEnum.fromJni(jniClass.getAnotherNullableEnum()), + aNullableString: jniClass + .getANullableString() + ?.toDartString(releaseOriginal: true), + aNullableObject: + _PigeonJniCodec.readValue(jniClass.getANullableObject()), + allNullableTypes: + JniAllNullableTypes.fromJni(jniClass.getAllNullableTypes()), + list: (_PigeonJniCodec.readValue(jniClass.getList()) + as List?) + ?.cast(), + stringList: (_PigeonJniCodec.readValue(jniClass.getStringList()) + as List?) + ?.cast(), + intList: (_PigeonJniCodec.readValue(jniClass.getIntList()) + as List?) + ?.cast(), + doubleList: (_PigeonJniCodec.readValue(jniClass.getDoubleList()) + as List?) + ?.cast(), + boolList: (_PigeonJniCodec.readValue(jniClass.getBoolList()) + as List?) + ?.cast(), + enumList: (_PigeonJniCodec.readValue(jniClass.getEnumList()) + as List?) + ?.cast(), + objectList: (_PigeonJniCodec.readValue(jniClass.getObjectList()) + as List?) + ?.cast(), + listList: (_PigeonJniCodec.readValue(jniClass.getListList()) + as List?) + ?.cast?>(), + mapList: (_PigeonJniCodec.readValue(jniClass.getMapList()) + as List?) + ?.cast?>(), + recursiveClassList: + (_PigeonJniCodec.readValue(jniClass.getRecursiveClassList()) + as List?) + ?.cast(), + map: (_PigeonJniCodec.readValue(jniClass.getMap()) + as Map?) + ?.cast(), + stringMap: (_PigeonJniCodec.readValue(jniClass.getStringMap()) + as Map?) + ?.cast(), + intMap: (_PigeonJniCodec.readValue(jniClass.getIntMap()) + as Map?) + ?.cast(), + enumMap: (_PigeonJniCodec.readValue(jniClass.getEnumMap()) + as Map?) + ?.cast(), + objectMap: (_PigeonJniCodec.readValue(jniClass.getObjectMap()) + as Map?) + ?.cast(), + listMap: (_PigeonJniCodec.readValue(jniClass.getListMap()) + as Map?) + ?.cast?>(), + mapMap: (_PigeonJniCodec.readValue(jniClass.getMapMap()) + as Map?) + ?.cast?>(), + recursiveClassMap: + (_PigeonJniCodec.readValue(jniClass.getRecursiveClassMap()) + as Map?) + ?.cast(), + ); + } + + static JniAllNullableTypes decode(Object result) { + result as List; + return JniAllNullableTypes( + aNullableBool: result[0] as bool?, + aNullableInt: result[1] as int?, + aNullableInt64: result[2] as int?, + aNullableDouble: result[3] as double?, + aNullableByteArray: result[4] as Uint8List?, + aNullable4ByteArray: result[5] as Int32List?, + aNullable8ByteArray: result[6] as Int64List?, + aNullableFloatArray: result[7] as Float64List?, + aNullableEnum: result[8] as JniAnEnum?, + anotherNullableEnum: result[9] as JniAnotherEnum?, + aNullableString: result[10] as String?, + aNullableObject: result[11], + allNullableTypes: result[12] as JniAllNullableTypes?, + list: result[13] as List?, + stringList: (result[14] as List?)?.cast(), + intList: (result[15] as List?)?.cast(), + doubleList: (result[16] as List?)?.cast(), + boolList: (result[17] as List?)?.cast(), + enumList: (result[18] as List?)?.cast(), + objectList: (result[19] as List?)?.cast(), + listList: (result[20] as List?)?.cast?>(), + mapList: (result[21] as List?)?.cast?>(), + recursiveClassList: + (result[22] as List?)?.cast(), + map: result[23] as Map?, + stringMap: + (result[24] as Map?)?.cast(), + intMap: (result[25] as Map?)?.cast(), + enumMap: (result[26] as Map?) + ?.cast(), + objectMap: + (result[27] as Map?)?.cast(), + listMap: + (result[28] as Map?)?.cast?>(), + mapMap: (result[29] as Map?) + ?.cast?>(), + recursiveClassMap: (result[30] as Map?) + ?.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! JniAllNullableTypes || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return aNullableBool == other.aNullableBool && + aNullableInt == other.aNullableInt && + aNullableInt64 == other.aNullableInt64 && + aNullableDouble == other.aNullableDouble && + _deepEquals(aNullableByteArray, other.aNullableByteArray) && + _deepEquals(aNullable4ByteArray, other.aNullable4ByteArray) && + _deepEquals(aNullable8ByteArray, other.aNullable8ByteArray) && + _deepEquals(aNullableFloatArray, other.aNullableFloatArray) && + aNullableEnum == other.aNullableEnum && + anotherNullableEnum == other.anotherNullableEnum && + aNullableString == other.aNullableString && + aNullableObject == other.aNullableObject && + allNullableTypes == other.allNullableTypes && + _deepEquals(list, other.list) && + _deepEquals(stringList, other.stringList) && + _deepEquals(intList, other.intList) && + _deepEquals(doubleList, other.doubleList) && + _deepEquals(boolList, other.boolList) && + _deepEquals(enumList, other.enumList) && + _deepEquals(objectList, other.objectList) && + _deepEquals(listList, other.listList) && + _deepEquals(mapList, other.mapList) && + _deepEquals(recursiveClassList, other.recursiveClassList) && + _deepEquals(map, other.map) && + _deepEquals(stringMap, other.stringMap) && + _deepEquals(intMap, other.intMap) && + _deepEquals(enumMap, other.enumMap) && + _deepEquals(objectMap, other.objectMap) && + _deepEquals(listMap, other.listMap) && + _deepEquals(mapMap, other.mapMap) && + _deepEquals(recursiveClassMap, other.recursiveClassMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [JniAllNullableTypes] class is being used to +/// test Swift classes. +class JniAllNullableTypesWithoutRecursion { + JniAllNullableTypesWithoutRecursion({ + this.aNullableBool, + this.aNullableInt, + this.aNullableInt64, + this.aNullableDouble, + this.aNullableByteArray, + this.aNullable4ByteArray, + this.aNullable8ByteArray, + this.aNullableFloatArray, + this.aNullableEnum, + this.anotherNullableEnum, + this.aNullableString, + this.aNullableObject, + this.list, + this.stringList, + this.intList, + this.doubleList, + this.boolList, + this.enumList, + this.objectList, + this.listList, + this.mapList, + this.map, + this.stringMap, + this.intMap, + this.enumMap, + this.objectMap, + this.listMap, + this.mapMap, + }); + + bool? aNullableBool; + + int? aNullableInt; + + int? aNullableInt64; + + double? aNullableDouble; + + Uint8List? aNullableByteArray; + + Int32List? aNullable4ByteArray; + + Int64List? aNullable8ByteArray; + + Float64List? aNullableFloatArray; + + JniAnEnum? aNullableEnum; + + JniAnotherEnum? anotherNullableEnum; + + String? aNullableString; + + Object? aNullableObject; + + List? list; + + List? stringList; + + List? intList; + + List? doubleList; + + List? boolList; + + List? enumList; + + List? objectList; + + List?>? listList; + + List?>? mapList; + + Map? map; + + Map? stringMap; + + Map? intMap; + + Map? enumMap; + + Map? objectMap; + + Map?>? listMap; + + Map?>? mapMap; + + List _toList() { + return [ + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ]; + } + + bridge.JniAllNullableTypesWithoutRecursion toJni() { + return bridge.JniAllNullableTypesWithoutRecursion( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableInt64), + _PigeonJniCodec.writeValue(aNullableDouble), + _PigeonJniCodec.writeValue(aNullableByteArray), + _PigeonJniCodec.writeValue(aNullable4ByteArray), + _PigeonJniCodec.writeValue(aNullable8ByteArray), + _PigeonJniCodec.writeValue(aNullableFloatArray), + aNullableEnum == null ? null : aNullableEnum!.toJni(), + anotherNullableEnum == null ? null : anotherNullableEnum!.toJni(), + _PigeonJniCodec.writeValue(aNullableString), + _PigeonJniCodec.writeValue(aNullableObject), + _PigeonJniCodec.writeValue?>(list), + _PigeonJniCodec.writeValue?>(stringList), + _PigeonJniCodec.writeValue?>(intList), + _PigeonJniCodec.writeValue?>(doubleList), + _PigeonJniCodec.writeValue?>(boolList), + _PigeonJniCodec.writeValue?>(enumList), + _PigeonJniCodec.writeValue?>(objectList), + _PigeonJniCodec.writeValue?>?>(listList), + _PigeonJniCodec.writeValue?>?>(mapList), + _PigeonJniCodec.writeValue?>(map), + _PigeonJniCodec.writeValue?>(stringMap), + _PigeonJniCodec.writeValue?>(intMap), + _PigeonJniCodec.writeValue?>( + enumMap), + _PigeonJniCodec.writeValue?>(objectMap), + _PigeonJniCodec.writeValue?>?>(listMap), + _PigeonJniCodec.writeValue?>?>( + mapMap), + ); + } + + Object encode() { + return _toList(); + } + + static JniAllNullableTypesWithoutRecursion? fromJni( + bridge.JniAllNullableTypesWithoutRecursion? jniClass) { + return jniClass == null + ? null + : JniAllNullableTypesWithoutRecursion( + aNullableBool: jniClass + .getANullableBool() + ?.booleanValue(releaseOriginal: true), + aNullableInt: + jniClass.getANullableInt()?.longValue(releaseOriginal: true), + aNullableInt64: + jniClass.getANullableInt64()?.longValue(releaseOriginal: true), + aNullableDouble: jniClass + .getANullableDouble() + ?.doubleValue(releaseOriginal: true), + aNullableByteArray: + (_PigeonJniCodec.readValue(jniClass.getANullableByteArray()) + as Uint8List?), + aNullable4ByteArray: + (_PigeonJniCodec.readValue(jniClass.getANullable4ByteArray()) + as Int32List?), + aNullable8ByteArray: + (_PigeonJniCodec.readValue(jniClass.getANullable8ByteArray()) + as Int64List?), + aNullableFloatArray: + (_PigeonJniCodec.readValue(jniClass.getANullableFloatArray()) + as Float64List?), + aNullableEnum: JniAnEnum.fromJni(jniClass.getANullableEnum()), + anotherNullableEnum: + JniAnotherEnum.fromJni(jniClass.getAnotherNullableEnum()), + aNullableString: jniClass + .getANullableString() + ?.toDartString(releaseOriginal: true), + aNullableObject: + _PigeonJniCodec.readValue(jniClass.getANullableObject()), + list: (_PigeonJniCodec.readValue(jniClass.getList()) + as List?) + ?.cast(), + stringList: (_PigeonJniCodec.readValue(jniClass.getStringList()) + as List?) + ?.cast(), + intList: (_PigeonJniCodec.readValue(jniClass.getIntList()) + as List?) + ?.cast(), + doubleList: (_PigeonJniCodec.readValue(jniClass.getDoubleList()) + as List?) + ?.cast(), + boolList: (_PigeonJniCodec.readValue(jniClass.getBoolList()) + as List?) + ?.cast(), + enumList: (_PigeonJniCodec.readValue(jniClass.getEnumList()) + as List?) + ?.cast(), + objectList: (_PigeonJniCodec.readValue(jniClass.getObjectList()) + as List?) + ?.cast(), + listList: (_PigeonJniCodec.readValue(jniClass.getListList()) + as List?) + ?.cast?>(), + mapList: (_PigeonJniCodec.readValue(jniClass.getMapList()) + as List?) + ?.cast?>(), + map: (_PigeonJniCodec.readValue(jniClass.getMap()) + as Map?) + ?.cast(), + stringMap: (_PigeonJniCodec.readValue(jniClass.getStringMap()) + as Map?) + ?.cast(), + intMap: (_PigeonJniCodec.readValue(jniClass.getIntMap()) + as Map?) + ?.cast(), + enumMap: (_PigeonJniCodec.readValue(jniClass.getEnumMap()) + as Map?) + ?.cast(), + objectMap: (_PigeonJniCodec.readValue(jniClass.getObjectMap()) + as Map?) + ?.cast(), + listMap: (_PigeonJniCodec.readValue(jniClass.getListMap()) + as Map?) + ?.cast?>(), + mapMap: (_PigeonJniCodec.readValue(jniClass.getMapMap()) + as Map?) + ?.cast?>(), + ); + } + + static JniAllNullableTypesWithoutRecursion decode(Object result) { + result as List; + return JniAllNullableTypesWithoutRecursion( + aNullableBool: result[0] as bool?, + aNullableInt: result[1] as int?, + aNullableInt64: result[2] as int?, + aNullableDouble: result[3] as double?, + aNullableByteArray: result[4] as Uint8List?, + aNullable4ByteArray: result[5] as Int32List?, + aNullable8ByteArray: result[6] as Int64List?, + aNullableFloatArray: result[7] as Float64List?, + aNullableEnum: result[8] as JniAnEnum?, + anotherNullableEnum: result[9] as JniAnotherEnum?, + aNullableString: result[10] as String?, + aNullableObject: result[11], + list: result[12] as List?, + stringList: (result[13] as List?)?.cast(), + intList: (result[14] as List?)?.cast(), + doubleList: (result[15] as List?)?.cast(), + boolList: (result[16] as List?)?.cast(), + enumList: (result[17] as List?)?.cast(), + objectList: (result[18] as List?)?.cast(), + listList: (result[19] as List?)?.cast?>(), + mapList: (result[20] as List?)?.cast?>(), + map: result[21] as Map?, + stringMap: + (result[22] as Map?)?.cast(), + intMap: (result[23] as Map?)?.cast(), + enumMap: (result[24] as Map?) + ?.cast(), + objectMap: + (result[25] as Map?)?.cast(), + listMap: + (result[26] as Map?)?.cast?>(), + mapMap: (result[27] as Map?) + ?.cast?>(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! JniAllNullableTypesWithoutRecursion || + other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return aNullableBool == other.aNullableBool && + aNullableInt == other.aNullableInt && + aNullableInt64 == other.aNullableInt64 && + aNullableDouble == other.aNullableDouble && + _deepEquals(aNullableByteArray, other.aNullableByteArray) && + _deepEquals(aNullable4ByteArray, other.aNullable4ByteArray) && + _deepEquals(aNullable8ByteArray, other.aNullable8ByteArray) && + _deepEquals(aNullableFloatArray, other.aNullableFloatArray) && + aNullableEnum == other.aNullableEnum && + anotherNullableEnum == other.anotherNullableEnum && + aNullableString == other.aNullableString && + aNullableObject == other.aNullableObject && + _deepEquals(list, other.list) && + _deepEquals(stringList, other.stringList) && + _deepEquals(intList, other.intList) && + _deepEquals(doubleList, other.doubleList) && + _deepEquals(boolList, other.boolList) && + _deepEquals(enumList, other.enumList) && + _deepEquals(objectList, other.objectList) && + _deepEquals(listList, other.listList) && + _deepEquals(mapList, other.mapList) && + _deepEquals(map, other.map) && + _deepEquals(stringMap, other.stringMap) && + _deepEquals(intMap, other.intMap) && + _deepEquals(enumMap, other.enumMap) && + _deepEquals(objectMap, other.objectMap) && + _deepEquals(listMap, other.listMap) && + _deepEquals(mapMap, other.mapMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `JniAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `JniAllTypes` when testing doesn't require both (ie. testing null classes). +class JniAllClassesWrapper { + JniAllClassesWrapper({ + required this.allNullableTypes, + this.allNullableTypesWithoutRecursion, + this.allTypes, + required this.classList, + this.nullableClassList, + required this.classMap, + this.nullableClassMap, + }); + + JniAllNullableTypes allNullableTypes; + + JniAllNullableTypesWithoutRecursion? allNullableTypesWithoutRecursion; + + JniAllTypes? allTypes; + + List classList; + + List? nullableClassList; + + Map classMap; + + Map? nullableClassMap; + + List _toList() { + return [ + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap, + ]; + } + + bridge.JniAllClassesWrapper toJni() { + return bridge.JniAllClassesWrapper( + allNullableTypes.toJni(), + allNullableTypesWithoutRecursion == null + ? null + : allNullableTypesWithoutRecursion!.toJni(), + allTypes == null ? null : allTypes!.toJni(), + _PigeonJniCodec.writeValue>(classList), + _PigeonJniCodec.writeValue< + JList?>( + nullableClassList), + _PigeonJniCodec.writeValue>(classMap), + _PigeonJniCodec.writeValue< + JMap?>( + nullableClassMap), + ); + } + + Object encode() { + return _toList(); + } + + static JniAllClassesWrapper? fromJni(bridge.JniAllClassesWrapper? jniClass) { + return jniClass == null + ? null + : JniAllClassesWrapper( + allNullableTypes: + JniAllNullableTypes.fromJni(jniClass.getAllNullableTypes())!, + allNullableTypesWithoutRecursion: + JniAllNullableTypesWithoutRecursion.fromJni( + jniClass.getAllNullableTypesWithoutRecursion()), + allTypes: JniAllTypes.fromJni(jniClass.getAllTypes()), + classList: (_PigeonJniCodec.readValue(jniClass.getClassList())! + as List) + .cast(), + nullableClassList: + (_PigeonJniCodec.readValue(jniClass.getNullableClassList()) + as List?) + ?.cast(), + classMap: (_PigeonJniCodec.readValue(jniClass.getClassMap())! + as Map) + .cast(), + nullableClassMap: + (_PigeonJniCodec.readValue(jniClass.getNullableClassMap()) + as Map?) + ?.cast(), + ); + } + + static JniAllClassesWrapper decode(Object result) { + result as List; + return JniAllClassesWrapper( + allNullableTypes: result[0]! as JniAllNullableTypes, + allNullableTypesWithoutRecursion: + result[1] as JniAllNullableTypesWithoutRecursion?, + allTypes: result[2] as JniAllTypes?, + classList: (result[3] as List?)!.cast(), + nullableClassList: (result[4] as List?) + ?.cast(), + classMap: + (result[5] as Map?)!.cast(), + nullableClassMap: (result[6] as Map?) + ?.cast(), + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! JniAllClassesWrapper || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return allNullableTypes == other.allNullableTypes && + allNullableTypesWithoutRecursion == + other.allNullableTypesWithoutRecursion && + allTypes == other.allTypes && + _deepEquals(classList, other.classList) && + _deepEquals(nullableClassList, other.nullableClassList) && + _deepEquals(classMap, other.classMap) && + _deepEquals(nullableClassMap, other.nullableClassMap); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + int get hashCode => Object.hashAll(_toList()); +} + +const String defaultInstanceName = + 'PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u'; + +class JniHostIntegrationCoreApi { + JniHostIntegrationCoreApi._withRegistrar( + bridge.JniHostIntegrationCoreApiRegistrar api) + : _api = api; + + /// Returns instance of JniHostIntegrationCoreApi with specified [channelName] if one has been registered. + static JniHostIntegrationCoreApi? getInstance( + {String channelName = defaultInstanceName}) { + final bridge.JniHostIntegrationCoreApiRegistrar? link = + bridge.JniHostIntegrationCoreApiRegistrar() + .getInstance(JString.fromString(channelName)); + if (link == null) { + String nameString = 'named $channelName'; + if (channelName == defaultInstanceName) { + nameString = 'with no name'; + } + final String error = 'No instance $nameString has been registered.'; + throw ArgumentError(error); + } + final JniHostIntegrationCoreApi res = + JniHostIntegrationCoreApi._withRegistrar(link); + return res; + } + + late final bridge.JniHostIntegrationCoreApiRegistrar _api; + + void noop() { + try { + return _api.noop(); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAllTypes echoAllTypes(JniAllTypes everything) { + try { + final bridge.JniAllTypes res = _api.echoAllTypes(everything.toJni()); + final JniAllTypes dartTypeRes = JniAllTypes.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Object? throwError() { + try { + final JObject? res = _api.throwError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + void throwErrorFromVoid() { + try { + return _api.throwErrorFromVoid(); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Object? throwFlutterError() { + try { + final JObject? res = _api.throwFlutterError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + int echoInt(int anInt) { + try { + return _api.echoInt(anInt); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + double echoDouble(double aDouble) { + try { + return _api.echoDouble(aDouble); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + bool echoBool(bool aBool) { + try { + return _api.echoBool(aBool); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + String echoString(String aString) { + try { + final JString res = + _api.echoString(_PigeonJniCodec.writeValue(aString)); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Uint8List echoUint8List(Uint8List aUint8List) { + try { + final JByteArray res = _api + .echoUint8List(_PigeonJniCodec.writeValue(aUint8List)); + final Uint8List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Int32List echoInt32List(Int32List aInt32List) { + try { + final JIntArray res = + _api.echoInt32List(_PigeonJniCodec.writeValue(aInt32List)); + final Int32List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int32List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Int64List echoInt64List(Int64List aInt64List) { + try { + final JLongArray res = _api + .echoInt64List(_PigeonJniCodec.writeValue(aInt64List)); + final Int64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int64List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Float64List echoFloat64List(Float64List aFloat64List) { + try { + final JDoubleArray res = _api.echoFloat64List( + _PigeonJniCodec.writeValue(aFloat64List)); + final Float64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Float64List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Object echoObject(Object anObject) { + try { + final JObject res = + _api.echoObject(_PigeonJniCodec.writeValue(anObject)); + final Object dartTypeRes = _PigeonJniCodec.readValue(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List echoList(List list) { + try { + final JList res = + _api.echoList(_PigeonJniCodec.writeValue>(list)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List echoEnumList(List enumList) { + try { + final JList res = _api.echoEnumList( + _PigeonJniCodec.writeValue>(enumList)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List echoClassList( + List classList) { + try { + final JList res = _api.echoClassList( + _PigeonJniCodec.writeValue>( + classList)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List echoNonNullEnumList(List enumList) { + try { + final JList res = _api.echoNonNullEnumList( + _PigeonJniCodec.writeValue>(enumList)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List echoNonNullClassList( + List classList) { + try { + final JList res = _api.echoNonNullClassList( + _PigeonJniCodec.writeValue>( + classList)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoMap(Map map) { + try { + final JMap res = _api + .echoMap(_PigeonJniCodec.writeValue>(map)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoStringMap(Map stringMap) { + try { + final JMap res = _api.echoStringMap( + _PigeonJniCodec.writeValue>(stringMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoIntMap(Map intMap) { + try { + final JMap res = _api + .echoIntMap(_PigeonJniCodec.writeValue>(intMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoEnumMap(Map enumMap) { + try { + final JMap res = _api.echoEnumMap( + _PigeonJniCodec.writeValue< + JMap>(enumMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoClassMap( + Map classMap) { + try { + final JMap res = _api.echoClassMap( + _PigeonJniCodec.writeValue>( + classMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoNonNullStringMap(Map stringMap) { + try { + final JMap res = _api.echoNonNullStringMap( + _PigeonJniCodec.writeValue>(stringMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoNonNullIntMap(Map intMap) { + try { + final JMap res = _api.echoNonNullIntMap( + _PigeonJniCodec.writeValue>(intMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoNonNullEnumMap( + Map enumMap) { + try { + final JMap res = + _api.echoNonNullEnumMap(_PigeonJniCodec.writeValue< + JMap>(enumMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map echoNonNullClassMap( + Map classMap) { + try { + final JMap res = + _api.echoNonNullClassMap(_PigeonJniCodec.writeValue< + JMap>(classMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAllClassesWrapper echoClassWrapper(JniAllClassesWrapper wrapper) { + try { + final bridge.JniAllClassesWrapper res = + _api.echoClassWrapper(wrapper.toJni()); + final JniAllClassesWrapper dartTypeRes = + JniAllClassesWrapper.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAnEnum echoEnum(JniAnEnum anEnum) { + try { + final bridge.JniAnEnum res = _api.echoEnum(anEnum.toJni()); + final JniAnEnum dartTypeRes = JniAnEnum.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAnotherEnum echoAnotherEnum(JniAnotherEnum anotherEnum) { + try { + final bridge.JniAnotherEnum res = + _api.echoAnotherEnum(anotherEnum.toJni()); + final JniAnotherEnum dartTypeRes = JniAnotherEnum.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + String echoNamedDefaultString({String aString = 'default'}) { + try { + final JString res = _api + .echoNamedDefaultString(_PigeonJniCodec.writeValue(aString)); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + double echoOptionalDefaultDouble([double aDouble = 3.14]) { + try { + return _api.echoOptionalDefaultDouble(aDouble); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + int echoRequiredInt({required int anInt}) { + try { + return _api.echoRequiredInt(anInt); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAllNullableTypes? echoAllNullableTypes(JniAllNullableTypes? everything) { + try { + final bridge.JniAllNullableTypes? res = _api + .echoAllNullableTypes(everything == null ? null : everything.toJni()); + final JniAllNullableTypes? dartTypeRes = JniAllNullableTypes.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? everything) { + try { + final bridge.JniAllNullableTypesWithoutRecursion? res = + _api.echoAllNullableTypesWithoutRecursion( + everything == null ? null : everything.toJni()); + final JniAllNullableTypesWithoutRecursion? dartTypeRes = + JniAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + String? extractNestedNullableString(JniAllClassesWrapper wrapper) { + try { + final JString? res = _api.extractNestedNullableString(wrapper.toJni()); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAllClassesWrapper createNestedNullableString(String? nullableString) { + try { + final bridge.JniAllClassesWrapper res = _api.createNestedNullableString( + _PigeonJniCodec.writeValue(nullableString)); + final JniAllClassesWrapper dartTypeRes = + JniAllClassesWrapper.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, int? aNullableInt, String? aNullableString) { + try { + final bridge.JniAllNullableTypes res = _api.sendMultipleNullableTypes( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString)); + final JniAllNullableTypes dartTypeRes = JniAllNullableTypes.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, int? aNullableInt, String? aNullableString) { + try { + final bridge.JniAllNullableTypesWithoutRecursion res = + _api.sendMultipleNullableTypesWithoutRecursion( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString)); + final JniAllNullableTypesWithoutRecursion dartTypeRes = + JniAllNullableTypesWithoutRecursion.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + int? echoNullableInt(int? aNullableInt) { + try { + final JLong? res = _api + .echoNullableInt(_PigeonJniCodec.writeValue(aNullableInt)); + final int? dartTypeRes = res?.longValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + double? echoNullableDouble(double? aNullableDouble) { + try { + final JDouble? res = _api.echoNullableDouble( + _PigeonJniCodec.writeValue(aNullableDouble)); + final double? dartTypeRes = res?.doubleValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + bool? echoNullableBool(bool? aNullableBool) { + try { + final JBoolean? res = _api.echoNullableBool( + _PigeonJniCodec.writeValue(aNullableBool)); + final bool? dartTypeRes = res?.booleanValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + String? echoNullableString(String? aNullableString) { + try { + final JString? res = _api.echoNullableString( + _PigeonJniCodec.writeValue(aNullableString)); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Uint8List? echoNullableUint8List(Uint8List? aNullableUint8List) { + try { + final JByteArray? res = _api.echoNullableUint8List( + _PigeonJniCodec.writeValue(aNullableUint8List)); + final Uint8List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Int32List? echoNullableInt32List(Int32List? aNullableInt32List) { + try { + final JIntArray? res = _api.echoNullableInt32List( + _PigeonJniCodec.writeValue(aNullableInt32List)); + final Int32List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int32List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Int64List? echoNullableInt64List(Int64List? aNullableInt64List) { + try { + final JLongArray? res = _api.echoNullableInt64List( + _PigeonJniCodec.writeValue(aNullableInt64List)); + final Int64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int64List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Float64List? echoNullableFloat64List(Float64List? aNullableFloat64List) { + try { + final JDoubleArray? res = _api.echoNullableFloat64List( + _PigeonJniCodec.writeValue(aNullableFloat64List)); + final Float64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Float64List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Object? echoNullableObject(Object? aNullableObject) { + try { + final JObject? res = _api.echoNullableObject( + _PigeonJniCodec.writeValue(aNullableObject)); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List? echoNullableList(List? aNullableList) { + try { + final JList? res = _api.echoNullableList( + _PigeonJniCodec.writeValue?>(aNullableList)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List? echoNullableEnumList(List? enumList) { + try { + final JList? res = _api.echoNullableEnumList( + _PigeonJniCodec.writeValue?>(enumList)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List? echoNullableClassList( + List? classList) { + try { + final JList? res = + _api.echoNullableClassList( + _PigeonJniCodec.writeValue?>( + classList)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List? echoNullableNonNullEnumList(List? enumList) { + try { + final JList? res = _api.echoNullableNonNullEnumList( + _PigeonJniCodec.writeValue?>(enumList)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + List? echoNullableNonNullClassList( + List? classList) { + try { + final JList? res = + _api.echoNullableNonNullClassList( + _PigeonJniCodec.writeValue?>( + classList)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableMap(Map? map) { + try { + final JMap? res = _api.echoNullableMap( + _PigeonJniCodec.writeValue?>(map)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableStringMap( + Map? stringMap) { + try { + final JMap? res = _api.echoNullableStringMap( + _PigeonJniCodec.writeValue?>(stringMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableIntMap(Map? intMap) { + try { + final JMap? res = _api.echoNullableIntMap( + _PigeonJniCodec.writeValue?>(intMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableEnumMap( + Map? enumMap) { + try { + final JMap? res = + _api.echoNullableEnumMap(_PigeonJniCodec.writeValue< + JMap?>(enumMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableClassMap( + Map? classMap) { + try { + final JMap? res = + _api.echoNullableClassMap(_PigeonJniCodec.writeValue< + JMap?>(classMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableNonNullStringMap( + Map? stringMap) { + try { + final JMap? res = _api.echoNullableNonNullStringMap( + _PigeonJniCodec.writeValue?>(stringMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableNonNullIntMap(Map? intMap) { + try { + final JMap? res = _api.echoNullableNonNullIntMap( + _PigeonJniCodec.writeValue?>(intMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableNonNullEnumMap( + Map? enumMap) { + try { + final JMap? res = + _api.echoNullableNonNullEnumMap(_PigeonJniCodec.writeValue< + JMap?>(enumMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Map? echoNullableNonNullClassMap( + Map? classMap) { + try { + final JMap? res = + _api.echoNullableNonNullClassMap(_PigeonJniCodec.writeValue< + JMap?>(classMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAnEnum? echoNullableEnum(JniAnEnum? anEnum) { + try { + final bridge.JniAnEnum? res = + _api.echoNullableEnum(anEnum == null ? null : anEnum.toJni()); + final JniAnEnum? dartTypeRes = JniAnEnum.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + JniAnotherEnum? echoAnotherNullableEnum(JniAnotherEnum? anotherEnum) { + try { + final bridge.JniAnotherEnum? res = _api.echoAnotherNullableEnum( + anotherEnum == null ? null : anotherEnum.toJni()); + final JniAnotherEnum? dartTypeRes = JniAnotherEnum.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + int? echoOptionalNullableInt([int? aNullableInt]) { + try { + final JLong? res = _api.echoOptionalNullableInt( + _PigeonJniCodec.writeValue(aNullableInt)); + final int? dartTypeRes = res?.longValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + String? echoNamedNullableString({String? aNullableString}) { + try { + final JString? res = _api.echoNamedNullableString( + _PigeonJniCodec.writeValue(aNullableString)); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future noopAsync() async { + try { + await _api.noopAsync(); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncInt(int anInt) async { + try { + final JLong res = await _api.echoAsyncInt(anInt); + final int dartTypeRes = res.longValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncDouble(double aDouble) async { + try { + final JDouble res = await _api.echoAsyncDouble(aDouble); + final double dartTypeRes = res.doubleValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncBool(bool aBool) async { + try { + final JBoolean res = await _api.echoAsyncBool(aBool); + final bool dartTypeRes = res.booleanValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncString(String aString) async { + try { + final JString res = await _api + .echoAsyncString(_PigeonJniCodec.writeValue(aString)); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncUint8List(Uint8List aUint8List) async { + try { + final JByteArray res = await _api.echoAsyncUint8List( + _PigeonJniCodec.writeValue(aUint8List)); + final Uint8List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Uint8List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncInt32List(Int32List aInt32List) async { + try { + final JIntArray res = await _api.echoAsyncInt32List( + _PigeonJniCodec.writeValue(aInt32List)); + final Int32List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int32List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncInt64List(Int64List aInt64List) async { + try { + final JLongArray res = await _api.echoAsyncInt64List( + _PigeonJniCodec.writeValue(aInt64List)); + final Int64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Int64List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncFloat64List(Float64List aFloat64List) async { + try { + final JDoubleArray res = await _api.echoAsyncFloat64List( + _PigeonJniCodec.writeValue(aFloat64List)); + final Float64List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Float64List); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncObject(Object anObject) async { + try { + final JObject res = await _api + .echoAsyncObject(_PigeonJniCodec.writeValue(anObject)); + final Object dartTypeRes = _PigeonJniCodec.readValue(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncList(List list) async { + try { + final JList res = await _api + .echoAsyncList(_PigeonJniCodec.writeValue>(list)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncEnumList(List enumList) async { + try { + final JList res = await _api.echoAsyncEnumList( + _PigeonJniCodec.writeValue>(enumList)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List).cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncClassList( + List classList) async { + try { + final JList res = + await _api.echoAsyncClassList( + _PigeonJniCodec.writeValue>( + classList)); + final List dartTypeRes = + (_PigeonJniCodec.readValue(res)! as List) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncMap(Map map) async { + try { + final JMap res = await _api.echoAsyncMap( + _PigeonJniCodec.writeValue>(map)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncStringMap( + Map stringMap) async { + try { + final JMap res = await _api.echoAsyncStringMap( + _PigeonJniCodec.writeValue>(stringMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncIntMap(Map intMap) async { + try { + final JMap res = await _api.echoAsyncIntMap( + _PigeonJniCodec.writeValue>(intMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncEnumMap( + Map enumMap) async { + try { + final JMap res = + await _api.echoAsyncEnumMap(_PigeonJniCodec.writeValue< + JMap>(enumMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future> echoAsyncClassMap( + Map classMap) async { + try { + final JMap res = + await _api.echoAsyncClassMap(_PigeonJniCodec.writeValue< + JMap>(classMap)); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncEnum(JniAnEnum anEnum) async { + try { + final bridge.JniAnEnum res = await _api.echoAsyncEnum(anEnum.toJni()); + final JniAnEnum dartTypeRes = JniAnEnum.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAnotherAsyncEnum( + JniAnotherEnum anotherEnum) async { + try { + final bridge.JniAnotherEnum res = + await _api.echoAnotherAsyncEnum(anotherEnum.toJni()); + final JniAnotherEnum dartTypeRes = JniAnotherEnum.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future throwAsyncError() async { + try { + final JObject? res = await _api.throwAsyncError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future throwAsyncErrorFromVoid() async { + try { + await _api.throwAsyncErrorFromVoid(); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future throwAsyncFlutterError() async { + try { + final JObject? res = await _api.throwAsyncFlutterError(); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncJniAllTypes(JniAllTypes everything) async { + try { + final bridge.JniAllTypes res = + await _api.echoAsyncJniAllTypes(everything.toJni()); + final JniAllTypes dartTypeRes = JniAllTypes.fromJni(res)!; + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableJniAllNullableTypes( + JniAllNullableTypes? everything) async { + try { + final bridge.JniAllNullableTypes? res = + await _api.echoAsyncNullableJniAllNullableTypes( + everything == null ? null : everything.toJni()); + final JniAllNullableTypes? dartTypeRes = JniAllNullableTypes.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future + echoAsyncNullableJniAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? everything) async { + try { + final bridge.JniAllNullableTypesWithoutRecursion? res = + await _api.echoAsyncNullableJniAllNullableTypesWithoutRecursion( + everything == null ? null : everything.toJni()); + final JniAllNullableTypesWithoutRecursion? dartTypeRes = + JniAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableInt(int? anInt) async { + try { + final JLong? res = await _api + .echoAsyncNullableInt(_PigeonJniCodec.writeValue(anInt)); + final int? dartTypeRes = res?.longValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableDouble(double? aDouble) async { + try { + final JDouble? res = await _api.echoAsyncNullableDouble( + _PigeonJniCodec.writeValue(aDouble)); + final double? dartTypeRes = res?.doubleValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableBool(bool? aBool) async { + try { + final JBoolean? res = await _api + .echoAsyncNullableBool(_PigeonJniCodec.writeValue(aBool)); + final bool? dartTypeRes = res?.booleanValue(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableString(String? aString) async { + try { + final JString? res = await _api.echoAsyncNullableString( + _PigeonJniCodec.writeValue(aString)); + final String? dartTypeRes = res?.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableUint8List(Uint8List? aUint8List) async { + try { + final JByteArray? res = await _api.echoAsyncNullableUint8List( + _PigeonJniCodec.writeValue(aUint8List)); + final Uint8List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Uint8List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableInt32List(Int32List? aInt32List) async { + try { + final JIntArray? res = await _api.echoAsyncNullableInt32List( + _PigeonJniCodec.writeValue(aInt32List)); + final Int32List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int32List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableInt64List(Int64List? aInt64List) async { + try { + final JLongArray? res = await _api.echoAsyncNullableInt64List( + _PigeonJniCodec.writeValue(aInt64List)); + final Int64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Int64List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableFloat64List( + Float64List? aFloat64List) async { + try { + final JDoubleArray? res = await _api.echoAsyncNullableFloat64List( + _PigeonJniCodec.writeValue(aFloat64List)); + final Float64List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Float64List?); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableObject(Object? anObject) async { + try { + final JObject? res = await _api.echoAsyncNullableObject( + _PigeonJniCodec.writeValue(anObject)); + final Object? dartTypeRes = _PigeonJniCodec.readValue(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableList(List? list) async { + try { + final JList? res = await _api.echoAsyncNullableList( + _PigeonJniCodec.writeValue?>(list)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?)?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableEnumList( + List? enumList) async { + try { + final JList? res = + await _api.echoAsyncNullableEnumList( + _PigeonJniCodec.writeValue?>(enumList)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableClassList( + List? classList) async { + try { + final JList? res = + await _api.echoAsyncNullableClassList( + _PigeonJniCodec.writeValue?>( + classList)); + final List? dartTypeRes = + (_PigeonJniCodec.readValue(res) as List?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableMap( + Map? map) async { + try { + final JMap? res = await _api.echoAsyncNullableMap( + _PigeonJniCodec.writeValue?>(map)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableStringMap( + Map? stringMap) async { + try { + final JMap? res = + await _api.echoAsyncNullableStringMap( + _PigeonJniCodec.writeValue?>(stringMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableIntMap( + Map? intMap) async { + try { + final JMap? res = await _api.echoAsyncNullableIntMap( + _PigeonJniCodec.writeValue?>(intMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableEnumMap( + Map? enumMap) async { + try { + final JMap? res = + await _api.echoAsyncNullableEnumMap(_PigeonJniCodec.writeValue< + JMap?>(enumMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future?> echoAsyncNullableClassMap( + Map? classMap) async { + try { + final JMap? res = + await _api.echoAsyncNullableClassMap(_PigeonJniCodec.writeValue< + JMap?>(classMap)); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAsyncNullableEnum(JniAnEnum? anEnum) async { + try { + final bridge.JniAnEnum? res = await _api + .echoAsyncNullableEnum(anEnum == null ? null : anEnum.toJni()); + final JniAnEnum? dartTypeRes = JniAnEnum.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future echoAnotherAsyncNullableEnum( + JniAnotherEnum? anotherEnum) async { + try { + final bridge.JniAnotherEnum? res = + await _api.echoAnotherAsyncNullableEnum( + anotherEnum == null ? null : anotherEnum.toJni()); + final JniAnotherEnum? dartTypeRes = JniAnotherEnum.fromJni(res); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } +} + +class JniHostTrivialApi { + JniHostTrivialApi._withRegistrar(bridge.JniHostTrivialApiRegistrar api) + : _api = api; + + /// Returns instance of JniHostTrivialApi with specified [channelName] if one has been registered. + static JniHostTrivialApi? getInstance( + {String channelName = defaultInstanceName}) { + final bridge.JniHostTrivialApiRegistrar? link = + bridge.JniHostTrivialApiRegistrar() + .getInstance(JString.fromString(channelName)); + if (link == null) { + String nameString = 'named $channelName'; + if (channelName == defaultInstanceName) { + nameString = 'with no name'; + } + final String error = 'No instance $nameString has been registered.'; + throw ArgumentError(error); + } + final JniHostTrivialApi res = JniHostTrivialApi._withRegistrar(link); + return res; + } + + late final bridge.JniHostTrivialApiRegistrar _api; + + void noop() { + try { + return _api.noop(); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } +} + +class JniHostSmallApi { + JniHostSmallApi._withRegistrar(bridge.JniHostSmallApiRegistrar api) + : _api = api; + + /// Returns instance of JniHostSmallApi with specified [channelName] if one has been registered. + static JniHostSmallApi? getInstance( + {String channelName = defaultInstanceName}) { + final bridge.JniHostSmallApiRegistrar? link = + bridge.JniHostSmallApiRegistrar() + .getInstance(JString.fromString(channelName)); + if (link == null) { + String nameString = 'named $channelName'; + if (channelName == defaultInstanceName) { + nameString = 'with no name'; + } + final String error = 'No instance $nameString has been registered.'; + throw ArgumentError(error); + } + final JniHostSmallApi res = JniHostSmallApi._withRegistrar(link); + return res; + } + + late final bridge.JniHostSmallApiRegistrar _api; + + Future echo(String aString) async { + try { + final JString res = + await _api.echo(_PigeonJniCodec.writeValue(aString)); + final String dartTypeRes = res.toDartString(releaseOriginal: true); + return dartTypeRes; + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } + + Future voidVoid() async { + try { + await _api.voidVoid(); + } on JniException catch (e) { + throw PlatformException( + code: 'PlatformException', + message: e.message, + stacktrace: e.stackTrace, + ); + } + } +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/jni_tests.gen.jni.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/jni_tests.gen.jni.dart new file mode 100644 index 00000000000..33e73b17a94 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/jni_tests.gen.jni.dart @@ -0,0 +1,19610 @@ +// AUTO GENERATED BY JNIGEN 0.14.2. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: argument_type_not_assignable +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: comment_references +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: inference_failure_on_untyped_parameter +// ignore_for_file: invalid_internal_annotation +// ignore_for_file: invalid_use_of_internal_member +// ignore_for_file: library_prefixes +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_library_prefixes +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: only_throw_errors +// ignore_for_file: overridden_fields +// ignore_for_file: prefer_double_quotes +// ignore_for_file: unintended_html_in_doc_comment +// ignore_for_file: unnecessary_cast +// ignore_for_file: unnecessary_non_null_assertion +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import 'dart:core' show Object, String, bool, double, int; +import 'dart:core' as core$_; + +import 'package:jni/_internal.dart' as jni$_; +import 'package:jni/jni.dart' as jni$_; + +/// from: `JniHostIntegrationCoreApi` +class JniHostIntegrationCoreApi extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniHostIntegrationCoreApi.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniHostIntegrationCoreApi'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniHostIntegrationCoreApi$NullableType(); + static const type = $JniHostIntegrationCoreApi$Type(); + static final _id_noop = _class.instanceMethodId( + r'noop', + r'()V', + ); + + static final _noop = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public abstract void noop()` + void noop() { + _noop(reference.pointer, _id_noop as jni$_.JMethodIDPtr).check(); + } + + static final _id_echoAllTypes = _class.instanceMethodId( + r'echoAllTypes', + r'(LJniAllTypes;)LJniAllTypes;', + ); + + static final _echoAllTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAllTypes echoAllTypes(JniAllTypes jniAllTypes)` + /// The returned object must be released after use, by calling the [release] method. + JniAllTypes echoAllTypes( + JniAllTypes jniAllTypes, + ) { + final _$jniAllTypes = jniAllTypes.reference; + return _echoAllTypes(reference.pointer, + _id_echoAllTypes as jni$_.JMethodIDPtr, _$jniAllTypes.pointer) + .object(const $JniAllTypes$Type()); + } + + static final _id_throwError = _class.instanceMethodId( + r'throwError', + r'()Ljava/lang/Object;', + ); + + static final _throwError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public abstract java.lang.Object throwError()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwError() { + return _throwError(reference.pointer, _id_throwError as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_throwErrorFromVoid = _class.instanceMethodId( + r'throwErrorFromVoid', + r'()V', + ); + + static final _throwErrorFromVoid = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public abstract void throwErrorFromVoid()` + void throwErrorFromVoid() { + _throwErrorFromVoid( + reference.pointer, _id_throwErrorFromVoid as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_throwFlutterError = _class.instanceMethodId( + r'throwFlutterError', + r'()Ljava/lang/Object;', + ); + + static final _throwFlutterError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public abstract java.lang.Object throwFlutterError()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwFlutterError() { + return _throwFlutterError( + reference.pointer, _id_throwFlutterError as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_echoInt = _class.instanceMethodId( + r'echoInt', + r'(J)J', + ); + + static final _echoInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public abstract long echoInt(long j)` + int echoInt( + int j, + ) { + return _echoInt(reference.pointer, _id_echoInt as jni$_.JMethodIDPtr, j) + .long; + } + + static final _id_echoDouble = _class.instanceMethodId( + r'echoDouble', + r'(D)D', + ); + + static final _echoDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Double,)>)>>('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, double)>(); + + /// from: `public abstract double echoDouble(double d)` + double echoDouble( + double d, + ) { + return _echoDouble( + reference.pointer, _id_echoDouble as jni$_.JMethodIDPtr, d) + .doubleFloat; + } + + static final _id_echoBool = _class.instanceMethodId( + r'echoBool', + r'(Z)Z', + ); + + static final _echoBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Int32,)>)>>('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public abstract boolean echoBool(boolean z)` + bool echoBool( + bool z, + ) { + return _echoBool( + reference.pointer, _id_echoBool as jni$_.JMethodIDPtr, z ? 1 : 0) + .boolean; + } + + static final _id_echoString = _class.instanceMethodId( + r'echoString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.String echoString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoString( + jni$_.JString string, + ) { + final _$string = string.reference; + return _echoString(reference.pointer, _id_echoString as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const jni$_.JStringType()); + } + + static final _id_echoUint8List = _class.instanceMethodId( + r'echoUint8List', + r'([B)[B', + ); + + static final _echoUint8List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract byte[] echoUint8List(byte[] bs)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray echoUint8List( + jni$_.JByteArray bs, + ) { + final _$bs = bs.reference; + return _echoUint8List(reference.pointer, + _id_echoUint8List as jni$_.JMethodIDPtr, _$bs.pointer) + .object(const jni$_.JByteArrayType()); + } + + static final _id_echoInt32List = _class.instanceMethodId( + r'echoInt32List', + r'([I)[I', + ); + + static final _echoInt32List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract int[] echoInt32List(int[] is)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray echoInt32List( + jni$_.JIntArray is$, + ) { + final _$is$ = is$.reference; + return _echoInt32List(reference.pointer, + _id_echoInt32List as jni$_.JMethodIDPtr, _$is$.pointer) + .object(const jni$_.JIntArrayType()); + } + + static final _id_echoInt64List = _class.instanceMethodId( + r'echoInt64List', + r'([J)[J', + ); + + static final _echoInt64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract long[] echoInt64List(long[] js)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray echoInt64List( + jni$_.JLongArray js, + ) { + final _$js = js.reference; + return _echoInt64List(reference.pointer, + _id_echoInt64List as jni$_.JMethodIDPtr, _$js.pointer) + .object(const jni$_.JLongArrayType()); + } + + static final _id_echoFloat64List = _class.instanceMethodId( + r'echoFloat64List', + r'([D)[D', + ); + + static final _echoFloat64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract double[] echoFloat64List(double[] ds)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray echoFloat64List( + jni$_.JDoubleArray ds, + ) { + final _$ds = ds.reference; + return _echoFloat64List(reference.pointer, + _id_echoFloat64List as jni$_.JMethodIDPtr, _$ds.pointer) + .object(const jni$_.JDoubleArrayType()); + } + + static final _id_echoObject = _class.instanceMethodId( + r'echoObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoObject(java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject echoObject( + jni$_.JObject object, + ) { + final _$object = object.reference; + return _echoObject(reference.pointer, _id_echoObject as jni$_.JMethodIDPtr, + _$object.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_echoList = _class.instanceMethodId( + r'echoList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoList(reference.pointer, _id_echoList as jni$_.JMethodIDPtr, + _$list.pointer) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_echoEnumList = _class.instanceMethodId( + r'echoEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoEnumList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoEnumList(reference.pointer, + _id_echoEnumList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType($JniAnEnum$NullableType())); + } + + static final _id_echoClassList = _class.instanceMethodId( + r'echoClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoClassList(reference.pointer, + _id_echoClassList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType( + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNonNullEnumList = _class.instanceMethodId( + r'echoNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoNonNullEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullEnumList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoNonNullEnumList(reference.pointer, + _id_echoNonNullEnumList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType($JniAnEnum$Type())); + } + + static final _id_echoNonNullClassList = _class.instanceMethodId( + r'echoNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoNonNullClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoNonNullClassList(reference.pointer, + _id_echoNonNullClassList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType( + $JniAllNullableTypes$Type())); + } + + static final _id_echoMap = _class.instanceMethodId( + r'echoMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoMap( + reference.pointer, _id_echoMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_echoStringMap = _class.instanceMethodId( + r'echoStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoStringMap(reference.pointer, + _id_echoStringMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_echoIntMap = _class.instanceMethodId( + r'echoIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoIntMap(reference.pointer, _id_echoIntMap as jni$_.JMethodIDPtr, + _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_echoEnumMap = _class.instanceMethodId( + r'echoEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoEnumMap(reference.pointer, + _id_echoEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_echoClassMap = _class.instanceMethodId( + r'echoClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoClassMap(reference.pointer, + _id_echoClassMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongNullableType(), + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNonNullStringMap = _class.instanceMethodId( + r'echoNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNonNullStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullStringMap(reference.pointer, + _id_echoNonNullStringMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JStringType(), jni$_.JStringType())); + } + + static final _id_echoNonNullIntMap = _class.instanceMethodId( + r'echoNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNonNullIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullIntMap(reference.pointer, + _id_echoNonNullIntMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongType(), jni$_.JLongType())); + } + + static final _id_echoNonNullEnumMap = _class.instanceMethodId( + r'echoNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNonNullEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullEnumMap(reference.pointer, + _id_echoNonNullEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + $JniAnEnum$Type(), $JniAnEnum$Type())); + } + + static final _id_echoNonNullClassMap = _class.instanceMethodId( + r'echoNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNonNullClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullClassMap(reference.pointer, + _id_echoNonNullClassMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongType(), $JniAllNullableTypes$Type())); + } + + static final _id_echoClassWrapper = _class.instanceMethodId( + r'echoClassWrapper', + r'(LJniAllClassesWrapper;)LJniAllClassesWrapper;', + ); + + static final _echoClassWrapper = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAllClassesWrapper echoClassWrapper(JniAllClassesWrapper jniAllClassesWrapper)` + /// The returned object must be released after use, by calling the [release] method. + JniAllClassesWrapper echoClassWrapper( + JniAllClassesWrapper jniAllClassesWrapper, + ) { + final _$jniAllClassesWrapper = jniAllClassesWrapper.reference; + return _echoClassWrapper( + reference.pointer, + _id_echoClassWrapper as jni$_.JMethodIDPtr, + _$jniAllClassesWrapper.pointer) + .object(const $JniAllClassesWrapper$Type()); + } + + static final _id_echoEnum = _class.instanceMethodId( + r'echoEnum', + r'(LJniAnEnum;)LJniAnEnum;', + ); + + static final _echoEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAnEnum echoEnum(JniAnEnum jniAnEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum echoEnum( + JniAnEnum jniAnEnum, + ) { + final _$jniAnEnum = jniAnEnum.reference; + return _echoEnum(reference.pointer, _id_echoEnum as jni$_.JMethodIDPtr, + _$jniAnEnum.pointer) + .object(const $JniAnEnum$Type()); + } + + static final _id_echoAnotherEnum = _class.instanceMethodId( + r'echoAnotherEnum', + r'(LJniAnotherEnum;)LJniAnotherEnum;', + ); + + static final _echoAnotherEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAnotherEnum echoAnotherEnum(JniAnotherEnum jniAnotherEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum echoAnotherEnum( + JniAnotherEnum jniAnotherEnum, + ) { + final _$jniAnotherEnum = jniAnotherEnum.reference; + return _echoAnotherEnum(reference.pointer, + _id_echoAnotherEnum as jni$_.JMethodIDPtr, _$jniAnotherEnum.pointer) + .object(const $JniAnotherEnum$Type()); + } + + static final _id_echoNamedDefaultString = _class.instanceMethodId( + r'echoNamedDefaultString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedDefaultString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.String echoNamedDefaultString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoNamedDefaultString( + jni$_.JString string, + ) { + final _$string = string.reference; + return _echoNamedDefaultString(reference.pointer, + _id_echoNamedDefaultString as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JStringType()); + } + + static final _id_echoOptionalDefaultDouble = _class.instanceMethodId( + r'echoOptionalDefaultDouble', + r'(D)D', + ); + + static final _echoOptionalDefaultDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Double,)>)>>('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, double)>(); + + /// from: `public abstract double echoOptionalDefaultDouble(double d)` + double echoOptionalDefaultDouble( + double d, + ) { + return _echoOptionalDefaultDouble(reference.pointer, + _id_echoOptionalDefaultDouble as jni$_.JMethodIDPtr, d) + .doubleFloat; + } + + static final _id_echoRequiredInt = _class.instanceMethodId( + r'echoRequiredInt', + r'(J)J', + ); + + static final _echoRequiredInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public abstract long echoRequiredInt(long j)` + int echoRequiredInt( + int j, + ) { + return _echoRequiredInt( + reference.pointer, _id_echoRequiredInt as jni$_.JMethodIDPtr, j) + .long; + } + + static final _id_echoAllNullableTypes = _class.instanceMethodId( + r'echoAllNullableTypes', + r'(LJniAllNullableTypes;)LJniAllNullableTypes;', + ); + + static final _echoAllNullableTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAllNullableTypes echoAllNullableTypes(JniAllNullableTypes jniAllNullableTypes)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes? echoAllNullableTypes( + JniAllNullableTypes? jniAllNullableTypes, + ) { + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypes( + reference.pointer, + _id_echoAllNullableTypes as jni$_.JMethodIDPtr, + _$jniAllNullableTypes.pointer) + .object( + const $JniAllNullableTypes$NullableType()); + } + + static final _id_echoAllNullableTypesWithoutRecursion = + _class.instanceMethodId( + r'echoAllNullableTypesWithoutRecursion', + r'(LJniAllNullableTypesWithoutRecursion;)LJniAllNullableTypesWithoutRecursion;', + ); + + static final _echoAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAllNullableTypesWithoutRecursion echoAllNullableTypesWithoutRecursion(JniAllNullableTypesWithoutRecursion jniAllNullableTypesWithoutRecursion)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? jniAllNullableTypesWithoutRecursion, + ) { + final _$jniAllNullableTypesWithoutRecursion = + jniAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAllNullableTypesWithoutRecursion as jni$_.JMethodIDPtr, + _$jniAllNullableTypesWithoutRecursion.pointer) + .object( + const $JniAllNullableTypesWithoutRecursion$NullableType()); + } + + static final _id_extractNestedNullableString = _class.instanceMethodId( + r'extractNestedNullableString', + r'(LJniAllClassesWrapper;)Ljava/lang/String;', + ); + + static final _extractNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.String extractNestedNullableString(JniAllClassesWrapper jniAllClassesWrapper)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? extractNestedNullableString( + JniAllClassesWrapper jniAllClassesWrapper, + ) { + final _$jniAllClassesWrapper = jniAllClassesWrapper.reference; + return _extractNestedNullableString( + reference.pointer, + _id_extractNestedNullableString as jni$_.JMethodIDPtr, + _$jniAllClassesWrapper.pointer) + .object(const jni$_.JStringNullableType()); + } + + static final _id_createNestedNullableString = _class.instanceMethodId( + r'createNestedNullableString', + r'(Ljava/lang/String;)LJniAllClassesWrapper;', + ); + + static final _createNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAllClassesWrapper createNestedNullableString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniAllClassesWrapper createNestedNullableString( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _createNestedNullableString( + reference.pointer, + _id_createNestedNullableString as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $JniAllClassesWrapper$Type()); + } + + static final _id_sendMultipleNullableTypes = _class.instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LJniAllNullableTypes;', + ); + + static final _sendMultipleNullableTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract JniAllNullableTypes sendMultipleNullableTypes(java.lang.Boolean boolean, java.lang.Long long, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypes( + reference.pointer, + _id_sendMultipleNullableTypes as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$string.pointer) + .object(const $JniAllNullableTypes$Type()); + } + + static final _id_sendMultipleNullableTypesWithoutRecursion = + _class.instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LJniAllNullableTypesWithoutRecursion;', + ); + + static final _sendMultipleNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract JniAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion(java.lang.Boolean boolean, java.lang.Long long, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypesWithoutRecursion( + reference.pointer, + _id_sendMultipleNullableTypesWithoutRecursion as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$string.pointer) + .object( + const $JniAllNullableTypesWithoutRecursion$Type()); + } + + static final _id_echoNullableInt = _class.instanceMethodId( + r'echoNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoNullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Long echoNullableInt(java.lang.Long long)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoNullableInt( + jni$_.JLong? long, + ) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoNullableInt(reference.pointer, + _id_echoNullableInt as jni$_.JMethodIDPtr, _$long.pointer) + .object(const jni$_.JLongNullableType()); + } + + static final _id_echoNullableDouble = _class.instanceMethodId( + r'echoNullableDouble', + r'(Ljava/lang/Double;)Ljava/lang/Double;', + ); + + static final _echoNullableDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Double echoNullableDouble(java.lang.Double double)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? echoNullableDouble( + jni$_.JDouble? double, + ) { + final _$double = double?.reference ?? jni$_.jNullReference; + return _echoNullableDouble(reference.pointer, + _id_echoNullableDouble as jni$_.JMethodIDPtr, _$double.pointer) + .object(const jni$_.JDoubleNullableType()); + } + + static final _id_echoNullableBool = _class.instanceMethodId( + r'echoNullableBool', + r'(Ljava/lang/Boolean;)Ljava/lang/Boolean;', + ); + + static final _echoNullableBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Boolean echoNullableBool(java.lang.Boolean boolean)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? echoNullableBool( + jni$_.JBoolean? boolean, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + return _echoNullableBool(reference.pointer, + _id_echoNullableBool as jni$_.JMethodIDPtr, _$boolean.pointer) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_echoNullableString = _class.instanceMethodId( + r'echoNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.String echoNullableString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNullableString( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNullableString(reference.pointer, + _id_echoNullableString as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JStringNullableType()); + } + + static final _id_echoNullableUint8List = _class.instanceMethodId( + r'echoNullableUint8List', + r'([B)[B', + ); + + static final _echoNullableUint8List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract byte[] echoNullableUint8List(byte[] bs)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? echoNullableUint8List( + jni$_.JByteArray? bs, + ) { + final _$bs = bs?.reference ?? jni$_.jNullReference; + return _echoNullableUint8List(reference.pointer, + _id_echoNullableUint8List as jni$_.JMethodIDPtr, _$bs.pointer) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_echoNullableInt32List = _class.instanceMethodId( + r'echoNullableInt32List', + r'([I)[I', + ); + + static final _echoNullableInt32List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract int[] echoNullableInt32List(int[] is)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? echoNullableInt32List( + jni$_.JIntArray? is$, + ) { + final _$is$ = is$?.reference ?? jni$_.jNullReference; + return _echoNullableInt32List(reference.pointer, + _id_echoNullableInt32List as jni$_.JMethodIDPtr, _$is$.pointer) + .object(const jni$_.JIntArrayNullableType()); + } + + static final _id_echoNullableInt64List = _class.instanceMethodId( + r'echoNullableInt64List', + r'([J)[J', + ); + + static final _echoNullableInt64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract long[] echoNullableInt64List(long[] js)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? echoNullableInt64List( + jni$_.JLongArray? js, + ) { + final _$js = js?.reference ?? jni$_.jNullReference; + return _echoNullableInt64List(reference.pointer, + _id_echoNullableInt64List as jni$_.JMethodIDPtr, _$js.pointer) + .object(const jni$_.JLongArrayNullableType()); + } + + static final _id_echoNullableFloat64List = _class.instanceMethodId( + r'echoNullableFloat64List', + r'([D)[D', + ); + + static final _echoNullableFloat64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract double[] echoNullableFloat64List(double[] ds)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? echoNullableFloat64List( + jni$_.JDoubleArray? ds, + ) { + final _$ds = ds?.reference ?? jni$_.jNullReference; + return _echoNullableFloat64List(reference.pointer, + _id_echoNullableFloat64List as jni$_.JMethodIDPtr, _$ds.pointer) + .object(const jni$_.JDoubleArrayNullableType()); + } + + static final _id_echoNullableObject = _class.instanceMethodId( + r'echoNullableObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoNullableObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoNullableObject(java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? echoNullableObject( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _echoNullableObject(reference.pointer, + _id_echoNullableObject as jni$_.JMethodIDPtr, _$object.pointer) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_echoNullableList = _class.instanceMethodId( + r'echoNullableList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoNullableList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableList(reference.pointer, + _id_echoNullableList as jni$_.JMethodIDPtr, _$list.pointer) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_echoNullableEnumList = _class.instanceMethodId( + r'echoNullableEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoNullableEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableEnumList(reference.pointer, + _id_echoNullableEnumList as jni$_.JMethodIDPtr, _$list.pointer) + .object?>( + const jni$_.JListNullableType( + $JniAnEnum$NullableType())); + } + + static final _id_echoNullableClassList = _class.instanceMethodId( + r'echoNullableClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoNullableClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableClassList(reference.pointer, + _id_echoNullableClassList as jni$_.JMethodIDPtr, _$list.pointer) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNullableNonNullEnumList = _class.instanceMethodId( + r'echoNullableNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoNullableNonNullEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumList( + reference.pointer, + _id_echoNullableNonNullEnumList as jni$_.JMethodIDPtr, + _$list.pointer) + .object?>( + const jni$_.JListNullableType($JniAnEnum$Type())); + } + + static final _id_echoNullableNonNullClassList = _class.instanceMethodId( + r'echoNullableNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.List echoNullableNonNullClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassList( + reference.pointer, + _id_echoNullableNonNullClassList as jni$_.JMethodIDPtr, + _$list.pointer) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$Type())); + } + + static final _id_echoNullableMap = _class.instanceMethodId( + r'echoNullableMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableMap(reference.pointer, + _id_echoNullableMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_echoNullableStringMap = _class.instanceMethodId( + r'echoNullableStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableStringMap(reference.pointer, + _id_echoNullableStringMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_echoNullableIntMap = _class.instanceMethodId( + r'echoNullableIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableIntMap(reference.pointer, + _id_echoNullableIntMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_echoNullableEnumMap = _class.instanceMethodId( + r'echoNullableEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableEnumMap(reference.pointer, + _id_echoNullableEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_echoNullableClassMap = _class.instanceMethodId( + r'echoNullableClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableClassMap(reference.pointer, + _id_echoNullableClassMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNullableNonNullStringMap = _class.instanceMethodId( + r'echoNullableNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableNonNullStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullStringMap( + reference.pointer, + _id_echoNullableNonNullStringMap as jni$_.JMethodIDPtr, + _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringType(), jni$_.JStringType())); + } + + static final _id_echoNullableNonNullIntMap = _class.instanceMethodId( + r'echoNullableNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableNonNullIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullIntMap(reference.pointer, + _id_echoNullableNonNullIntMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongType(), jni$_.JLongType())); + } + + static final _id_echoNullableNonNullEnumMap = _class.instanceMethodId( + r'echoNullableNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableNonNullEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumMap(reference.pointer, + _id_echoNullableNonNullEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$Type(), $JniAnEnum$Type())); + } + + static final _id_echoNullableNonNullClassMap = _class.instanceMethodId( + r'echoNullableNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.util.Map echoNullableNonNullClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassMap( + reference.pointer, + _id_echoNullableNonNullClassMap as jni$_.JMethodIDPtr, + _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongType(), $JniAllNullableTypes$Type())); + } + + static final _id_echoNullableEnum = _class.instanceMethodId( + r'echoNullableEnum', + r'(LJniAnEnum;)LJniAnEnum;', + ); + + static final _echoNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAnEnum echoNullableEnum(JniAnEnum jniAnEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum? echoNullableEnum( + JniAnEnum? jniAnEnum, + ) { + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum(reference.pointer, + _id_echoNullableEnum as jni$_.JMethodIDPtr, _$jniAnEnum.pointer) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_echoAnotherNullableEnum = _class.instanceMethodId( + r'echoAnotherNullableEnum', + r'(LJniAnotherEnum;)LJniAnotherEnum;', + ); + + static final _echoAnotherNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract JniAnotherEnum echoAnotherNullableEnum(JniAnotherEnum jniAnotherEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum? echoAnotherNullableEnum( + JniAnotherEnum? jniAnotherEnum, + ) { + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum as jni$_.JMethodIDPtr, + _$jniAnotherEnum.pointer) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_echoOptionalNullableInt = _class.instanceMethodId( + r'echoOptionalNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoOptionalNullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Long echoOptionalNullableInt(java.lang.Long long)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoOptionalNullableInt( + jni$_.JLong? long, + ) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoOptionalNullableInt(reference.pointer, + _id_echoOptionalNullableInt as jni$_.JMethodIDPtr, _$long.pointer) + .object(const jni$_.JLongNullableType()); + } + + static final _id_echoNamedNullableString = _class.instanceMethodId( + r'echoNamedNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedNullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.String echoNamedNullableString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNamedNullableString( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNamedNullableString(reference.pointer, + _id_echoNamedNullableString as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JStringNullableType()); + } + + static final _id_noopAsync = _class.instanceMethodId( + r'noopAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _noopAsync = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object noopAsync(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future noopAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _noopAsync(reference.pointer, + _id_noopAsync as jni$_.JMethodIDPtr, _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt = _class.instanceMethodId( + r'echoAsyncInt', + r'(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Int64, jni$_.Pointer)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, int, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncInt(long j, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt( + int j, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncInt(reference.pointer, + _id_echoAsyncInt as jni$_.JMethodIDPtr, j, _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JLongType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncDouble = _class.instanceMethodId( + r'echoAsyncDouble', + r'(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Double, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, double, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncDouble(double d, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncDouble( + double d, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncDouble( + reference.pointer, + _id_echoAsyncDouble as jni$_.JMethodIDPtr, + d, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JDoubleType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncBool = _class.instanceMethodId( + r'echoAsyncBool', + r'(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Int32, jni$_.Pointer)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, int, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncBool(boolean z, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncBool( + bool z, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncBool( + reference.pointer, + _id_echoAsyncBool as jni$_.JMethodIDPtr, + z ? 1 : 0, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JBooleanType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncString = _class.instanceMethodId( + r'echoAsyncString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncString(java.lang.String string, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncString( + jni$_.JString string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _echoAsyncString( + reference.pointer, + _id_echoAsyncString as jni$_.JMethodIDPtr, + _$string.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JStringType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncUint8List = _class.instanceMethodId( + r'echoAsyncUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncUint8List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncUint8List(byte[] bs, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncUint8List( + jni$_.JByteArray bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs.reference; + final $r = _echoAsyncUint8List( + reference.pointer, + _id_echoAsyncUint8List as jni$_.JMethodIDPtr, + _$bs.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JByteArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt32List = _class.instanceMethodId( + r'echoAsyncInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt32List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncInt32List(int[] is, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt32List( + jni$_.JIntArray is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$.reference; + final $r = _echoAsyncInt32List( + reference.pointer, + _id_echoAsyncInt32List as jni$_.JMethodIDPtr, + _$is$.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JIntArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt64List = _class.instanceMethodId( + r'echoAsyncInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncInt64List(long[] js, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt64List( + jni$_.JLongArray js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js.reference; + final $r = _echoAsyncInt64List( + reference.pointer, + _id_echoAsyncInt64List as jni$_.JMethodIDPtr, + _$js.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JLongArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncFloat64List = _class.instanceMethodId( + r'echoAsyncFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncFloat64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncFloat64List(double[] ds, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds.reference; + final $r = _echoAsyncFloat64List( + reference.pointer, + _id_echoAsyncFloat64List as jni$_.JMethodIDPtr, + _$ds.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JDoubleArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncObject = _class.instanceMethodId( + r'echoAsyncObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncObject(java.lang.Object object, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncObject( + jni$_.JObject object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object.reference; + final $r = _echoAsyncObject( + reference.pointer, + _id_echoAsyncObject as jni$_.JMethodIDPtr, + _$object.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncList = _class.instanceMethodId( + r'echoAsyncList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncList( + reference.pointer, + _id_echoAsyncList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JListType(jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumList = _class.instanceMethodId( + r'echoAsyncEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncEnumList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncEnumList( + reference.pointer, + _id_echoAsyncEnumList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JListType($JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassList = _class.instanceMethodId( + r'echoAsyncClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncClassList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncClassList( + reference.pointer, + _id_echoAsyncClassList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JListType( + $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncMap = _class.instanceMethodId( + r'echoAsyncMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncMap( + reference.pointer, + _id_echoAsyncMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncStringMap = _class.instanceMethodId( + r'echoAsyncStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncStringMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncStringMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncStringMap( + reference.pointer, + _id_echoAsyncStringMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JStringNullableType(), jni$_.JStringNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncIntMap = _class.instanceMethodId( + r'echoAsyncIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncIntMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncIntMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncIntMap( + reference.pointer, + _id_echoAsyncIntMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JLongNullableType(), jni$_.JLongNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumMap = _class.instanceMethodId( + r'echoAsyncEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncEnumMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncEnumMap( + reference.pointer, + _id_echoAsyncEnumMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassMap = _class.instanceMethodId( + r'echoAsyncClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncClassMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + echoAsyncClassMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncClassMap( + reference.pointer, + _id_echoAsyncClassMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JLongNullableType(), $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnum = _class.instanceMethodId( + r'echoAsyncEnum', + r'(LJniAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncEnum(JniAnEnum jniAnEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum( + JniAnEnum jniAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnEnum = jniAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum as jni$_.JMethodIDPtr, + _$jniAnEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const $JniAnEnum$Type(), + releaseOriginal: true, + ); + } + + static final _id_echoAnotherAsyncEnum = _class.instanceMethodId( + r'echoAnotherAsyncEnum', + r'(LJniAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAnotherAsyncEnum(JniAnotherEnum jniAnotherEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + JniAnotherEnum jniAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnotherEnum = jniAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum as jni$_.JMethodIDPtr, + _$jniAnotherEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const $JniAnotherEnum$Type(), + releaseOriginal: true, + ); + } + + static final _id_throwAsyncError = _class.instanceMethodId( + r'throwAsyncError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object throwAsyncError(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncError(reference.pointer, + _id_throwAsyncError as jni$_.JMethodIDPtr, _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JObjectNullableType(), + releaseOriginal: true, + ); + } + + static final _id_throwAsyncErrorFromVoid = _class.instanceMethodId( + r'throwAsyncErrorFromVoid', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncErrorFromVoid = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object throwAsyncErrorFromVoid(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncErrorFromVoid() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncErrorFromVoid( + reference.pointer, + _id_throwAsyncErrorFromVoid as jni$_.JMethodIDPtr, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } + + static final _id_throwAsyncFlutterError = _class.instanceMethodId( + r'throwAsyncFlutterError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncFlutterError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object throwAsyncFlutterError(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncFlutterError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncFlutterError( + reference.pointer, + _id_throwAsyncFlutterError as jni$_.JMethodIDPtr, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JObjectNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncJniAllTypes = _class.instanceMethodId( + r'echoAsyncJniAllTypes', + r'(LJniAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncJniAllTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncJniAllTypes(JniAllTypes jniAllTypes, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncJniAllTypes( + JniAllTypes jniAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAllTypes = jniAllTypes.reference; + final $r = _echoAsyncJniAllTypes( + reference.pointer, + _id_echoAsyncJniAllTypes as jni$_.JMethodIDPtr, + _$jniAllTypes.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const $JniAllTypes$Type(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableJniAllNullableTypes = + _class.instanceMethodId( + r'echoAsyncNullableJniAllNullableTypes', + r'(LJniAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableJniAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableJniAllNullableTypes(JniAllNullableTypes jniAllNullableTypes, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableJniAllNullableTypes( + JniAllNullableTypes? jniAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableJniAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableJniAllNullableTypes as jni$_.JMethodIDPtr, + _$jniAllNullableTypes.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAllNullableTypes$NullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableJniAllNullableTypesWithoutRecursion = + _class.instanceMethodId( + r'echoAsyncNullableJniAllNullableTypesWithoutRecursion', + r'(LJniAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableJniAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableJniAllNullableTypesWithoutRecursion(JniAllNullableTypesWithoutRecursion jniAllNullableTypesWithoutRecursion, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableJniAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? jniAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAllNullableTypesWithoutRecursion = + jniAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableJniAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableJniAllNullableTypesWithoutRecursion + as jni$_.JMethodIDPtr, + _$jniAllNullableTypesWithoutRecursion.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAllNullableTypesWithoutRecursion$NullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt = _class.instanceMethodId( + r'echoAsyncNullableInt', + r'(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableInt(java.lang.Long long, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt( + jni$_.JLong? long, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$long = long?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt( + reference.pointer, + _id_echoAsyncNullableInt as jni$_.JMethodIDPtr, + _$long.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JLongNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableDouble = _class.instanceMethodId( + r'echoAsyncNullableDouble', + r'(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableDouble(java.lang.Double double, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableDouble( + jni$_.JDouble? double, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$double = double?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableDouble( + reference.pointer, + _id_echoAsyncNullableDouble as jni$_.JMethodIDPtr, + _$double.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JDoubleNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableBool = _class.instanceMethodId( + r'echoAsyncNullableBool', + r'(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableBool(java.lang.Boolean boolean, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableBool( + reference.pointer, + _id_echoAsyncNullableBool as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JBooleanNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableString = _class.instanceMethodId( + r'echoAsyncNullableString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableString(java.lang.String string, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableString( + jni$_.JString? string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableString( + reference.pointer, + _id_echoAsyncNullableString as jni$_.JMethodIDPtr, + _$string.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JStringNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableUint8List = _class.instanceMethodId( + r'echoAsyncNullableUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableUint8List(byte[] bs, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableUint8List( + reference.pointer, + _id_echoAsyncNullableUint8List as jni$_.JMethodIDPtr, + _$bs.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JByteArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt32List = _class.instanceMethodId( + r'echoAsyncNullableInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableInt32List(int[] is, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt32List( + reference.pointer, + _id_echoAsyncNullableInt32List as jni$_.JMethodIDPtr, + _$is$.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JIntArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt64List = _class.instanceMethodId( + r'echoAsyncNullableInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableInt64List(long[] js, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt64List( + reference.pointer, + _id_echoAsyncNullableInt64List as jni$_.JMethodIDPtr, + _$js.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JLongArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableFloat64List = _class.instanceMethodId( + r'echoAsyncNullableFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableFloat64List(double[] ds, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableFloat64List( + reference.pointer, + _id_echoAsyncNullableFloat64List as jni$_.JMethodIDPtr, + _$ds.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JDoubleArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableObject = _class.instanceMethodId( + r'echoAsyncNullableObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableObject(java.lang.Object object, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableObject( + jni$_.JObject? object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableObject( + reference.pointer, + _id_echoAsyncNullableObject as jni$_.JMethodIDPtr, + _$object.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JObjectNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableList = _class.instanceMethodId( + r'echoAsyncNullableList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableList( + reference.pointer, + _id_echoAsyncNullableList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumList = _class.instanceMethodId( + r'echoAsyncNullableEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableEnumList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumList( + reference.pointer, + _id_echoAsyncNullableEnumList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JListNullableType($JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassList = _class.instanceMethodId( + r'echoAsyncNullableClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableClassList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassList( + reference.pointer, + _id_echoAsyncNullableClassList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableMap = _class.instanceMethodId( + r'echoAsyncNullableMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableMap( + reference.pointer, + _id_echoAsyncNullableMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableStringMap = _class.instanceMethodId( + r'echoAsyncNullableStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableStringMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableStringMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableStringMap( + reference.pointer, + _id_echoAsyncNullableStringMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableIntMap = _class.instanceMethodId( + r'echoAsyncNullableIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableIntMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableIntMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableIntMap( + reference.pointer, + _id_echoAsyncNullableIntMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumMap = _class.instanceMethodId( + r'echoAsyncNullableEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableEnumMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumMap( + reference.pointer, + _id_echoAsyncNullableEnumMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassMap = _class.instanceMethodId( + r'echoAsyncNullableClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableClassMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableClassMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassMap( + reference.pointer, + _id_echoAsyncNullableClassMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnum = _class.instanceMethodId( + r'echoAsyncNullableEnum', + r'(LJniAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAsyncNullableEnum(JniAnEnum jniAnEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum( + JniAnEnum? jniAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum as jni$_.JMethodIDPtr, + _$jniAnEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAnEnum$NullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAnotherAsyncNullableEnum = _class.instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(LJniAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echoAnotherAsyncNullableEnum(JniAnotherEnum jniAnotherEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + JniAnotherEnum? jniAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum as jni$_.JMethodIDPtr, + _$jniAnotherEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAnotherEnum$NullableType(), + releaseOriginal: true, + ); + } +} + +final class $JniHostIntegrationCoreApi$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniHostIntegrationCoreApi$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostIntegrationCoreApi;'; + + @jni$_.internal + @core$_.override + JniHostIntegrationCoreApi? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniHostIntegrationCoreApi.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniHostIntegrationCoreApi$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostIntegrationCoreApi$NullableType) && + other is $JniHostIntegrationCoreApi$NullableType; + } +} + +final class $JniHostIntegrationCoreApi$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniHostIntegrationCoreApi$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostIntegrationCoreApi;'; + + @jni$_.internal + @core$_.override + JniHostIntegrationCoreApi fromReference(jni$_.JReference reference) => + JniHostIntegrationCoreApi.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniHostIntegrationCoreApi$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniHostIntegrationCoreApi$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostIntegrationCoreApi$Type) && + other is $JniHostIntegrationCoreApi$Type; + } +} + +/// from: `JniHostIntegrationCoreApiRegistrar` +class JniHostIntegrationCoreApiRegistrar extends JniHostIntegrationCoreApi { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniHostIntegrationCoreApiRegistrar.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'JniHostIntegrationCoreApiRegistrar'); + + /// The type which includes information such as the signature of this class. + static const nullableType = + $JniHostIntegrationCoreApiRegistrar$NullableType(); + static const type = $JniHostIntegrationCoreApiRegistrar$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory JniHostIntegrationCoreApiRegistrar() { + return JniHostIntegrationCoreApiRegistrar.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); + } + + static final _id_getApi = _class.instanceMethodId( + r'getApi', + r'()LJniHostIntegrationCoreApi;', + ); + + static final _getApi = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniHostIntegrationCoreApi getApi()` + /// The returned object must be released after use, by calling the [release] method. + JniHostIntegrationCoreApi? getApi() { + return _getApi(reference.pointer, _id_getApi as jni$_.JMethodIDPtr) + .object( + const $JniHostIntegrationCoreApi$NullableType()); + } + + static final _id_setApi = _class.instanceMethodId( + r'setApi', + r'(LJniHostIntegrationCoreApi;)V', + ); + + static final _setApi = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final void setApi(JniHostIntegrationCoreApi jniHostIntegrationCoreApi)` + void setApi( + JniHostIntegrationCoreApi? jniHostIntegrationCoreApi, + ) { + final _$jniHostIntegrationCoreApi = + jniHostIntegrationCoreApi?.reference ?? jni$_.jNullReference; + _setApi(reference.pointer, _id_setApi as jni$_.JMethodIDPtr, + _$jniHostIntegrationCoreApi.pointer) + .check(); + } + + static final _id_register = _class.instanceMethodId( + r'register', + r'(LJniHostIntegrationCoreApi;Ljava/lang/String;)LJniHostIntegrationCoreApiRegistrar;', + ); + + static final _register = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public final JniHostIntegrationCoreApiRegistrar register(JniHostIntegrationCoreApi jniHostIntegrationCoreApi, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniHostIntegrationCoreApiRegistrar register( + JniHostIntegrationCoreApi jniHostIntegrationCoreApi, + jni$_.JString string, + ) { + final _$jniHostIntegrationCoreApi = jniHostIntegrationCoreApi.reference; + final _$string = string.reference; + return _register(reference.pointer, _id_register as jni$_.JMethodIDPtr, + _$jniHostIntegrationCoreApi.pointer, _$string.pointer) + .object( + const $JniHostIntegrationCoreApiRegistrar$Type()); + } + + static final _id_getInstance = _class.instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)LJniHostIntegrationCoreApiRegistrar;', + ); + + static final _getInstance = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniHostIntegrationCoreApiRegistrar getInstance(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniHostIntegrationCoreApiRegistrar? getInstance( + jni$_.JString string, + ) { + final _$string = string.reference; + return _getInstance(reference.pointer, + _id_getInstance as jni$_.JMethodIDPtr, _$string.pointer) + .object( + const $JniHostIntegrationCoreApiRegistrar$NullableType()); + } + + static final _id_noop = _class.instanceMethodId( + r'noop', + r'()V', + ); + + static final _noop = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void noop()` + void noop() { + _noop(reference.pointer, _id_noop as jni$_.JMethodIDPtr).check(); + } + + static final _id_echoAllTypes = _class.instanceMethodId( + r'echoAllTypes', + r'(LJniAllTypes;)LJniAllTypes;', + ); + + static final _echoAllTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAllTypes echoAllTypes(JniAllTypes jniAllTypes)` + /// The returned object must be released after use, by calling the [release] method. + JniAllTypes echoAllTypes( + JniAllTypes jniAllTypes, + ) { + final _$jniAllTypes = jniAllTypes.reference; + return _echoAllTypes(reference.pointer, + _id_echoAllTypes as jni$_.JMethodIDPtr, _$jniAllTypes.pointer) + .object(const $JniAllTypes$Type()); + } + + static final _id_throwError = _class.instanceMethodId( + r'throwError', + r'()Ljava/lang/Object;', + ); + + static final _throwError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.Object throwError()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwError() { + return _throwError(reference.pointer, _id_throwError as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_throwErrorFromVoid = _class.instanceMethodId( + r'throwErrorFromVoid', + r'()V', + ); + + static final _throwErrorFromVoid = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void throwErrorFromVoid()` + void throwErrorFromVoid() { + _throwErrorFromVoid( + reference.pointer, _id_throwErrorFromVoid as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_throwFlutterError = _class.instanceMethodId( + r'throwFlutterError', + r'()Ljava/lang/Object;', + ); + + static final _throwFlutterError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.Object throwFlutterError()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? throwFlutterError() { + return _throwFlutterError( + reference.pointer, _id_throwFlutterError as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_echoInt = _class.instanceMethodId( + r'echoInt', + r'(J)J', + ); + + static final _echoInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public long echoInt(long j)` + int echoInt( + int j, + ) { + return _echoInt(reference.pointer, _id_echoInt as jni$_.JMethodIDPtr, j) + .long; + } + + static final _id_echoDouble = _class.instanceMethodId( + r'echoDouble', + r'(D)D', + ); + + static final _echoDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Double,)>)>>('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, double)>(); + + /// from: `public double echoDouble(double d)` + double echoDouble( + double d, + ) { + return _echoDouble( + reference.pointer, _id_echoDouble as jni$_.JMethodIDPtr, d) + .doubleFloat; + } + + static final _id_echoBool = _class.instanceMethodId( + r'echoBool', + r'(Z)Z', + ); + + static final _echoBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Int32,)>)>>('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public boolean echoBool(boolean z)` + bool echoBool( + bool z, + ) { + return _echoBool( + reference.pointer, _id_echoBool as jni$_.JMethodIDPtr, z ? 1 : 0) + .boolean; + } + + static final _id_echoString = _class.instanceMethodId( + r'echoString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.String echoString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoString( + jni$_.JString string, + ) { + final _$string = string.reference; + return _echoString(reference.pointer, _id_echoString as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const jni$_.JStringType()); + } + + static final _id_echoUint8List = _class.instanceMethodId( + r'echoUint8List', + r'([B)[B', + ); + + static final _echoUint8List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public byte[] echoUint8List(byte[] bs)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray echoUint8List( + jni$_.JByteArray bs, + ) { + final _$bs = bs.reference; + return _echoUint8List(reference.pointer, + _id_echoUint8List as jni$_.JMethodIDPtr, _$bs.pointer) + .object(const jni$_.JByteArrayType()); + } + + static final _id_echoInt32List = _class.instanceMethodId( + r'echoInt32List', + r'([I)[I', + ); + + static final _echoInt32List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public int[] echoInt32List(int[] is)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray echoInt32List( + jni$_.JIntArray is$, + ) { + final _$is$ = is$.reference; + return _echoInt32List(reference.pointer, + _id_echoInt32List as jni$_.JMethodIDPtr, _$is$.pointer) + .object(const jni$_.JIntArrayType()); + } + + static final _id_echoInt64List = _class.instanceMethodId( + r'echoInt64List', + r'([J)[J', + ); + + static final _echoInt64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public long[] echoInt64List(long[] js)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray echoInt64List( + jni$_.JLongArray js, + ) { + final _$js = js.reference; + return _echoInt64List(reference.pointer, + _id_echoInt64List as jni$_.JMethodIDPtr, _$js.pointer) + .object(const jni$_.JLongArrayType()); + } + + static final _id_echoFloat64List = _class.instanceMethodId( + r'echoFloat64List', + r'([D)[D', + ); + + static final _echoFloat64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public double[] echoFloat64List(double[] ds)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray echoFloat64List( + jni$_.JDoubleArray ds, + ) { + final _$ds = ds.reference; + return _echoFloat64List(reference.pointer, + _id_echoFloat64List as jni$_.JMethodIDPtr, _$ds.pointer) + .object(const jni$_.JDoubleArrayType()); + } + + static final _id_echoObject = _class.instanceMethodId( + r'echoObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoObject(java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject echoObject( + jni$_.JObject object, + ) { + final _$object = object.reference; + return _echoObject(reference.pointer, _id_echoObject as jni$_.JMethodIDPtr, + _$object.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_echoList = _class.instanceMethodId( + r'echoList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoList(reference.pointer, _id_echoList as jni$_.JMethodIDPtr, + _$list.pointer) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_echoEnumList = _class.instanceMethodId( + r'echoEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoEnumList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoEnumList(reference.pointer, + _id_echoEnumList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType($JniAnEnum$NullableType())); + } + + static final _id_echoClassList = _class.instanceMethodId( + r'echoClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoClassList(reference.pointer, + _id_echoClassList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType( + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNonNullEnumList = _class.instanceMethodId( + r'echoNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoNonNullEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullEnumList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoNonNullEnumList(reference.pointer, + _id_echoNonNullEnumList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType($JniAnEnum$Type())); + } + + static final _id_echoNonNullClassList = _class.instanceMethodId( + r'echoNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNonNullClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoNonNullClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList echoNonNullClassList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _echoNonNullClassList(reference.pointer, + _id_echoNonNullClassList as jni$_.JMethodIDPtr, _$list.pointer) + .object>( + const jni$_.JListType( + $JniAllNullableTypes$Type())); + } + + static final _id_echoMap = _class.instanceMethodId( + r'echoMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoMap( + reference.pointer, _id_echoMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_echoStringMap = _class.instanceMethodId( + r'echoStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoStringMap(reference.pointer, + _id_echoStringMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_echoIntMap = _class.instanceMethodId( + r'echoIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoIntMap(reference.pointer, _id_echoIntMap as jni$_.JMethodIDPtr, + _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_echoEnumMap = _class.instanceMethodId( + r'echoEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoEnumMap(reference.pointer, + _id_echoEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_echoClassMap = _class.instanceMethodId( + r'echoClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoClassMap(reference.pointer, + _id_echoClassMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongNullableType(), + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNonNullStringMap = _class.instanceMethodId( + r'echoNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNonNullStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullStringMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullStringMap(reference.pointer, + _id_echoNonNullStringMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JStringType(), jni$_.JStringType())); + } + + static final _id_echoNonNullIntMap = _class.instanceMethodId( + r'echoNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNonNullIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullIntMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullIntMap(reference.pointer, + _id_echoNonNullIntMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongType(), jni$_.JLongType())); + } + + static final _id_echoNonNullEnumMap = _class.instanceMethodId( + r'echoNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNonNullEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullEnumMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullEnumMap(reference.pointer, + _id_echoNonNullEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + $JniAnEnum$Type(), $JniAnEnum$Type())); + } + + static final _id_echoNonNullClassMap = _class.instanceMethodId( + r'echoNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNonNullClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNonNullClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap echoNonNullClassMap( + jni$_.JMap map, + ) { + final _$map = map.reference; + return _echoNonNullClassMap(reference.pointer, + _id_echoNonNullClassMap as jni$_.JMethodIDPtr, _$map.pointer) + .object>( + const jni$_.JMapType( + jni$_.JLongType(), $JniAllNullableTypes$Type())); + } + + static final _id_echoClassWrapper = _class.instanceMethodId( + r'echoClassWrapper', + r'(LJniAllClassesWrapper;)LJniAllClassesWrapper;', + ); + + static final _echoClassWrapper = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAllClassesWrapper echoClassWrapper(JniAllClassesWrapper jniAllClassesWrapper)` + /// The returned object must be released after use, by calling the [release] method. + JniAllClassesWrapper echoClassWrapper( + JniAllClassesWrapper jniAllClassesWrapper, + ) { + final _$jniAllClassesWrapper = jniAllClassesWrapper.reference; + return _echoClassWrapper( + reference.pointer, + _id_echoClassWrapper as jni$_.JMethodIDPtr, + _$jniAllClassesWrapper.pointer) + .object(const $JniAllClassesWrapper$Type()); + } + + static final _id_echoEnum = _class.instanceMethodId( + r'echoEnum', + r'(LJniAnEnum;)LJniAnEnum;', + ); + + static final _echoEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAnEnum echoEnum(JniAnEnum jniAnEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum echoEnum( + JniAnEnum jniAnEnum, + ) { + final _$jniAnEnum = jniAnEnum.reference; + return _echoEnum(reference.pointer, _id_echoEnum as jni$_.JMethodIDPtr, + _$jniAnEnum.pointer) + .object(const $JniAnEnum$Type()); + } + + static final _id_echoAnotherEnum = _class.instanceMethodId( + r'echoAnotherEnum', + r'(LJniAnotherEnum;)LJniAnotherEnum;', + ); + + static final _echoAnotherEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAnotherEnum echoAnotherEnum(JniAnotherEnum jniAnotherEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum echoAnotherEnum( + JniAnotherEnum jniAnotherEnum, + ) { + final _$jniAnotherEnum = jniAnotherEnum.reference; + return _echoAnotherEnum(reference.pointer, + _id_echoAnotherEnum as jni$_.JMethodIDPtr, _$jniAnotherEnum.pointer) + .object(const $JniAnotherEnum$Type()); + } + + static final _id_echoNamedDefaultString = _class.instanceMethodId( + r'echoNamedDefaultString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedDefaultString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.String echoNamedDefaultString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString echoNamedDefaultString( + jni$_.JString string, + ) { + final _$string = string.reference; + return _echoNamedDefaultString(reference.pointer, + _id_echoNamedDefaultString as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JStringType()); + } + + static final _id_echoOptionalDefaultDouble = _class.instanceMethodId( + r'echoOptionalDefaultDouble', + r'(D)D', + ); + + static final _echoOptionalDefaultDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Double,)>)>>('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, double)>(); + + /// from: `public double echoOptionalDefaultDouble(double d)` + double echoOptionalDefaultDouble( + double d, + ) { + return _echoOptionalDefaultDouble(reference.pointer, + _id_echoOptionalDefaultDouble as jni$_.JMethodIDPtr, d) + .doubleFloat; + } + + static final _id_echoRequiredInt = _class.instanceMethodId( + r'echoRequiredInt', + r'(J)J', + ); + + static final _echoRequiredInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public long echoRequiredInt(long j)` + int echoRequiredInt( + int j, + ) { + return _echoRequiredInt( + reference.pointer, _id_echoRequiredInt as jni$_.JMethodIDPtr, j) + .long; + } + + static final _id_echoAllNullableTypes = _class.instanceMethodId( + r'echoAllNullableTypes', + r'(LJniAllNullableTypes;)LJniAllNullableTypes;', + ); + + static final _echoAllNullableTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAllNullableTypes echoAllNullableTypes(JniAllNullableTypes jniAllNullableTypes)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes? echoAllNullableTypes( + JniAllNullableTypes? jniAllNullableTypes, + ) { + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypes( + reference.pointer, + _id_echoAllNullableTypes as jni$_.JMethodIDPtr, + _$jniAllNullableTypes.pointer) + .object( + const $JniAllNullableTypes$NullableType()); + } + + static final _id_echoAllNullableTypesWithoutRecursion = + _class.instanceMethodId( + r'echoAllNullableTypesWithoutRecursion', + r'(LJniAllNullableTypesWithoutRecursion;)LJniAllNullableTypesWithoutRecursion;', + ); + + static final _echoAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAllNullableTypesWithoutRecursion echoAllNullableTypesWithoutRecursion(JniAllNullableTypesWithoutRecursion jniAllNullableTypesWithoutRecursion)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? jniAllNullableTypesWithoutRecursion, + ) { + final _$jniAllNullableTypesWithoutRecursion = + jniAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAllNullableTypesWithoutRecursion as jni$_.JMethodIDPtr, + _$jniAllNullableTypesWithoutRecursion.pointer) + .object( + const $JniAllNullableTypesWithoutRecursion$NullableType()); + } + + static final _id_extractNestedNullableString = _class.instanceMethodId( + r'extractNestedNullableString', + r'(LJniAllClassesWrapper;)Ljava/lang/String;', + ); + + static final _extractNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.String extractNestedNullableString(JniAllClassesWrapper jniAllClassesWrapper)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? extractNestedNullableString( + JniAllClassesWrapper jniAllClassesWrapper, + ) { + final _$jniAllClassesWrapper = jniAllClassesWrapper.reference; + return _extractNestedNullableString( + reference.pointer, + _id_extractNestedNullableString as jni$_.JMethodIDPtr, + _$jniAllClassesWrapper.pointer) + .object(const jni$_.JStringNullableType()); + } + + static final _id_createNestedNullableString = _class.instanceMethodId( + r'createNestedNullableString', + r'(Ljava/lang/String;)LJniAllClassesWrapper;', + ); + + static final _createNestedNullableString = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAllClassesWrapper createNestedNullableString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniAllClassesWrapper createNestedNullableString( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _createNestedNullableString( + reference.pointer, + _id_createNestedNullableString as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $JniAllClassesWrapper$Type()); + } + + static final _id_sendMultipleNullableTypes = _class.instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LJniAllNullableTypes;', + ); + + static final _sendMultipleNullableTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public JniAllNullableTypes sendMultipleNullableTypes(java.lang.Boolean boolean, java.lang.Long long, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypes( + reference.pointer, + _id_sendMultipleNullableTypes as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$string.pointer) + .object(const $JniAllNullableTypes$Type()); + } + + static final _id_sendMultipleNullableTypesWithoutRecursion = + _class.instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)LJniAllNullableTypesWithoutRecursion;', + ); + + static final _sendMultipleNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public JniAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion(java.lang.Boolean boolean, java.lang.Long long, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _sendMultipleNullableTypesWithoutRecursion( + reference.pointer, + _id_sendMultipleNullableTypesWithoutRecursion as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$string.pointer) + .object( + const $JniAllNullableTypesWithoutRecursion$Type()); + } + + static final _id_echoNullableInt = _class.instanceMethodId( + r'echoNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoNullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Long echoNullableInt(java.lang.Long long)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoNullableInt( + jni$_.JLong? long, + ) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoNullableInt(reference.pointer, + _id_echoNullableInt as jni$_.JMethodIDPtr, _$long.pointer) + .object(const jni$_.JLongNullableType()); + } + + static final _id_echoNullableDouble = _class.instanceMethodId( + r'echoNullableDouble', + r'(Ljava/lang/Double;)Ljava/lang/Double;', + ); + + static final _echoNullableDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Double echoNullableDouble(java.lang.Double double)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? echoNullableDouble( + jni$_.JDouble? double, + ) { + final _$double = double?.reference ?? jni$_.jNullReference; + return _echoNullableDouble(reference.pointer, + _id_echoNullableDouble as jni$_.JMethodIDPtr, _$double.pointer) + .object(const jni$_.JDoubleNullableType()); + } + + static final _id_echoNullableBool = _class.instanceMethodId( + r'echoNullableBool', + r'(Ljava/lang/Boolean;)Ljava/lang/Boolean;', + ); + + static final _echoNullableBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Boolean echoNullableBool(java.lang.Boolean boolean)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? echoNullableBool( + jni$_.JBoolean? boolean, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + return _echoNullableBool(reference.pointer, + _id_echoNullableBool as jni$_.JMethodIDPtr, _$boolean.pointer) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_echoNullableString = _class.instanceMethodId( + r'echoNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.String echoNullableString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNullableString( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNullableString(reference.pointer, + _id_echoNullableString as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JStringNullableType()); + } + + static final _id_echoNullableUint8List = _class.instanceMethodId( + r'echoNullableUint8List', + r'([B)[B', + ); + + static final _echoNullableUint8List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public byte[] echoNullableUint8List(byte[] bs)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? echoNullableUint8List( + jni$_.JByteArray? bs, + ) { + final _$bs = bs?.reference ?? jni$_.jNullReference; + return _echoNullableUint8List(reference.pointer, + _id_echoNullableUint8List as jni$_.JMethodIDPtr, _$bs.pointer) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_echoNullableInt32List = _class.instanceMethodId( + r'echoNullableInt32List', + r'([I)[I', + ); + + static final _echoNullableInt32List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public int[] echoNullableInt32List(int[] is)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? echoNullableInt32List( + jni$_.JIntArray? is$, + ) { + final _$is$ = is$?.reference ?? jni$_.jNullReference; + return _echoNullableInt32List(reference.pointer, + _id_echoNullableInt32List as jni$_.JMethodIDPtr, _$is$.pointer) + .object(const jni$_.JIntArrayNullableType()); + } + + static final _id_echoNullableInt64List = _class.instanceMethodId( + r'echoNullableInt64List', + r'([J)[J', + ); + + static final _echoNullableInt64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public long[] echoNullableInt64List(long[] js)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? echoNullableInt64List( + jni$_.JLongArray? js, + ) { + final _$js = js?.reference ?? jni$_.jNullReference; + return _echoNullableInt64List(reference.pointer, + _id_echoNullableInt64List as jni$_.JMethodIDPtr, _$js.pointer) + .object(const jni$_.JLongArrayNullableType()); + } + + static final _id_echoNullableFloat64List = _class.instanceMethodId( + r'echoNullableFloat64List', + r'([D)[D', + ); + + static final _echoNullableFloat64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public double[] echoNullableFloat64List(double[] ds)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? echoNullableFloat64List( + jni$_.JDoubleArray? ds, + ) { + final _$ds = ds?.reference ?? jni$_.jNullReference; + return _echoNullableFloat64List(reference.pointer, + _id_echoNullableFloat64List as jni$_.JMethodIDPtr, _$ds.pointer) + .object(const jni$_.JDoubleArrayNullableType()); + } + + static final _id_echoNullableObject = _class.instanceMethodId( + r'echoNullableObject', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _echoNullableObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoNullableObject(java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? echoNullableObject( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _echoNullableObject(reference.pointer, + _id_echoNullableObject as jni$_.JMethodIDPtr, _$object.pointer) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_echoNullableList = _class.instanceMethodId( + r'echoNullableList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoNullableList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableList(reference.pointer, + _id_echoNullableList as jni$_.JMethodIDPtr, _$list.pointer) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_echoNullableEnumList = _class.instanceMethodId( + r'echoNullableEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoNullableEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableEnumList(reference.pointer, + _id_echoNullableEnumList as jni$_.JMethodIDPtr, _$list.pointer) + .object?>( + const jni$_.JListNullableType( + $JniAnEnum$NullableType())); + } + + static final _id_echoNullableClassList = _class.instanceMethodId( + r'echoNullableClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoNullableClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableClassList(reference.pointer, + _id_echoNullableClassList as jni$_.JMethodIDPtr, _$list.pointer) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNullableNonNullEnumList = _class.instanceMethodId( + r'echoNullableNonNullEnumList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullEnumList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoNullableNonNullEnumList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullEnumList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumList( + reference.pointer, + _id_echoNullableNonNullEnumList as jni$_.JMethodIDPtr, + _$list.pointer) + .object?>( + const jni$_.JListNullableType($JniAnEnum$Type())); + } + + static final _id_echoNullableNonNullClassList = _class.instanceMethodId( + r'echoNullableNonNullClassList', + r'(Ljava/util/List;)Ljava/util/List;', + ); + + static final _echoNullableNonNullClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.List echoNullableNonNullClassList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? echoNullableNonNullClassList( + jni$_.JList? list, + ) { + final _$list = list?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassList( + reference.pointer, + _id_echoNullableNonNullClassList as jni$_.JMethodIDPtr, + _$list.pointer) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$Type())); + } + + static final _id_echoNullableMap = _class.instanceMethodId( + r'echoNullableMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableMap(reference.pointer, + _id_echoNullableMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_echoNullableStringMap = _class.instanceMethodId( + r'echoNullableStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableStringMap(reference.pointer, + _id_echoNullableStringMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_echoNullableIntMap = _class.instanceMethodId( + r'echoNullableIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableIntMap(reference.pointer, + _id_echoNullableIntMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_echoNullableEnumMap = _class.instanceMethodId( + r'echoNullableEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableEnumMap(reference.pointer, + _id_echoNullableEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_echoNullableClassMap = _class.instanceMethodId( + r'echoNullableClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableClassMap(reference.pointer, + _id_echoNullableClassMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), + $JniAllNullableTypes$NullableType())); + } + + static final _id_echoNullableNonNullStringMap = _class.instanceMethodId( + r'echoNullableNonNullStringMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableNonNullStringMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullStringMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullStringMap( + reference.pointer, + _id_echoNullableNonNullStringMap as jni$_.JMethodIDPtr, + _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringType(), jni$_.JStringType())); + } + + static final _id_echoNullableNonNullIntMap = _class.instanceMethodId( + r'echoNullableNonNullIntMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableNonNullIntMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullIntMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullIntMap(reference.pointer, + _id_echoNullableNonNullIntMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongType(), jni$_.JLongType())); + } + + static final _id_echoNullableNonNullEnumMap = _class.instanceMethodId( + r'echoNullableNonNullEnumMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullEnumMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableNonNullEnumMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullEnumMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullEnumMap(reference.pointer, + _id_echoNullableNonNullEnumMap as jni$_.JMethodIDPtr, _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$Type(), $JniAnEnum$Type())); + } + + static final _id_echoNullableNonNullClassMap = _class.instanceMethodId( + r'echoNullableNonNullClassMap', + r'(Ljava/util/Map;)Ljava/util/Map;', + ); + + static final _echoNullableNonNullClassMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.util.Map echoNullableNonNullClassMap(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? echoNullableNonNullClassMap( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + return _echoNullableNonNullClassMap( + reference.pointer, + _id_echoNullableNonNullClassMap as jni$_.JMethodIDPtr, + _$map.pointer) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongType(), $JniAllNullableTypes$Type())); + } + + static final _id_echoNullableEnum = _class.instanceMethodId( + r'echoNullableEnum', + r'(LJniAnEnum;)LJniAnEnum;', + ); + + static final _echoNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAnEnum echoNullableEnum(JniAnEnum jniAnEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum? echoNullableEnum( + JniAnEnum? jniAnEnum, + ) { + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum(reference.pointer, + _id_echoNullableEnum as jni$_.JMethodIDPtr, _$jniAnEnum.pointer) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_echoAnotherNullableEnum = _class.instanceMethodId( + r'echoAnotherNullableEnum', + r'(LJniAnotherEnum;)LJniAnotherEnum;', + ); + + static final _echoAnotherNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public JniAnotherEnum echoAnotherNullableEnum(JniAnotherEnum jniAnotherEnum)` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum? echoAnotherNullableEnum( + JniAnotherEnum? jniAnotherEnum, + ) { + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum as jni$_.JMethodIDPtr, + _$jniAnotherEnum.pointer) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_echoOptionalNullableInt = _class.instanceMethodId( + r'echoOptionalNullableInt', + r'(Ljava/lang/Long;)Ljava/lang/Long;', + ); + + static final _echoOptionalNullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Long echoOptionalNullableInt(java.lang.Long long)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? echoOptionalNullableInt( + jni$_.JLong? long, + ) { + final _$long = long?.reference ?? jni$_.jNullReference; + return _echoOptionalNullableInt(reference.pointer, + _id_echoOptionalNullableInt as jni$_.JMethodIDPtr, _$long.pointer) + .object(const jni$_.JLongNullableType()); + } + + static final _id_echoNamedNullableString = _class.instanceMethodId( + r'echoNamedNullableString', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _echoNamedNullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.String echoNamedNullableString(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? echoNamedNullableString( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _echoNamedNullableString(reference.pointer, + _id_echoNamedNullableString as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JStringNullableType()); + } + + static final _id_noopAsync = _class.instanceMethodId( + r'noopAsync', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _noopAsync = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object noopAsync(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future noopAsync() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _noopAsync(reference.pointer, + _id_noopAsync as jni$_.JMethodIDPtr, _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt = _class.instanceMethodId( + r'echoAsyncInt', + r'(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Int64, jni$_.Pointer)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, int, jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncInt(long j, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt( + int j, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncInt(reference.pointer, + _id_echoAsyncInt as jni$_.JMethodIDPtr, j, _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JLongType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncDouble = _class.instanceMethodId( + r'echoAsyncDouble', + r'(DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Double, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, double, jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncDouble(double d, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncDouble( + double d, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncDouble( + reference.pointer, + _id_echoAsyncDouble as jni$_.JMethodIDPtr, + d, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JDoubleType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncBool = _class.instanceMethodId( + r'echoAsyncBool', + r'(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Int32, jni$_.Pointer)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, int, jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncBool(boolean z, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncBool( + bool z, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _echoAsyncBool( + reference.pointer, + _id_echoAsyncBool as jni$_.JMethodIDPtr, + z ? 1 : 0, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JBooleanType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncString = _class.instanceMethodId( + r'echoAsyncString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncString(java.lang.String string, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncString( + jni$_.JString string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _echoAsyncString( + reference.pointer, + _id_echoAsyncString as jni$_.JMethodIDPtr, + _$string.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JStringType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncUint8List = _class.instanceMethodId( + r'echoAsyncUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncUint8List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncUint8List(byte[] bs, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncUint8List( + jni$_.JByteArray bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs.reference; + final $r = _echoAsyncUint8List( + reference.pointer, + _id_echoAsyncUint8List as jni$_.JMethodIDPtr, + _$bs.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JByteArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt32List = _class.instanceMethodId( + r'echoAsyncInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt32List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncInt32List(int[] is, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt32List( + jni$_.JIntArray is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$.reference; + final $r = _echoAsyncInt32List( + reference.pointer, + _id_echoAsyncInt32List as jni$_.JMethodIDPtr, + _$is$.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JIntArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncInt64List = _class.instanceMethodId( + r'echoAsyncInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncInt64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncInt64List(long[] js, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncInt64List( + jni$_.JLongArray js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js.reference; + final $r = _echoAsyncInt64List( + reference.pointer, + _id_echoAsyncInt64List as jni$_.JMethodIDPtr, + _$js.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JLongArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncFloat64List = _class.instanceMethodId( + r'echoAsyncFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncFloat64List = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncFloat64List(double[] ds, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncFloat64List( + jni$_.JDoubleArray ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds.reference; + final $r = _echoAsyncFloat64List( + reference.pointer, + _id_echoAsyncFloat64List as jni$_.JMethodIDPtr, + _$ds.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JDoubleArrayType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncObject = _class.instanceMethodId( + r'echoAsyncObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncObject(java.lang.Object object, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncObject( + jni$_.JObject object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object.reference; + final $r = _echoAsyncObject( + reference.pointer, + _id_echoAsyncObject as jni$_.JMethodIDPtr, + _$object.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncList = _class.instanceMethodId( + r'echoAsyncList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncList( + reference.pointer, + _id_echoAsyncList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JListType(jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumList = _class.instanceMethodId( + r'echoAsyncEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncEnumList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncEnumList( + reference.pointer, + _id_echoAsyncEnumList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JListType($JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassList = _class.instanceMethodId( + r'echoAsyncClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncClassList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncClassList( + jni$_.JList list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list.reference; + final $r = _echoAsyncClassList( + reference.pointer, + _id_echoAsyncClassList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JListType( + $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncMap = _class.instanceMethodId( + r'echoAsyncMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncMap( + reference.pointer, + _id_echoAsyncMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncStringMap = _class.instanceMethodId( + r'echoAsyncStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncStringMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncStringMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncStringMap( + reference.pointer, + _id_echoAsyncStringMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JStringNullableType(), jni$_.JStringNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncIntMap = _class.instanceMethodId( + r'echoAsyncIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncIntMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncIntMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncIntMap( + reference.pointer, + _id_echoAsyncIntMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JLongNullableType(), jni$_.JLongNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnumMap = _class.instanceMethodId( + r'echoAsyncEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncEnumMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> echoAsyncEnumMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncEnumMap( + reference.pointer, + _id_echoAsyncEnumMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncClassMap = _class.instanceMethodId( + r'echoAsyncClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncClassMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future> + echoAsyncClassMap( + jni$_.JMap map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map.reference; + final $r = _echoAsyncClassMap( + reference.pointer, + _id_echoAsyncClassMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as>( + const jni$_.JMapType( + jni$_.JLongNullableType(), $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncEnum = _class.instanceMethodId( + r'echoAsyncEnum', + r'(LJniAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncEnum(JniAnEnum jniAnEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum( + JniAnEnum jniAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnEnum = jniAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum as jni$_.JMethodIDPtr, + _$jniAnEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const $JniAnEnum$Type(), + releaseOriginal: true, + ); + } + + static final _id_echoAnotherAsyncEnum = _class.instanceMethodId( + r'echoAnotherAsyncEnum', + r'(LJniAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAnotherAsyncEnum(JniAnotherEnum jniAnotherEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + JniAnotherEnum jniAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnotherEnum = jniAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum as jni$_.JMethodIDPtr, + _$jniAnotherEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const $JniAnotherEnum$Type(), + releaseOriginal: true, + ); + } + + static final _id_throwAsyncError = _class.instanceMethodId( + r'throwAsyncError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object throwAsyncError(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncError(reference.pointer, + _id_throwAsyncError as jni$_.JMethodIDPtr, _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JObjectNullableType(), + releaseOriginal: true, + ); + } + + static final _id_throwAsyncErrorFromVoid = _class.instanceMethodId( + r'throwAsyncErrorFromVoid', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncErrorFromVoid = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object throwAsyncErrorFromVoid(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncErrorFromVoid() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncErrorFromVoid( + reference.pointer, + _id_throwAsyncErrorFromVoid as jni$_.JMethodIDPtr, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } + + static final _id_throwAsyncFlutterError = _class.instanceMethodId( + r'throwAsyncFlutterError', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _throwAsyncFlutterError = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object throwAsyncFlutterError(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future throwAsyncFlutterError() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _throwAsyncFlutterError( + reference.pointer, + _id_throwAsyncFlutterError as jni$_.JMethodIDPtr, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JObjectNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncJniAllTypes = _class.instanceMethodId( + r'echoAsyncJniAllTypes', + r'(LJniAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncJniAllTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncJniAllTypes(JniAllTypes jniAllTypes, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncJniAllTypes( + JniAllTypes jniAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAllTypes = jniAllTypes.reference; + final $r = _echoAsyncJniAllTypes( + reference.pointer, + _id_echoAsyncJniAllTypes as jni$_.JMethodIDPtr, + _$jniAllTypes.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const $JniAllTypes$Type(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableJniAllNullableTypes = + _class.instanceMethodId( + r'echoAsyncNullableJniAllNullableTypes', + r'(LJniAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableJniAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableJniAllNullableTypes(JniAllNullableTypes jniAllNullableTypes, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableJniAllNullableTypes( + JniAllNullableTypes? jniAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableJniAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableJniAllNullableTypes as jni$_.JMethodIDPtr, + _$jniAllNullableTypes.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAllNullableTypes$NullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableJniAllNullableTypesWithoutRecursion = + _class.instanceMethodId( + r'echoAsyncNullableJniAllNullableTypesWithoutRecursion', + r'(LJniAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableJniAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableJniAllNullableTypesWithoutRecursion(JniAllNullableTypesWithoutRecursion jniAllNullableTypesWithoutRecursion, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableJniAllNullableTypesWithoutRecursion( + JniAllNullableTypesWithoutRecursion? jniAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAllNullableTypesWithoutRecursion = + jniAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableJniAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableJniAllNullableTypesWithoutRecursion + as jni$_.JMethodIDPtr, + _$jniAllNullableTypesWithoutRecursion.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAllNullableTypesWithoutRecursion$NullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt = _class.instanceMethodId( + r'echoAsyncNullableInt', + r'(Ljava/lang/Long;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableInt(java.lang.Long long, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt( + jni$_.JLong? long, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$long = long?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt( + reference.pointer, + _id_echoAsyncNullableInt as jni$_.JMethodIDPtr, + _$long.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JLongNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableDouble = _class.instanceMethodId( + r'echoAsyncNullableDouble', + r'(Ljava/lang/Double;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableDouble(java.lang.Double double, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableDouble( + jni$_.JDouble? double, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$double = double?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableDouble( + reference.pointer, + _id_echoAsyncNullableDouble as jni$_.JMethodIDPtr, + _$double.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JDoubleNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableBool = _class.instanceMethodId( + r'echoAsyncNullableBool', + r'(Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableBool(java.lang.Boolean boolean, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableBool( + jni$_.JBoolean? boolean, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableBool( + reference.pointer, + _id_echoAsyncNullableBool as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JBooleanNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableString = _class.instanceMethodId( + r'echoAsyncNullableString', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableString(java.lang.String string, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableString( + jni$_.JString? string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableString( + reference.pointer, + _id_echoAsyncNullableString as jni$_.JMethodIDPtr, + _$string.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JStringNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableUint8List = _class.instanceMethodId( + r'echoAsyncNullableUint8List', + r'([BLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableUint8List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableUint8List(byte[] bs, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableUint8List( + jni$_.JByteArray? bs, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$bs = bs?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableUint8List( + reference.pointer, + _id_echoAsyncNullableUint8List as jni$_.JMethodIDPtr, + _$bs.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JByteArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt32List = _class.instanceMethodId( + r'echoAsyncNullableInt32List', + r'([ILkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt32List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableInt32List(int[] is, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt32List( + jni$_.JIntArray? is$, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt32List( + reference.pointer, + _id_echoAsyncNullableInt32List as jni$_.JMethodIDPtr, + _$is$.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JIntArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt64List = _class.instanceMethodId( + r'echoAsyncNullableInt64List', + r'([JLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableInt64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableInt64List(long[] js, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableInt64List( + jni$_.JLongArray? js, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$js = js?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableInt64List( + reference.pointer, + _id_echoAsyncNullableInt64List as jni$_.JMethodIDPtr, + _$js.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JLongArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableFloat64List = _class.instanceMethodId( + r'echoAsyncNullableFloat64List', + r'([DLkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableFloat64List = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableFloat64List(double[] ds, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableFloat64List( + jni$_.JDoubleArray? ds, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$ds = ds?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableFloat64List( + reference.pointer, + _id_echoAsyncNullableFloat64List as jni$_.JMethodIDPtr, + _$ds.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JDoubleArrayNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableObject = _class.instanceMethodId( + r'echoAsyncNullableObject', + r'(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableObject(java.lang.Object object, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableObject( + jni$_.JObject? object, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$object = object?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableObject( + reference.pointer, + _id_echoAsyncNullableObject as jni$_.JMethodIDPtr, + _$object.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const jni$_.JObjectNullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableList = _class.instanceMethodId( + r'echoAsyncNullableList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableList( + reference.pointer, + _id_echoAsyncNullableList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumList = _class.instanceMethodId( + r'echoAsyncNullableEnumList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableEnumList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumList( + reference.pointer, + _id_echoAsyncNullableEnumList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JListNullableType($JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassList = _class.instanceMethodId( + r'echoAsyncNullableClassList', + r'(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassList = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableClassList(java.util.List list, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableClassList( + jni$_.JList? list, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$list = list?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassList( + reference.pointer, + _id_echoAsyncNullableClassList as jni$_.JMethodIDPtr, + _$list.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableMap = _class.instanceMethodId( + r'echoAsyncNullableMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableMap( + reference.pointer, + _id_echoAsyncNullableMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableStringMap = _class.instanceMethodId( + r'echoAsyncNullableStringMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableStringMap = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableStringMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableStringMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableStringMap( + reference.pointer, + _id_echoAsyncNullableStringMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableIntMap = _class.instanceMethodId( + r'echoAsyncNullableIntMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableIntMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableIntMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableIntMap( + reference.pointer, + _id_echoAsyncNullableIntMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnumMap = _class.instanceMethodId( + r'echoAsyncNullableEnumMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableEnumMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> echoAsyncNullableEnumMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnumMap( + reference.pointer, + _id_echoAsyncNullableEnumMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableClassMap = _class.instanceMethodId( + r'echoAsyncNullableClassMap', + r'(Ljava/util/Map;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableClassMap(java.util.Map map, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future?> + echoAsyncNullableClassMap( + jni$_.JMap? map, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$map = map?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableClassMap( + reference.pointer, + _id_echoAsyncNullableClassMap as jni$_.JMethodIDPtr, + _$map.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), $JniAllNullableTypes$NullableType()), + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableEnum = _class.instanceMethodId( + r'echoAsyncNullableEnum', + r'(LJniAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAsyncNullableEnum(JniAnEnum jniAnEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum( + JniAnEnum? jniAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum as jni$_.JMethodIDPtr, + _$jniAnEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAnEnum$NullableType(), + releaseOriginal: true, + ); + } + + static final _id_echoAnotherAsyncNullableEnum = _class.instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(LJniAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAnotherAsyncNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echoAnotherAsyncNullableEnum(JniAnotherEnum jniAnotherEnum, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + JniAnotherEnum? jniAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum as jni$_.JMethodIDPtr, + _$jniAnotherEnum.pointer, + _$continuation.pointer) + .object(const jni$_.JObjectNullableType()); + _$continuation.release(); + final jni$_.JObject? $o; + if ($r != null && $r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = $a == 0 + ? null + : jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o != null && $o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o?.as( + const $JniAnotherEnum$NullableType(), + releaseOriginal: true, + ); + } +} + +final class $JniHostIntegrationCoreApiRegistrar$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniHostIntegrationCoreApiRegistrar$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostIntegrationCoreApiRegistrar;'; + + @jni$_.internal + @core$_.override + JniHostIntegrationCoreApiRegistrar? fromReference( + jni$_.JReference reference) => + reference.isNull + ? null + : JniHostIntegrationCoreApiRegistrar.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const $JniHostIntegrationCoreApi$Type(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 2; + + @core$_.override + int get hashCode => + ($JniHostIntegrationCoreApiRegistrar$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == + ($JniHostIntegrationCoreApiRegistrar$NullableType) && + other is $JniHostIntegrationCoreApiRegistrar$NullableType; + } +} + +final class $JniHostIntegrationCoreApiRegistrar$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniHostIntegrationCoreApiRegistrar$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostIntegrationCoreApiRegistrar;'; + + @jni$_.internal + @core$_.override + JniHostIntegrationCoreApiRegistrar fromReference( + jni$_.JReference reference) => + JniHostIntegrationCoreApiRegistrar.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const $JniHostIntegrationCoreApi$Type(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniHostIntegrationCoreApiRegistrar$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 2; + + @core$_.override + int get hashCode => ($JniHostIntegrationCoreApiRegistrar$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostIntegrationCoreApiRegistrar$Type) && + other is $JniHostIntegrationCoreApiRegistrar$Type; + } +} + +/// from: `JniHostTrivialApi` +class JniHostTrivialApi extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniHostTrivialApi.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniHostTrivialApi'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniHostTrivialApi$NullableType(); + static const type = $JniHostTrivialApi$Type(); + static final _id_noop = _class.instanceMethodId( + r'noop', + r'()V', + ); + + static final _noop = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public abstract void noop()` + void noop() { + _noop(reference.pointer, _id_noop as jni$_.JMethodIDPtr).check(); + } +} + +final class $JniHostTrivialApi$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniHostTrivialApi$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostTrivialApi;'; + + @jni$_.internal + @core$_.override + JniHostTrivialApi? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniHostTrivialApi.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniHostTrivialApi$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostTrivialApi$NullableType) && + other is $JniHostTrivialApi$NullableType; + } +} + +final class $JniHostTrivialApi$Type extends jni$_.JObjType { + @jni$_.internal + const $JniHostTrivialApi$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostTrivialApi;'; + + @jni$_.internal + @core$_.override + JniHostTrivialApi fromReference(jni$_.JReference reference) => + JniHostTrivialApi.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniHostTrivialApi$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniHostTrivialApi$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostTrivialApi$Type) && + other is $JniHostTrivialApi$Type; + } +} + +/// from: `JniHostTrivialApiRegistrar` +class JniHostTrivialApiRegistrar extends JniHostTrivialApi { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniHostTrivialApiRegistrar.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniHostTrivialApiRegistrar'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniHostTrivialApiRegistrar$NullableType(); + static const type = $JniHostTrivialApiRegistrar$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory JniHostTrivialApiRegistrar() { + return JniHostTrivialApiRegistrar.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); + } + + static final _id_getApi = _class.instanceMethodId( + r'getApi', + r'()LJniHostTrivialApi;', + ); + + static final _getApi = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniHostTrivialApi getApi()` + /// The returned object must be released after use, by calling the [release] method. + JniHostTrivialApi? getApi() { + return _getApi(reference.pointer, _id_getApi as jni$_.JMethodIDPtr) + .object(const $JniHostTrivialApi$NullableType()); + } + + static final _id_setApi = _class.instanceMethodId( + r'setApi', + r'(LJniHostTrivialApi;)V', + ); + + static final _setApi = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final void setApi(JniHostTrivialApi jniHostTrivialApi)` + void setApi( + JniHostTrivialApi? jniHostTrivialApi, + ) { + final _$jniHostTrivialApi = + jniHostTrivialApi?.reference ?? jni$_.jNullReference; + _setApi(reference.pointer, _id_setApi as jni$_.JMethodIDPtr, + _$jniHostTrivialApi.pointer) + .check(); + } + + static final _id_register = _class.instanceMethodId( + r'register', + r'(LJniHostTrivialApi;Ljava/lang/String;)LJniHostTrivialApiRegistrar;', + ); + + static final _register = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public final JniHostTrivialApiRegistrar register(JniHostTrivialApi jniHostTrivialApi, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniHostTrivialApiRegistrar register( + JniHostTrivialApi jniHostTrivialApi, + jni$_.JString string, + ) { + final _$jniHostTrivialApi = jniHostTrivialApi.reference; + final _$string = string.reference; + return _register(reference.pointer, _id_register as jni$_.JMethodIDPtr, + _$jniHostTrivialApi.pointer, _$string.pointer) + .object( + const $JniHostTrivialApiRegistrar$Type()); + } + + static final _id_getInstance = _class.instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)LJniHostTrivialApiRegistrar;', + ); + + static final _getInstance = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniHostTrivialApiRegistrar getInstance(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniHostTrivialApiRegistrar? getInstance( + jni$_.JString string, + ) { + final _$string = string.reference; + return _getInstance(reference.pointer, + _id_getInstance as jni$_.JMethodIDPtr, _$string.pointer) + .object( + const $JniHostTrivialApiRegistrar$NullableType()); + } + + static final _id_noop = _class.instanceMethodId( + r'noop', + r'()V', + ); + + static final _noop = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void noop()` + void noop() { + _noop(reference.pointer, _id_noop as jni$_.JMethodIDPtr).check(); + } +} + +final class $JniHostTrivialApiRegistrar$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniHostTrivialApiRegistrar$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostTrivialApiRegistrar;'; + + @jni$_.internal + @core$_.override + JniHostTrivialApiRegistrar? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniHostTrivialApiRegistrar.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const $JniHostTrivialApi$Type(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 2; + + @core$_.override + int get hashCode => ($JniHostTrivialApiRegistrar$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostTrivialApiRegistrar$NullableType) && + other is $JniHostTrivialApiRegistrar$NullableType; + } +} + +final class $JniHostTrivialApiRegistrar$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniHostTrivialApiRegistrar$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostTrivialApiRegistrar;'; + + @jni$_.internal + @core$_.override + JniHostTrivialApiRegistrar fromReference(jni$_.JReference reference) => + JniHostTrivialApiRegistrar.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const $JniHostTrivialApi$Type(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniHostTrivialApiRegistrar$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 2; + + @core$_.override + int get hashCode => ($JniHostTrivialApiRegistrar$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostTrivialApiRegistrar$Type) && + other is $JniHostTrivialApiRegistrar$Type; + } +} + +/// from: `JniHostSmallApi` +class JniHostSmallApi extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniHostSmallApi.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniHostSmallApi'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniHostSmallApi$NullableType(); + static const type = $JniHostSmallApi$Type(); + static final _id_echo = _class.instanceMethodId( + r'echo', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echo = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object echo(java.lang.String string, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echo( + jni$_.JString string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _echo(reference.pointer, _id_echo as jni$_.JMethodIDPtr, + _$string.pointer, _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JStringType(), + releaseOriginal: true, + ); + } + + static final _id_voidVoid = _class.instanceMethodId( + r'voidVoid', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _voidVoid = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract java.lang.Object voidVoid(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future voidVoid() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _voidVoid(reference.pointer, _id_voidVoid as jni$_.JMethodIDPtr, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } +} + +final class $JniHostSmallApi$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniHostSmallApi$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostSmallApi;'; + + @jni$_.internal + @core$_.override + JniHostSmallApi? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : JniHostSmallApi.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniHostSmallApi$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostSmallApi$NullableType) && + other is $JniHostSmallApi$NullableType; + } +} + +final class $JniHostSmallApi$Type extends jni$_.JObjType { + @jni$_.internal + const $JniHostSmallApi$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostSmallApi;'; + + @jni$_.internal + @core$_.override + JniHostSmallApi fromReference(jni$_.JReference reference) => + JniHostSmallApi.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniHostSmallApi$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniHostSmallApi$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostSmallApi$Type) && + other is $JniHostSmallApi$Type; + } +} + +/// from: `JniHostSmallApiRegistrar` +class JniHostSmallApiRegistrar extends JniHostSmallApi { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniHostSmallApiRegistrar.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniHostSmallApiRegistrar'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniHostSmallApiRegistrar$NullableType(); + static const type = $JniHostSmallApiRegistrar$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory JniHostSmallApiRegistrar() { + return JniHostSmallApiRegistrar.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); + } + + static final _id_getApi = _class.instanceMethodId( + r'getApi', + r'()LJniHostSmallApi;', + ); + + static final _getApi = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniHostSmallApi getApi()` + /// The returned object must be released after use, by calling the [release] method. + JniHostSmallApi? getApi() { + return _getApi(reference.pointer, _id_getApi as jni$_.JMethodIDPtr) + .object(const $JniHostSmallApi$NullableType()); + } + + static final _id_setApi = _class.instanceMethodId( + r'setApi', + r'(LJniHostSmallApi;)V', + ); + + static final _setApi = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final void setApi(JniHostSmallApi jniHostSmallApi)` + void setApi( + JniHostSmallApi? jniHostSmallApi, + ) { + final _$jniHostSmallApi = + jniHostSmallApi?.reference ?? jni$_.jNullReference; + _setApi(reference.pointer, _id_setApi as jni$_.JMethodIDPtr, + _$jniHostSmallApi.pointer) + .check(); + } + + static final _id_register = _class.instanceMethodId( + r'register', + r'(LJniHostSmallApi;Ljava/lang/String;)LJniHostSmallApiRegistrar;', + ); + + static final _register = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public final JniHostSmallApiRegistrar register(JniHostSmallApi jniHostSmallApi, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniHostSmallApiRegistrar register( + JniHostSmallApi jniHostSmallApi, + jni$_.JString string, + ) { + final _$jniHostSmallApi = jniHostSmallApi.reference; + final _$string = string.reference; + return _register(reference.pointer, _id_register as jni$_.JMethodIDPtr, + _$jniHostSmallApi.pointer, _$string.pointer) + .object( + const $JniHostSmallApiRegistrar$Type()); + } + + static final _id_getInstance = _class.instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)LJniHostSmallApiRegistrar;', + ); + + static final _getInstance = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniHostSmallApiRegistrar getInstance(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + JniHostSmallApiRegistrar? getInstance( + jni$_.JString string, + ) { + final _$string = string.reference; + return _getInstance(reference.pointer, + _id_getInstance as jni$_.JMethodIDPtr, _$string.pointer) + .object( + const $JniHostSmallApiRegistrar$NullableType()); + } + + static final _id_echo = _class.instanceMethodId( + r'echo', + r'(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echo = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public java.lang.Object echo(java.lang.String string, kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echo( + jni$_.JString string, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$string = string.reference; + final $r = _echo(reference.pointer, _id_echo as jni$_.JMethodIDPtr, + _$string.pointer, _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JStringType(), + releaseOriginal: true, + ); + } + + static final _id_voidVoid = _class.instanceMethodId( + r'voidVoid', + r'(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _voidVoid = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object voidVoid(kotlin.coroutines.Continuation continuation)` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future voidVoid() async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + + final $r = _voidVoid(reference.pointer, _id_voidVoid as jni$_.JMethodIDPtr, + _$continuation.pointer) + .object(const jni$_.JObjectType()); + _$continuation.release(); + final jni$_.JObject $o; + if ($r.isInstanceOf(jni$_.coroutineSingletonsClass)) { + $r.release(); + final $a = await $p.first; + $o = jni$_.JObject.fromReference( + jni$_.JGlobalReference(jni$_.JObjectPtr.fromAddress($a))); + if ($o.isInstanceOf(jni$_.result$FailureClass)) { + final $e = + jni$_.failureExceptionField.get($o, const jni$_.JObjectType()); + $o.release(); + jni$_.Jni.throwException($e.reference.toPointer()); + } + } else { + $o = $r; + } + return $o.as( + const jni$_.JObjectType(), + releaseOriginal: true, + ); + } +} + +final class $JniHostSmallApiRegistrar$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniHostSmallApiRegistrar$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostSmallApiRegistrar;'; + + @jni$_.internal + @core$_.override + JniHostSmallApiRegistrar? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniHostSmallApiRegistrar.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const $JniHostSmallApi$Type(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 2; + + @core$_.override + int get hashCode => ($JniHostSmallApiRegistrar$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostSmallApiRegistrar$NullableType) && + other is $JniHostSmallApiRegistrar$NullableType; + } +} + +final class $JniHostSmallApiRegistrar$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniHostSmallApiRegistrar$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniHostSmallApiRegistrar;'; + + @jni$_.internal + @core$_.override + JniHostSmallApiRegistrar fromReference(jni$_.JReference reference) => + JniHostSmallApiRegistrar.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const $JniHostSmallApi$Type(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniHostSmallApiRegistrar$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 2; + + @core$_.override + int get hashCode => ($JniHostSmallApiRegistrar$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniHostSmallApiRegistrar$Type) && + other is $JniHostSmallApiRegistrar$Type; + } +} + +/// from: `JniUnusedClass$Companion` +class JniUnusedClass$Companion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniUnusedClass$Companion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniUnusedClass$Companion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniUnusedClass$Companion$NullableType(); + static const type = $JniUnusedClass$Companion$Type(); + static final _id_fromList = _class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LJniUnusedClass;', + ); + + static final _fromList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniUnusedClass fromList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + JniUnusedClass fromList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _fromList(reference.pointer, _id_fromList as jni$_.JMethodIDPtr, + _$list.pointer) + .object(const $JniUnusedClass$Type()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniUnusedClass$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniUnusedClass$Companion.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $JniUnusedClass$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniUnusedClass$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniUnusedClass$Companion;'; + + @jni$_.internal + @core$_.override + JniUnusedClass$Companion? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniUnusedClass$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniUnusedClass$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniUnusedClass$Companion$NullableType) && + other is $JniUnusedClass$Companion$NullableType; + } +} + +final class $JniUnusedClass$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniUnusedClass$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniUnusedClass$Companion;'; + + @jni$_.internal + @core$_.override + JniUnusedClass$Companion fromReference(jni$_.JReference reference) => + JniUnusedClass$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniUnusedClass$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniUnusedClass$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniUnusedClass$Companion$Type) && + other is $JniUnusedClass$Companion$Type; + } +} + +/// from: `JniUnusedClass` +class JniUnusedClass extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniUnusedClass.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniUnusedClass'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniUnusedClass$NullableType(); + static const type = $JniUnusedClass$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LJniUnusedClass$Companion;', + ); + + /// from: `static public final JniUnusedClass$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static JniUnusedClass$Companion get Companion => + _id_Companion.get(_class, const $JniUnusedClass$Companion$Type()); + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Object;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void (java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + factory JniUnusedClass( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return JniUnusedClass.fromReference(_new$(_class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, _$object.pointer) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + int, + jni$_.Pointer)>(); + + /// from: `synthetic public void (java.lang.Object object, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniUnusedClass.new$1( + jni$_.JObject? object, + int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniUnusedClass.fromReference(_new$1( + _class.reference.pointer, + _id_new$1 as jni$_.JMethodIDPtr, + _$object.pointer, + i, + _$defaultConstructorMarker.pointer) + .reference); + } + + static final _id_getAField = _class.instanceMethodId( + r'getAField', + r'()Ljava/lang/Object;', + ); + + static final _getAField = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object getAField()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getAField() { + return _getAField(reference.pointer, _id_getAField as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_toList = _class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List toList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList(reference.pointer, _id_toList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_component1 = _class.instanceMethodId( + r'component1', + r'()Ljava/lang/Object;', + ); + + static final _component1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object component1()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? component1() { + return _component1(reference.pointer, _id_component1 as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_copy = _class.instanceMethodId( + r'copy', + r'(Ljava/lang/Object;)LJniUnusedClass;', + ); + + static final _copy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniUnusedClass copy(java.lang.Object object)` + /// The returned object must be released after use, by calling the [release] method. + JniUnusedClass copy( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, _id_copy as jni$_.JMethodIDPtr, _$object.pointer) + .object(const $JniUnusedClass$Type()); + } + + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String toString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); + } + + static final _id_new$2 = _class.constructorId( + r'()V', + ); + + static final _new$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory JniUnusedClass.new$2() { + return JniUnusedClass.fromReference( + _new$2(_class.reference.pointer, _id_new$2 as jni$_.JMethodIDPtr) + .reference); + } +} + +final class $JniUnusedClass$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniUnusedClass$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniUnusedClass;'; + + @jni$_.internal + @core$_.override + JniUnusedClass? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : JniUnusedClass.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniUnusedClass$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniUnusedClass$NullableType) && + other is $JniUnusedClass$NullableType; + } +} + +final class $JniUnusedClass$Type extends jni$_.JObjType { + @jni$_.internal + const $JniUnusedClass$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniUnusedClass;'; + + @jni$_.internal + @core$_.override + JniUnusedClass fromReference(jni$_.JReference reference) => + JniUnusedClass.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniUnusedClass$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniUnusedClass$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniUnusedClass$Type) && + other is $JniUnusedClass$Type; + } +} + +/// from: `JniAllTypes$Companion` +class JniAllTypes$Companion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllTypes$Companion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAllTypes$Companion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAllTypes$Companion$NullableType(); + static const type = $JniAllTypes$Companion$Type(); + static final _id_fromList = _class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LJniAllTypes;', + ); + + static final _fromList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniAllTypes fromList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + JniAllTypes fromList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _fromList(reference.pointer, _id_fromList as jni$_.JMethodIDPtr, + _$list.pointer) + .object(const $JniAllTypes$Type()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllTypes$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAllTypes$Companion.fromReference(_new$(_class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $JniAllTypes$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAllTypes$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllTypes$Companion;'; + + @jni$_.internal + @core$_.override + JniAllTypes$Companion? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniAllTypes$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllTypes$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllTypes$Companion$NullableType) && + other is $JniAllTypes$Companion$NullableType; + } +} + +final class $JniAllTypes$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAllTypes$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllTypes$Companion;'; + + @jni$_.internal + @core$_.override + JniAllTypes$Companion fromReference(jni$_.JReference reference) => + JniAllTypes$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAllTypes$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllTypes$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllTypes$Companion$Type) && + other is $JniAllTypes$Companion$Type; + } +} + +/// from: `JniAllTypes` +class JniAllTypes extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllTypes.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAllTypes'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAllTypes$NullableType(); + static const type = $JniAllTypes$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LJniAllTypes$Companion;', + ); + + /// from: `static public final JniAllTypes$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static JniAllTypes$Companion get Companion => + _id_Companion.get(_class, const $JniAllTypes$Companion$Type()); + + static final _id_new$ = _class.constructorId( + r'(ZJJD[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int32, + jni$_.Int64, + jni$_.Int64, + jni$_.Double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + int, + int, + double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void (boolean z, long j, long j1, double d, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllTypes( + bool z, + int j, + int j1, + double d, + jni$_.JByteArray bs, + jni$_.JIntArray is$, + jni$_.JLongArray js, + jni$_.JDoubleArray ds, + JniAnEnum jniAnEnum, + JniAnotherEnum jniAnotherEnum, + jni$_.JString string, + jni$_.JObject object, + jni$_.JList list, + jni$_.JList list1, + jni$_.JList list2, + jni$_.JList list3, + jni$_.JList list4, + jni$_.JList list5, + jni$_.JList list6, + jni$_.JList> list7, + jni$_.JList> list8, + jni$_.JMap map, + jni$_.JMap map1, + jni$_.JMap map2, + jni$_.JMap map3, + jni$_.JMap map4, + jni$_.JMap> map5, + jni$_.JMap> map6, + ) { + final _$bs = bs.reference; + final _$is$ = is$.reference; + final _$js = js.reference; + final _$ds = ds.reference; + final _$jniAnEnum = jniAnEnum.reference; + final _$jniAnotherEnum = jniAnotherEnum.reference; + final _$string = string.reference; + final _$object = object.reference; + final _$list = list.reference; + final _$list1 = list1.reference; + final _$list2 = list2.reference; + final _$list3 = list3.reference; + final _$list4 = list4.reference; + final _$list5 = list5.reference; + final _$list6 = list6.reference; + final _$list7 = list7.reference; + final _$list8 = list8.reference; + final _$map = map.reference; + final _$map1 = map1.reference; + final _$map2 = map2.reference; + final _$map3 = map3.reference; + final _$map4 = map4.reference; + final _$map5 = map5.reference; + final _$map6 = map6.reference; + return JniAllTypes.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + z ? 1 : 0, + j, + j1, + d, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer) + .reference); + } + + static final _id_getABool = _class.instanceMethodId( + r'getABool', + r'()Z', + ); + + static final _getABool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final boolean getABool()` + bool getABool() { + return _getABool(reference.pointer, _id_getABool as jni$_.JMethodIDPtr) + .boolean; + } + + static final _id_getAnInt = _class.instanceMethodId( + r'getAnInt', + r'()J', + ); + + static final _getAnInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long getAnInt()` + int getAnInt() { + return _getAnInt(reference.pointer, _id_getAnInt as jni$_.JMethodIDPtr) + .long; + } + + static final _id_getAnInt64 = _class.instanceMethodId( + r'getAnInt64', + r'()J', + ); + + static final _getAnInt64 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long getAnInt64()` + int getAnInt64() { + return _getAnInt64(reference.pointer, _id_getAnInt64 as jni$_.JMethodIDPtr) + .long; + } + + static final _id_getADouble = _class.instanceMethodId( + r'getADouble', + r'()D', + ); + + static final _getADouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double getADouble()` + double getADouble() { + return _getADouble(reference.pointer, _id_getADouble as jni$_.JMethodIDPtr) + .doubleFloat; + } + + static final _id_getAByteArray = _class.instanceMethodId( + r'getAByteArray', + r'()[B', + ); + + static final _getAByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] getAByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray getAByteArray() { + return _getAByteArray( + reference.pointer, _id_getAByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayType()); + } + + static final _id_getA4ByteArray = _class.instanceMethodId( + r'getA4ByteArray', + r'()[I', + ); + + static final _getA4ByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int[] getA4ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray getA4ByteArray() { + return _getA4ByteArray( + reference.pointer, _id_getA4ByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JIntArrayType()); + } + + static final _id_getA8ByteArray = _class.instanceMethodId( + r'getA8ByteArray', + r'()[J', + ); + + static final _getA8ByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long[] getA8ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray getA8ByteArray() { + return _getA8ByteArray( + reference.pointer, _id_getA8ByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JLongArrayType()); + } + + static final _id_getAFloatArray = _class.instanceMethodId( + r'getAFloatArray', + r'()[D', + ); + + static final _getAFloatArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double[] getAFloatArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray getAFloatArray() { + return _getAFloatArray( + reference.pointer, _id_getAFloatArray as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleArrayType()); + } + + static final _id_getAnEnum = _class.instanceMethodId( + r'getAnEnum', + r'()LJniAnEnum;', + ); + + static final _getAnEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnEnum getAnEnum()` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum getAnEnum() { + return _getAnEnum(reference.pointer, _id_getAnEnum as jni$_.JMethodIDPtr) + .object(const $JniAnEnum$Type()); + } + + static final _id_getAnotherEnum = _class.instanceMethodId( + r'getAnotherEnum', + r'()LJniAnotherEnum;', + ); + + static final _getAnotherEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnotherEnum getAnotherEnum()` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum getAnotherEnum() { + return _getAnotherEnum( + reference.pointer, _id_getAnotherEnum as jni$_.JMethodIDPtr) + .object(const $JniAnotherEnum$Type()); + } + + static final _id_getAString = _class.instanceMethodId( + r'getAString', + r'()Ljava/lang/String;', + ); + + static final _getAString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.String getAString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString getAString() { + return _getAString(reference.pointer, _id_getAString as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); + } + + static final _id_getAnObject = _class.instanceMethodId( + r'getAnObject', + r'()Ljava/lang/Object;', + ); + + static final _getAnObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object getAnObject()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getAnObject() { + return _getAnObject( + reference.pointer, _id_getAnObject as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_getList = _class.instanceMethodId( + r'getList', + r'()Ljava/util/List;', + ); + + static final _getList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getList() { + return _getList(reference.pointer, _id_getList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_getStringList = _class.instanceMethodId( + r'getStringList', + r'()Ljava/util/List;', + ); + + static final _getStringList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getStringList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getStringList() { + return _getStringList( + reference.pointer, _id_getStringList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JStringType())); + } + + static final _id_getIntList = _class.instanceMethodId( + r'getIntList', + r'()Ljava/util/List;', + ); + + static final _getIntList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getIntList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getIntList() { + return _getIntList(reference.pointer, _id_getIntList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JLongType())); + } + + static final _id_getDoubleList = _class.instanceMethodId( + r'getDoubleList', + r'()Ljava/util/List;', + ); + + static final _getDoubleList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getDoubleList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getDoubleList() { + return _getDoubleList( + reference.pointer, _id_getDoubleList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JDoubleType())); + } + + static final _id_getBoolList = _class.instanceMethodId( + r'getBoolList', + r'()Ljava/util/List;', + ); + + static final _getBoolList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getBoolList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getBoolList() { + return _getBoolList( + reference.pointer, _id_getBoolList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JBooleanType())); + } + + static final _id_getEnumList = _class.instanceMethodId( + r'getEnumList', + r'()Ljava/util/List;', + ); + + static final _getEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getEnumList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getEnumList() { + return _getEnumList( + reference.pointer, _id_getEnumList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType($JniAnEnum$Type())); + } + + static final _id_getObjectList = _class.instanceMethodId( + r'getObjectList', + r'()Ljava/util/List;', + ); + + static final _getObjectList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getObjectList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getObjectList() { + return _getObjectList( + reference.pointer, _id_getObjectList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectType())); + } + + static final _id_getListList = _class.instanceMethodId( + r'getListList', + r'()Ljava/util/List;', + ); + + static final _getListList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> getListList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> getListList() { + return _getListList( + reference.pointer, _id_getListList as jni$_.JMethodIDPtr) + .object>>( + const jni$_.JListType>( + jni$_.JListType(jni$_.JObjectNullableType()))); + } + + static final _id_getMapList = _class.instanceMethodId( + r'getMapList', + r'()Ljava/util/List;', + ); + + static final _getMapList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> getMapList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> getMapList() { + return _getMapList(reference.pointer, _id_getMapList as jni$_.JMethodIDPtr) + .object>>( + const jni$_.JListType>( + jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_getMap = _class.instanceMethodId( + r'getMap', + r'()Ljava/util/Map;', + ); + + static final _getMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap getMap() { + return _getMap(reference.pointer, _id_getMap as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JObjectType(), jni$_.JObjectNullableType())); + } + + static final _id_getStringMap = _class.instanceMethodId( + r'getStringMap', + r'()Ljava/util/Map;', + ); + + static final _getStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getStringMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap getStringMap() { + return _getStringMap( + reference.pointer, _id_getStringMap as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JStringType(), jni$_.JStringType())); + } + + static final _id_getIntMap = _class.instanceMethodId( + r'getIntMap', + r'()Ljava/util/Map;', + ); + + static final _getIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getIntMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap getIntMap() { + return _getIntMap(reference.pointer, _id_getIntMap as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JLongType(), jni$_.JLongType())); + } + + static final _id_getEnumMap = _class.instanceMethodId( + r'getEnumMap', + r'()Ljava/util/Map;', + ); + + static final _getEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getEnumMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap getEnumMap() { + return _getEnumMap(reference.pointer, _id_getEnumMap as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + $JniAnEnum$Type(), $JniAnEnum$Type())); + } + + static final _id_getObjectMap = _class.instanceMethodId( + r'getObjectMap', + r'()Ljava/util/Map;', + ); + + static final _getObjectMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getObjectMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap getObjectMap() { + return _getObjectMap( + reference.pointer, _id_getObjectMap as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JObjectType(), jni$_.JObjectType())); + } + + static final _id_getListMap = _class.instanceMethodId( + r'getListMap', + r'()Ljava/util/Map;', + ); + + static final _getListMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> getListMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> getListMap() { + return _getListMap(reference.pointer, _id_getListMap as jni$_.JMethodIDPtr) + .object>>( + const jni$_.JMapType>( + jni$_.JLongType(), + jni$_.JListType(jni$_.JObjectNullableType()))); + } + + static final _id_getMapMap = _class.instanceMethodId( + r'getMapMap', + r'()Ljava/util/Map;', + ); + + static final _getMapMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> getMapMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> + getMapMap() { + return _getMapMap(reference.pointer, _id_getMapMap as jni$_.JMethodIDPtr) + .object< + jni$_.JMap>>(const jni$_ + .JMapType>( + jni$_.JLongType(), + jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_toList = _class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List toList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList(reference.pointer, _id_toList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_component1 = _class.instanceMethodId( + r'component1', + r'()Z', + ); + + static final _component1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final boolean component1()` + bool component1() { + return _component1(reference.pointer, _id_component1 as jni$_.JMethodIDPtr) + .boolean; + } + + static final _id_component2 = _class.instanceMethodId( + r'component2', + r'()J', + ); + + static final _component2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long component2()` + int component2() { + return _component2(reference.pointer, _id_component2 as jni$_.JMethodIDPtr) + .long; + } + + static final _id_component3 = _class.instanceMethodId( + r'component3', + r'()J', + ); + + static final _component3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long component3()` + int component3() { + return _component3(reference.pointer, _id_component3 as jni$_.JMethodIDPtr) + .long; + } + + static final _id_component4 = _class.instanceMethodId( + r'component4', + r'()D', + ); + + static final _component4 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallDoubleMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double component4()` + double component4() { + return _component4(reference.pointer, _id_component4 as jni$_.JMethodIDPtr) + .doubleFloat; + } + + static final _id_component5 = _class.instanceMethodId( + r'component5', + r'()[B', + ); + + static final _component5 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] component5()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray component5() { + return _component5(reference.pointer, _id_component5 as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayType()); + } + + static final _id_component6 = _class.instanceMethodId( + r'component6', + r'()[I', + ); + + static final _component6 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int[] component6()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray component6() { + return _component6(reference.pointer, _id_component6 as jni$_.JMethodIDPtr) + .object(const jni$_.JIntArrayType()); + } + + static final _id_component7 = _class.instanceMethodId( + r'component7', + r'()[J', + ); + + static final _component7 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long[] component7()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray component7() { + return _component7(reference.pointer, _id_component7 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongArrayType()); + } + + static final _id_component8 = _class.instanceMethodId( + r'component8', + r'()[D', + ); + + static final _component8 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double[] component8()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray component8() { + return _component8(reference.pointer, _id_component8 as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleArrayType()); + } + + static final _id_component9 = _class.instanceMethodId( + r'component9', + r'()LJniAnEnum;', + ); + + static final _component9 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnEnum component9()` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum component9() { + return _component9(reference.pointer, _id_component9 as jni$_.JMethodIDPtr) + .object(const $JniAnEnum$Type()); + } + + static final _id_component10 = _class.instanceMethodId( + r'component10', + r'()LJniAnotherEnum;', + ); + + static final _component10 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnotherEnum component10()` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum component10() { + return _component10( + reference.pointer, _id_component10 as jni$_.JMethodIDPtr) + .object(const $JniAnotherEnum$Type()); + } + + static final _id_component11 = _class.instanceMethodId( + r'component11', + r'()Ljava/lang/String;', + ); + + static final _component11 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.String component11()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString component11() { + return _component11( + reference.pointer, _id_component11 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); + } + + static final _id_component12 = _class.instanceMethodId( + r'component12', + r'()Ljava/lang/Object;', + ); + + static final _component12 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object component12()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject component12() { + return _component12( + reference.pointer, _id_component12 as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_component13 = _class.instanceMethodId( + r'component13', + r'()Ljava/util/List;', + ); + + static final _component13 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component13()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component13() { + return _component13( + reference.pointer, _id_component13 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_component14 = _class.instanceMethodId( + r'component14', + r'()Ljava/util/List;', + ); + + static final _component14 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component14()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component14() { + return _component14( + reference.pointer, _id_component14 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JStringType())); + } + + static final _id_component15 = _class.instanceMethodId( + r'component15', + r'()Ljava/util/List;', + ); + + static final _component15 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component15()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component15() { + return _component15( + reference.pointer, _id_component15 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JLongType())); + } + + static final _id_component16 = _class.instanceMethodId( + r'component16', + r'()Ljava/util/List;', + ); + + static final _component16 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component16()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component16() { + return _component16( + reference.pointer, _id_component16 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JDoubleType())); + } + + static final _id_component17 = _class.instanceMethodId( + r'component17', + r'()Ljava/util/List;', + ); + + static final _component17 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component17()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component17() { + return _component17( + reference.pointer, _id_component17 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JBooleanType())); + } + + static final _id_component18 = _class.instanceMethodId( + r'component18', + r'()Ljava/util/List;', + ); + + static final _component18 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component18()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component18() { + return _component18( + reference.pointer, _id_component18 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType($JniAnEnum$Type())); + } + + static final _id_component19 = _class.instanceMethodId( + r'component19', + r'()Ljava/util/List;', + ); + + static final _component19 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component19()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component19() { + return _component19( + reference.pointer, _id_component19 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectType())); + } + + static final _id_component20 = _class.instanceMethodId( + r'component20', + r'()Ljava/util/List;', + ); + + static final _component20 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> component20()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> component20() { + return _component20( + reference.pointer, _id_component20 as jni$_.JMethodIDPtr) + .object>>( + const jni$_.JListType>( + jni$_.JListType(jni$_.JObjectNullableType()))); + } + + static final _id_component21 = _class.instanceMethodId( + r'component21', + r'()Ljava/util/List;', + ); + + static final _component21 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> component21()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList> component21() { + return _component21( + reference.pointer, _id_component21 as jni$_.JMethodIDPtr) + .object>>( + const jni$_.JListType>( + jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_component22 = _class.instanceMethodId( + r'component22', + r'()Ljava/util/Map;', + ); + + static final _component22 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component22()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component22() { + return _component22( + reference.pointer, _id_component22 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JObjectType(), jni$_.JObjectNullableType())); + } + + static final _id_component23 = _class.instanceMethodId( + r'component23', + r'()Ljava/util/Map;', + ); + + static final _component23 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component23()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component23() { + return _component23( + reference.pointer, _id_component23 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JStringType(), jni$_.JStringType())); + } + + static final _id_component24 = _class.instanceMethodId( + r'component24', + r'()Ljava/util/Map;', + ); + + static final _component24 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component24()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component24() { + return _component24( + reference.pointer, _id_component24 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JLongType(), jni$_.JLongType())); + } + + static final _id_component25 = _class.instanceMethodId( + r'component25', + r'()Ljava/util/Map;', + ); + + static final _component25 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component25()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component25() { + return _component25( + reference.pointer, _id_component25 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + $JniAnEnum$Type(), $JniAnEnum$Type())); + } + + static final _id_component26 = _class.instanceMethodId( + r'component26', + r'()Ljava/util/Map;', + ); + + static final _component26 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component26()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component26() { + return _component26( + reference.pointer, _id_component26 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JObjectType(), jni$_.JObjectType())); + } + + static final _id_component27 = _class.instanceMethodId( + r'component27', + r'()Ljava/util/Map;', + ); + + static final _component27 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> component27()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> component27() { + return _component27( + reference.pointer, _id_component27 as jni$_.JMethodIDPtr) + .object>>( + const jni$_.JMapType>( + jni$_.JLongType(), + jni$_.JListType(jni$_.JObjectNullableType()))); + } + + static final _id_component28 = _class.instanceMethodId( + r'component28', + r'()Ljava/util/Map;', + ); + + static final _component28 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> component28()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap> + component28() { + return _component28( + reference.pointer, _id_component28 as jni$_.JMethodIDPtr) + .object< + jni$_.JMap>>(const jni$_ + .JMapType>( + jni$_.JLongType(), + jni$_.JMapType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_copy = _class.instanceMethodId( + r'copy', + r'(ZJJD[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)LJniAllTypes;', + ); + + static final _copy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Int32, + jni$_.Int64, + jni$_.Int64, + jni$_.Double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + int, + int, + int, + double, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public final JniAllTypes copy(boolean z, long j, long j1, double d, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6)` + /// The returned object must be released after use, by calling the [release] method. + JniAllTypes copy( + bool z, + int j, + int j1, + double d, + jni$_.JByteArray bs, + jni$_.JIntArray is$, + jni$_.JLongArray js, + jni$_.JDoubleArray ds, + JniAnEnum jniAnEnum, + JniAnotherEnum jniAnotherEnum, + jni$_.JString string, + jni$_.JObject object, + jni$_.JList list, + jni$_.JList list1, + jni$_.JList list2, + jni$_.JList list3, + jni$_.JList list4, + jni$_.JList list5, + jni$_.JList list6, + jni$_.JList> list7, + jni$_.JList> list8, + jni$_.JMap map, + jni$_.JMap map1, + jni$_.JMap map2, + jni$_.JMap map3, + jni$_.JMap map4, + jni$_.JMap> map5, + jni$_.JMap> map6, + ) { + final _$bs = bs.reference; + final _$is$ = is$.reference; + final _$js = js.reference; + final _$ds = ds.reference; + final _$jniAnEnum = jniAnEnum.reference; + final _$jniAnotherEnum = jniAnotherEnum.reference; + final _$string = string.reference; + final _$object = object.reference; + final _$list = list.reference; + final _$list1 = list1.reference; + final _$list2 = list2.reference; + final _$list3 = list3.reference; + final _$list4 = list4.reference; + final _$list5 = list5.reference; + final _$list6 = list6.reference; + final _$list7 = list7.reference; + final _$list8 = list8.reference; + final _$map = map.reference; + final _$map1 = map1.reference; + final _$map2 = map2.reference; + final _$map3 = map3.reference; + final _$map4 = map4.reference; + final _$map5 = map5.reference; + final _$map6 = map6.reference; + return _copy( + reference.pointer, + _id_copy as jni$_.JMethodIDPtr, + z ? 1 : 0, + j, + j1, + d, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer) + .object(const $JniAllTypes$Type()); + } + + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String toString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); + } +} + +final class $JniAllTypes$NullableType extends jni$_.JObjType { + @jni$_.internal + const $JniAllTypes$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllTypes;'; + + @jni$_.internal + @core$_.override + JniAllTypes? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : JniAllTypes.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllTypes$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllTypes$NullableType) && + other is $JniAllTypes$NullableType; + } +} + +final class $JniAllTypes$Type extends jni$_.JObjType { + @jni$_.internal + const $JniAllTypes$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllTypes;'; + + @jni$_.internal + @core$_.override + JniAllTypes fromReference(jni$_.JReference reference) => + JniAllTypes.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAllTypes$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllTypes$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllTypes$Type) && + other is $JniAllTypes$Type; + } +} + +/// from: `JniAllNullableTypes$Companion` +class JniAllNullableTypes$Companion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllNullableTypes$Companion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAllNullableTypes$Companion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAllNullableTypes$Companion$NullableType(); + static const type = $JniAllNullableTypes$Companion$Type(); + static final _id_fromList = _class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LJniAllNullableTypes;', + ); + + static final _fromList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniAllNullableTypes fromList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes fromList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _fromList(reference.pointer, _id_fromList as jni$_.JMethodIDPtr, + _$list.pointer) + .object(const $JniAllNullableTypes$Type()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypes$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAllNullableTypes$Companion.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $JniAllNullableTypes$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypes$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypes$Companion;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypes$Companion? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniAllNullableTypes$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllNullableTypes$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllNullableTypes$Companion$NullableType) && + other is $JniAllNullableTypes$Companion$NullableType; + } +} + +final class $JniAllNullableTypes$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypes$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypes$Companion;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypes$Companion fromReference(jni$_.JReference reference) => + JniAllNullableTypes$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAllNullableTypes$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllNullableTypes$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllNullableTypes$Companion$Type) && + other is $JniAllNullableTypes$Companion$Type; + } +} + +/// from: `JniAllNullableTypes` +class JniAllNullableTypes extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllNullableTypes.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAllNullableTypes'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAllNullableTypes$NullableType(); + static const type = $JniAllNullableTypes$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LJniAllNullableTypes$Companion;', + ); + + /// from: `static public final JniAllNullableTypes$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static JniAllNullableTypes$Companion get Companion => + _id_Companion.get(_class, const $JniAllNullableTypes$Companion$Type()); + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;LJniAllNullableTypes;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, JniAllNullableTypes jniAllNullableTypes, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.List list9, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6, java.util.Map map7)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + JniAnEnum? jniAnEnum, + JniAnotherEnum? jniAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + JniAllNullableTypes? jniAllNullableTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JList? list9, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + jni$_.JMap? map7, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$list9 = list9?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$map7 = map7?.reference ?? jni$_.jNullReference; + return JniAllNullableTypes.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$jniAllNullableTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$list9.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + _$map7.pointer) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;LJniAllNullableTypes;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + int, + jni$_.Pointer)>(); + + /// from: `synthetic public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, JniAllNullableTypes jniAllNullableTypes, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.List list9, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6, java.util.Map map7, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypes.new$1( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + JniAnEnum? jniAnEnum, + JniAnotherEnum? jniAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + JniAllNullableTypes? jniAllNullableTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList? list7, + jni$_.JList? list8, + jni$_.JList? list9, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap? map5, + jni$_.JMap? map6, + jni$_.JMap? map7, + int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$list9 = list9?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$map7 = map7?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAllNullableTypes.fromReference(_new$1( + _class.reference.pointer, + _id_new$1 as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$jniAllNullableTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$list9.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + _$map7.pointer, + i, + _$defaultConstructorMarker.pointer) + .reference); + } + + static final _id_getANullableBool = _class.instanceMethodId( + r'getANullableBool', + r'()Ljava/lang/Boolean;', + ); + + static final _getANullableBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Boolean getANullableBool()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? getANullableBool() { + return _getANullableBool( + reference.pointer, _id_getANullableBool as jni$_.JMethodIDPtr) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_getANullableInt = _class.instanceMethodId( + r'getANullableInt', + r'()Ljava/lang/Long;', + ); + + static final _getANullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long getANullableInt()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? getANullableInt() { + return _getANullableInt( + reference.pointer, _id_getANullableInt as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_getANullableInt64 = _class.instanceMethodId( + r'getANullableInt64', + r'()Ljava/lang/Long;', + ); + + static final _getANullableInt64 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long getANullableInt64()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? getANullableInt64() { + return _getANullableInt64( + reference.pointer, _id_getANullableInt64 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_getANullableDouble = _class.instanceMethodId( + r'getANullableDouble', + r'()Ljava/lang/Double;', + ); + + static final _getANullableDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Double getANullableDouble()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? getANullableDouble() { + return _getANullableDouble( + reference.pointer, _id_getANullableDouble as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleNullableType()); + } + + static final _id_getANullableByteArray = _class.instanceMethodId( + r'getANullableByteArray', + r'()[B', + ); + + static final _getANullableByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] getANullableByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? getANullableByteArray() { + return _getANullableByteArray( + reference.pointer, _id_getANullableByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_getANullable4ByteArray = _class.instanceMethodId( + r'getANullable4ByteArray', + r'()[I', + ); + + static final _getANullable4ByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int[] getANullable4ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? getANullable4ByteArray() { + return _getANullable4ByteArray( + reference.pointer, _id_getANullable4ByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JIntArrayNullableType()); + } + + static final _id_getANullable8ByteArray = _class.instanceMethodId( + r'getANullable8ByteArray', + r'()[J', + ); + + static final _getANullable8ByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long[] getANullable8ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? getANullable8ByteArray() { + return _getANullable8ByteArray( + reference.pointer, _id_getANullable8ByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JLongArrayNullableType()); + } + + static final _id_getANullableFloatArray = _class.instanceMethodId( + r'getANullableFloatArray', + r'()[D', + ); + + static final _getANullableFloatArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double[] getANullableFloatArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? getANullableFloatArray() { + return _getANullableFloatArray( + reference.pointer, _id_getANullableFloatArray as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleArrayNullableType()); + } + + static final _id_getANullableEnum = _class.instanceMethodId( + r'getANullableEnum', + r'()LJniAnEnum;', + ); + + static final _getANullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnEnum getANullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum? getANullableEnum() { + return _getANullableEnum( + reference.pointer, _id_getANullableEnum as jni$_.JMethodIDPtr) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_getAnotherNullableEnum = _class.instanceMethodId( + r'getAnotherNullableEnum', + r'()LJniAnotherEnum;', + ); + + static final _getAnotherNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnotherEnum getAnotherNullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum? getAnotherNullableEnum() { + return _getAnotherNullableEnum( + reference.pointer, _id_getAnotherNullableEnum as jni$_.JMethodIDPtr) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_getANullableString = _class.instanceMethodId( + r'getANullableString', + r'()Ljava/lang/String;', + ); + + static final _getANullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.String getANullableString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getANullableString() { + return _getANullableString( + reference.pointer, _id_getANullableString as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_getANullableObject = _class.instanceMethodId( + r'getANullableObject', + r'()Ljava/lang/Object;', + ); + + static final _getANullableObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object getANullableObject()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getANullableObject() { + return _getANullableObject( + reference.pointer, _id_getANullableObject as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_getAllNullableTypes = _class.instanceMethodId( + r'getAllNullableTypes', + r'()LJniAllNullableTypes;', + ); + + static final _getAllNullableTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllNullableTypes getAllNullableTypes()` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes? getAllNullableTypes() { + return _getAllNullableTypes( + reference.pointer, _id_getAllNullableTypes as jni$_.JMethodIDPtr) + .object( + const $JniAllNullableTypes$NullableType()); + } + + static final _id_getList = _class.instanceMethodId( + r'getList', + r'()Ljava/util/List;', + ); + + static final _getList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getList() { + return _getList(reference.pointer, _id_getList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_getStringList = _class.instanceMethodId( + r'getStringList', + r'()Ljava/util/List;', + ); + + static final _getStringList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getStringList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getStringList() { + return _getStringList( + reference.pointer, _id_getStringList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JStringNullableType())); + } + + static final _id_getIntList = _class.instanceMethodId( + r'getIntList', + r'()Ljava/util/List;', + ); + + static final _getIntList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getIntList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getIntList() { + return _getIntList(reference.pointer, _id_getIntList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JLongNullableType())); + } + + static final _id_getDoubleList = _class.instanceMethodId( + r'getDoubleList', + r'()Ljava/util/List;', + ); + + static final _getDoubleList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getDoubleList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getDoubleList() { + return _getDoubleList( + reference.pointer, _id_getDoubleList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JDoubleNullableType())); + } + + static final _id_getBoolList = _class.instanceMethodId( + r'getBoolList', + r'()Ljava/util/List;', + ); + + static final _getBoolList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getBoolList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getBoolList() { + return _getBoolList( + reference.pointer, _id_getBoolList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JBooleanNullableType())); + } + + static final _id_getEnumList = _class.instanceMethodId( + r'getEnumList', + r'()Ljava/util/List;', + ); + + static final _getEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getEnumList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getEnumList() { + return _getEnumList( + reference.pointer, _id_getEnumList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAnEnum$NullableType())); + } + + static final _id_getObjectList = _class.instanceMethodId( + r'getObjectList', + r'()Ljava/util/List;', + ); + + static final _getObjectList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getObjectList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getObjectList() { + return _getObjectList( + reference.pointer, _id_getObjectList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_getListList = _class.instanceMethodId( + r'getListList', + r'()Ljava/util/List;', + ); + + static final _getListList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> getListList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? getListList() { + return _getListList( + reference.pointer, _id_getListList as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_.JListNullableType?>( + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_getMapList = _class.instanceMethodId( + r'getMapList', + r'()Ljava/util/List;', + ); + + static final _getMapList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> getMapList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? getMapList() { + return _getMapList(reference.pointer, _id_getMapList as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JListNullableType?>( + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_getRecursiveClassList = _class.instanceMethodId( + r'getRecursiveClassList', + r'()Ljava/util/List;', + ); + + static final _getRecursiveClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getRecursiveClassList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getRecursiveClassList() { + return _getRecursiveClassList( + reference.pointer, _id_getRecursiveClassList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$NullableType())); + } + + static final _id_getMap = _class.instanceMethodId( + r'getMap', + r'()Ljava/util/Map;', + ); + + static final _getMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getMap() { + return _getMap(reference.pointer, _id_getMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectType(), jni$_.JObjectNullableType())); + } + + static final _id_getStringMap = _class.instanceMethodId( + r'getStringMap', + r'()Ljava/util/Map;', + ); + + static final _getStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getStringMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getStringMap() { + return _getStringMap( + reference.pointer, _id_getStringMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_getIntMap = _class.instanceMethodId( + r'getIntMap', + r'()Ljava/util/Map;', + ); + + static final _getIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getIntMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getIntMap() { + return _getIntMap(reference.pointer, _id_getIntMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_getEnumMap = _class.instanceMethodId( + r'getEnumMap', + r'()Ljava/util/Map;', + ); + + static final _getEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getEnumMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getEnumMap() { + return _getEnumMap(reference.pointer, _id_getEnumMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_getObjectMap = _class.instanceMethodId( + r'getObjectMap', + r'()Ljava/util/Map;', + ); + + static final _getObjectMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getObjectMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getObjectMap() { + return _getObjectMap( + reference.pointer, _id_getObjectMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_getListMap = _class.instanceMethodId( + r'getListMap', + r'()Ljava/util/Map;', + ); + + static final _getListMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> getListMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? getListMap() { + return _getListMap(reference.pointer, _id_getListMap as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_getMapMap = _class.instanceMethodId( + r'getMapMap', + r'()Ljava/util/Map;', + ); + + static final _getMapMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> getMapMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + getMapMap() { + return _getMapMap(reference.pointer, _id_getMapMap as jni$_.JMethodIDPtr) + .object< + jni$_.JMap?>?>( + const jni$_.JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_getRecursiveClassMap = _class.instanceMethodId( + r'getRecursiveClassMap', + r'()Ljava/util/Map;', + ); + + static final _getRecursiveClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getRecursiveClassMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getRecursiveClassMap() { + return _getRecursiveClassMap( + reference.pointer, _id_getRecursiveClassMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), + $JniAllNullableTypes$NullableType())); + } + + static final _id_toList = _class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List toList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList(reference.pointer, _id_toList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_component1 = _class.instanceMethodId( + r'component1', + r'()Ljava/lang/Boolean;', + ); + + static final _component1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Boolean component1()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? component1() { + return _component1(reference.pointer, _id_component1 as jni$_.JMethodIDPtr) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_component2 = _class.instanceMethodId( + r'component2', + r'()Ljava/lang/Long;', + ); + + static final _component2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long component2()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component2() { + return _component2(reference.pointer, _id_component2 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_component3 = _class.instanceMethodId( + r'component3', + r'()Ljava/lang/Long;', + ); + + static final _component3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long component3()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component3() { + return _component3(reference.pointer, _id_component3 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_component4 = _class.instanceMethodId( + r'component4', + r'()Ljava/lang/Double;', + ); + + static final _component4 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Double component4()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? component4() { + return _component4(reference.pointer, _id_component4 as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleNullableType()); + } + + static final _id_component5 = _class.instanceMethodId( + r'component5', + r'()[B', + ); + + static final _component5 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] component5()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? component5() { + return _component5(reference.pointer, _id_component5 as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_component6 = _class.instanceMethodId( + r'component6', + r'()[I', + ); + + static final _component6 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int[] component6()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? component6() { + return _component6(reference.pointer, _id_component6 as jni$_.JMethodIDPtr) + .object(const jni$_.JIntArrayNullableType()); + } + + static final _id_component7 = _class.instanceMethodId( + r'component7', + r'()[J', + ); + + static final _component7 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long[] component7()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? component7() { + return _component7(reference.pointer, _id_component7 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongArrayNullableType()); + } + + static final _id_component8 = _class.instanceMethodId( + r'component8', + r'()[D', + ); + + static final _component8 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double[] component8()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? component8() { + return _component8(reference.pointer, _id_component8 as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleArrayNullableType()); + } + + static final _id_component9 = _class.instanceMethodId( + r'component9', + r'()LJniAnEnum;', + ); + + static final _component9 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnEnum component9()` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum? component9() { + return _component9(reference.pointer, _id_component9 as jni$_.JMethodIDPtr) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_component10 = _class.instanceMethodId( + r'component10', + r'()LJniAnotherEnum;', + ); + + static final _component10 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnotherEnum component10()` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum? component10() { + return _component10( + reference.pointer, _id_component10 as jni$_.JMethodIDPtr) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_component11 = _class.instanceMethodId( + r'component11', + r'()Ljava/lang/String;', + ); + + static final _component11 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.String component11()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? component11() { + return _component11( + reference.pointer, _id_component11 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_component12 = _class.instanceMethodId( + r'component12', + r'()Ljava/lang/Object;', + ); + + static final _component12 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object component12()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? component12() { + return _component12( + reference.pointer, _id_component12 as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_component13 = _class.instanceMethodId( + r'component13', + r'()LJniAllNullableTypes;', + ); + + static final _component13 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllNullableTypes component13()` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes? component13() { + return _component13( + reference.pointer, _id_component13 as jni$_.JMethodIDPtr) + .object( + const $JniAllNullableTypes$NullableType()); + } + + static final _id_component14 = _class.instanceMethodId( + r'component14', + r'()Ljava/util/List;', + ); + + static final _component14 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component14()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component14() { + return _component14( + reference.pointer, _id_component14 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_component15 = _class.instanceMethodId( + r'component15', + r'()Ljava/util/List;', + ); + + static final _component15 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component15()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component15() { + return _component15( + reference.pointer, _id_component15 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JStringNullableType())); + } + + static final _id_component16 = _class.instanceMethodId( + r'component16', + r'()Ljava/util/List;', + ); + + static final _component16 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component16()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component16() { + return _component16( + reference.pointer, _id_component16 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JLongNullableType())); + } + + static final _id_component17 = _class.instanceMethodId( + r'component17', + r'()Ljava/util/List;', + ); + + static final _component17 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component17()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component17() { + return _component17( + reference.pointer, _id_component17 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JDoubleNullableType())); + } + + static final _id_component18 = _class.instanceMethodId( + r'component18', + r'()Ljava/util/List;', + ); + + static final _component18 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component18()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component18() { + return _component18( + reference.pointer, _id_component18 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JBooleanNullableType())); + } + + static final _id_component19 = _class.instanceMethodId( + r'component19', + r'()Ljava/util/List;', + ); + + static final _component19 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component19()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component19() { + return _component19( + reference.pointer, _id_component19 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAnEnum$NullableType())); + } + + static final _id_component20 = _class.instanceMethodId( + r'component20', + r'()Ljava/util/List;', + ); + + static final _component20 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component20()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component20() { + return _component20( + reference.pointer, _id_component20 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_component21 = _class.instanceMethodId( + r'component21', + r'()Ljava/util/List;', + ); + + static final _component21 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> component21()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component21() { + return _component21( + reference.pointer, _id_component21 as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_.JListNullableType?>( + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_component22 = _class.instanceMethodId( + r'component22', + r'()Ljava/util/List;', + ); + + static final _component22 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> component22()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component22() { + return _component22( + reference.pointer, _id_component22 as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JListNullableType?>( + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_component23 = _class.instanceMethodId( + r'component23', + r'()Ljava/util/List;', + ); + + static final _component23 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component23()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component23() { + return _component23( + reference.pointer, _id_component23 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypes$NullableType())); + } + + static final _id_component24 = _class.instanceMethodId( + r'component24', + r'()Ljava/util/Map;', + ); + + static final _component24 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component24()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component24() { + return _component24( + reference.pointer, _id_component24 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectType(), jni$_.JObjectNullableType())); + } + + static final _id_component25 = _class.instanceMethodId( + r'component25', + r'()Ljava/util/Map;', + ); + + static final _component25 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component25()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component25() { + return _component25( + reference.pointer, _id_component25 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_component26 = _class.instanceMethodId( + r'component26', + r'()Ljava/util/Map;', + ); + + static final _component26 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component26()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component26() { + return _component26( + reference.pointer, _id_component26 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_component27 = _class.instanceMethodId( + r'component27', + r'()Ljava/util/Map;', + ); + + static final _component27 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component27()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component27() { + return _component27( + reference.pointer, _id_component27 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_component28 = _class.instanceMethodId( + r'component28', + r'()Ljava/util/Map;', + ); + + static final _component28 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component28()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component28() { + return _component28( + reference.pointer, _id_component28 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_component29 = _class.instanceMethodId( + r'component29', + r'()Ljava/util/Map;', + ); + + static final _component29 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> component29()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? component29() { + return _component29( + reference.pointer, _id_component29 as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_component30 = _class.instanceMethodId( + r'component30', + r'()Ljava/util/Map;', + ); + + static final _component30 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> component30()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + component30() { + return _component30(reference.pointer, _id_component30 as jni$_.JMethodIDPtr) + .object< + jni$_.JMap?>?>(const jni$_ + .JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_component31 = _class.instanceMethodId( + r'component31', + r'()Ljava/util/Map;', + ); + + static final _component31 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component31()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component31() { + return _component31( + reference.pointer, _id_component31 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), + $JniAllNullableTypes$NullableType())); + } + + static final _id_copy = _class.instanceMethodId( + r'copy', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;LJniAllNullableTypes;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)LJniAllNullableTypes;', + ); + + static final _copy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public final JniAllNullableTypes copy(java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, JniAllNullableTypes jniAllNullableTypes, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.List list9, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6, java.util.Map map7)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes copy( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + JniAnEnum? jniAnEnum, + JniAnotherEnum? jniAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + JniAllNullableTypes? jniAllNullableTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JList? list9, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + jni$_.JMap? map7, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$list9 = list9?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$map7 = map7?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$jniAllNullableTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$list9.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + _$map7.pointer) + .object(const $JniAllNullableTypes$Type()); + } + + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String toString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); + } + + static final _id_new$2 = _class.constructorId( + r'()V', + ); + + static final _new$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypes.new$2() { + return JniAllNullableTypes.fromReference( + _new$2(_class.reference.pointer, _id_new$2 as jni$_.JMethodIDPtr) + .reference); + } +} + +final class $JniAllNullableTypes$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypes$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypes;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypes? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniAllNullableTypes.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllNullableTypes$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllNullableTypes$NullableType) && + other is $JniAllNullableTypes$NullableType; + } +} + +final class $JniAllNullableTypes$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypes$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypes;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypes fromReference(jni$_.JReference reference) => + JniAllNullableTypes.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAllNullableTypes$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllNullableTypes$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllNullableTypes$Type) && + other is $JniAllNullableTypes$Type; + } +} + +/// from: `JniAllNullableTypesWithoutRecursion$Companion` +class JniAllNullableTypesWithoutRecursion$Companion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllNullableTypesWithoutRecursion$Companion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'JniAllNullableTypesWithoutRecursion$Companion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = + $JniAllNullableTypesWithoutRecursion$Companion$NullableType(); + static const type = $JniAllNullableTypesWithoutRecursion$Companion$Type(); + static final _id_fromList = _class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LJniAllNullableTypesWithoutRecursion;', + ); + + static final _fromList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniAllNullableTypesWithoutRecursion fromList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion fromList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _fromList(reference.pointer, _id_fromList as jni$_.JMethodIDPtr, + _$list.pointer) + .object( + const $JniAllNullableTypesWithoutRecursion$Type()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypesWithoutRecursion$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAllNullableTypesWithoutRecursion$Companion.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $JniAllNullableTypesWithoutRecursion$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypesWithoutRecursion$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypesWithoutRecursion$Companion;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypesWithoutRecursion$Companion? fromReference( + jni$_.JReference reference) => + reference.isNull + ? null + : JniAllNullableTypesWithoutRecursion$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType + get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => + ($JniAllNullableTypesWithoutRecursion$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == + ($JniAllNullableTypesWithoutRecursion$Companion$NullableType) && + other is $JniAllNullableTypesWithoutRecursion$Companion$NullableType; + } +} + +final class $JniAllNullableTypesWithoutRecursion$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypesWithoutRecursion$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypesWithoutRecursion$Companion;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypesWithoutRecursion$Companion fromReference( + jni$_.JReference reference) => + JniAllNullableTypesWithoutRecursion$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType + get nullableType => + const $JniAllNullableTypesWithoutRecursion$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => + ($JniAllNullableTypesWithoutRecursion$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == + ($JniAllNullableTypesWithoutRecursion$Companion$Type) && + other is $JniAllNullableTypesWithoutRecursion$Companion$Type; + } +} + +/// from: `JniAllNullableTypesWithoutRecursion` +class JniAllNullableTypesWithoutRecursion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllNullableTypesWithoutRecursion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'JniAllNullableTypesWithoutRecursion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = + $JniAllNullableTypesWithoutRecursion$NullableType(); + static const type = $JniAllNullableTypesWithoutRecursion$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LJniAllNullableTypesWithoutRecursion$Companion;', + ); + + /// from: `static public final JniAllNullableTypesWithoutRecursion$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static JniAllNullableTypesWithoutRecursion$Companion get Companion => + _id_Companion.get( + _class, const $JniAllNullableTypesWithoutRecursion$Companion$Type()); + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + JniAnEnum? jniAnEnum, + JniAnotherEnum? jniAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + return JniAllNullableTypesWithoutRecursion.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + int, + jni$_.Pointer)>(); + + /// from: `synthetic public void (java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypesWithoutRecursion.new$1( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + JniAnEnum? jniAnEnum, + JniAnotherEnum? jniAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList? list7, + jni$_.JList? list8, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap? map5, + jni$_.JMap? map6, + int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAllNullableTypesWithoutRecursion.fromReference(_new$1( + _class.reference.pointer, + _id_new$1 as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer, + i, + _$defaultConstructorMarker.pointer) + .reference); + } + + static final _id_getANullableBool = _class.instanceMethodId( + r'getANullableBool', + r'()Ljava/lang/Boolean;', + ); + + static final _getANullableBool = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Boolean getANullableBool()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? getANullableBool() { + return _getANullableBool( + reference.pointer, _id_getANullableBool as jni$_.JMethodIDPtr) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_getANullableInt = _class.instanceMethodId( + r'getANullableInt', + r'()Ljava/lang/Long;', + ); + + static final _getANullableInt = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long getANullableInt()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? getANullableInt() { + return _getANullableInt( + reference.pointer, _id_getANullableInt as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_getANullableInt64 = _class.instanceMethodId( + r'getANullableInt64', + r'()Ljava/lang/Long;', + ); + + static final _getANullableInt64 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long getANullableInt64()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? getANullableInt64() { + return _getANullableInt64( + reference.pointer, _id_getANullableInt64 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_getANullableDouble = _class.instanceMethodId( + r'getANullableDouble', + r'()Ljava/lang/Double;', + ); + + static final _getANullableDouble = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Double getANullableDouble()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? getANullableDouble() { + return _getANullableDouble( + reference.pointer, _id_getANullableDouble as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleNullableType()); + } + + static final _id_getANullableByteArray = _class.instanceMethodId( + r'getANullableByteArray', + r'()[B', + ); + + static final _getANullableByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] getANullableByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? getANullableByteArray() { + return _getANullableByteArray( + reference.pointer, _id_getANullableByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_getANullable4ByteArray = _class.instanceMethodId( + r'getANullable4ByteArray', + r'()[I', + ); + + static final _getANullable4ByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int[] getANullable4ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? getANullable4ByteArray() { + return _getANullable4ByteArray( + reference.pointer, _id_getANullable4ByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JIntArrayNullableType()); + } + + static final _id_getANullable8ByteArray = _class.instanceMethodId( + r'getANullable8ByteArray', + r'()[J', + ); + + static final _getANullable8ByteArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long[] getANullable8ByteArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? getANullable8ByteArray() { + return _getANullable8ByteArray( + reference.pointer, _id_getANullable8ByteArray as jni$_.JMethodIDPtr) + .object(const jni$_.JLongArrayNullableType()); + } + + static final _id_getANullableFloatArray = _class.instanceMethodId( + r'getANullableFloatArray', + r'()[D', + ); + + static final _getANullableFloatArray = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double[] getANullableFloatArray()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? getANullableFloatArray() { + return _getANullableFloatArray( + reference.pointer, _id_getANullableFloatArray as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleArrayNullableType()); + } + + static final _id_getANullableEnum = _class.instanceMethodId( + r'getANullableEnum', + r'()LJniAnEnum;', + ); + + static final _getANullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnEnum getANullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum? getANullableEnum() { + return _getANullableEnum( + reference.pointer, _id_getANullableEnum as jni$_.JMethodIDPtr) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_getAnotherNullableEnum = _class.instanceMethodId( + r'getAnotherNullableEnum', + r'()LJniAnotherEnum;', + ); + + static final _getAnotherNullableEnum = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnotherEnum getAnotherNullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum? getAnotherNullableEnum() { + return _getAnotherNullableEnum( + reference.pointer, _id_getAnotherNullableEnum as jni$_.JMethodIDPtr) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_getANullableString = _class.instanceMethodId( + r'getANullableString', + r'()Ljava/lang/String;', + ); + + static final _getANullableString = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.String getANullableString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getANullableString() { + return _getANullableString( + reference.pointer, _id_getANullableString as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_getANullableObject = _class.instanceMethodId( + r'getANullableObject', + r'()Ljava/lang/Object;', + ); + + static final _getANullableObject = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object getANullableObject()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getANullableObject() { + return _getANullableObject( + reference.pointer, _id_getANullableObject as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_getList = _class.instanceMethodId( + r'getList', + r'()Ljava/util/List;', + ); + + static final _getList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getList() { + return _getList(reference.pointer, _id_getList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_getStringList = _class.instanceMethodId( + r'getStringList', + r'()Ljava/util/List;', + ); + + static final _getStringList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getStringList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getStringList() { + return _getStringList( + reference.pointer, _id_getStringList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JStringNullableType())); + } + + static final _id_getIntList = _class.instanceMethodId( + r'getIntList', + r'()Ljava/util/List;', + ); + + static final _getIntList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getIntList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getIntList() { + return _getIntList(reference.pointer, _id_getIntList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JLongNullableType())); + } + + static final _id_getDoubleList = _class.instanceMethodId( + r'getDoubleList', + r'()Ljava/util/List;', + ); + + static final _getDoubleList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getDoubleList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getDoubleList() { + return _getDoubleList( + reference.pointer, _id_getDoubleList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JDoubleNullableType())); + } + + static final _id_getBoolList = _class.instanceMethodId( + r'getBoolList', + r'()Ljava/util/List;', + ); + + static final _getBoolList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getBoolList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getBoolList() { + return _getBoolList( + reference.pointer, _id_getBoolList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JBooleanNullableType())); + } + + static final _id_getEnumList = _class.instanceMethodId( + r'getEnumList', + r'()Ljava/util/List;', + ); + + static final _getEnumList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getEnumList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getEnumList() { + return _getEnumList( + reference.pointer, _id_getEnumList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAnEnum$NullableType())); + } + + static final _id_getObjectList = _class.instanceMethodId( + r'getObjectList', + r'()Ljava/util/List;', + ); + + static final _getObjectList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getObjectList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getObjectList() { + return _getObjectList( + reference.pointer, _id_getObjectList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_getListList = _class.instanceMethodId( + r'getListList', + r'()Ljava/util/List;', + ); + + static final _getListList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> getListList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? getListList() { + return _getListList( + reference.pointer, _id_getListList as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_.JListNullableType?>( + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_getMapList = _class.instanceMethodId( + r'getMapList', + r'()Ljava/util/List;', + ); + + static final _getMapList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> getMapList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? getMapList() { + return _getMapList(reference.pointer, _id_getMapList as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JListNullableType?>( + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_getMap = _class.instanceMethodId( + r'getMap', + r'()Ljava/util/Map;', + ); + + static final _getMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getMap() { + return _getMap(reference.pointer, _id_getMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectType(), jni$_.JObjectNullableType())); + } + + static final _id_getStringMap = _class.instanceMethodId( + r'getStringMap', + r'()Ljava/util/Map;', + ); + + static final _getStringMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getStringMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getStringMap() { + return _getStringMap( + reference.pointer, _id_getStringMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_getIntMap = _class.instanceMethodId( + r'getIntMap', + r'()Ljava/util/Map;', + ); + + static final _getIntMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getIntMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getIntMap() { + return _getIntMap(reference.pointer, _id_getIntMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_getEnumMap = _class.instanceMethodId( + r'getEnumMap', + r'()Ljava/util/Map;', + ); + + static final _getEnumMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getEnumMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getEnumMap() { + return _getEnumMap(reference.pointer, _id_getEnumMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_getObjectMap = _class.instanceMethodId( + r'getObjectMap', + r'()Ljava/util/Map;', + ); + + static final _getObjectMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getObjectMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getObjectMap() { + return _getObjectMap( + reference.pointer, _id_getObjectMap as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_getListMap = _class.instanceMethodId( + r'getListMap', + r'()Ljava/util/Map;', + ); + + static final _getListMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> getListMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? getListMap() { + return _getListMap(reference.pointer, _id_getListMap as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_getMapMap = _class.instanceMethodId( + r'getMapMap', + r'()Ljava/util/Map;', + ); + + static final _getMapMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> getMapMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + getMapMap() { + return _getMapMap(reference.pointer, _id_getMapMap as jni$_.JMethodIDPtr) + .object< + jni$_.JMap?>?>( + const jni$_.JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_toList = _class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List toList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList(reference.pointer, _id_toList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_component1 = _class.instanceMethodId( + r'component1', + r'()Ljava/lang/Boolean;', + ); + + static final _component1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Boolean component1()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? component1() { + return _component1(reference.pointer, _id_component1 as jni$_.JMethodIDPtr) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_component2 = _class.instanceMethodId( + r'component2', + r'()Ljava/lang/Long;', + ); + + static final _component2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long component2()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component2() { + return _component2(reference.pointer, _id_component2 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_component3 = _class.instanceMethodId( + r'component3', + r'()Ljava/lang/Long;', + ); + + static final _component3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Long component3()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLong? component3() { + return _component3(reference.pointer, _id_component3 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongNullableType()); + } + + static final _id_component4 = _class.instanceMethodId( + r'component4', + r'()Ljava/lang/Double;', + ); + + static final _component4 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Double component4()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDouble? component4() { + return _component4(reference.pointer, _id_component4 as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleNullableType()); + } + + static final _id_component5 = _class.instanceMethodId( + r'component5', + r'()[B', + ); + + static final _component5 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final byte[] component5()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JByteArray? component5() { + return _component5(reference.pointer, _id_component5 as jni$_.JMethodIDPtr) + .object(const jni$_.JByteArrayNullableType()); + } + + static final _id_component6 = _class.instanceMethodId( + r'component6', + r'()[I', + ); + + static final _component6 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int[] component6()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JIntArray? component6() { + return _component6(reference.pointer, _id_component6 as jni$_.JMethodIDPtr) + .object(const jni$_.JIntArrayNullableType()); + } + + static final _id_component7 = _class.instanceMethodId( + r'component7', + r'()[J', + ); + + static final _component7 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final long[] component7()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JLongArray? component7() { + return _component7(reference.pointer, _id_component7 as jni$_.JMethodIDPtr) + .object(const jni$_.JLongArrayNullableType()); + } + + static final _id_component8 = _class.instanceMethodId( + r'component8', + r'()[D', + ); + + static final _component8 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final double[] component8()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JDoubleArray? component8() { + return _component8(reference.pointer, _id_component8 as jni$_.JMethodIDPtr) + .object(const jni$_.JDoubleArrayNullableType()); + } + + static final _id_component9 = _class.instanceMethodId( + r'component9', + r'()LJniAnEnum;', + ); + + static final _component9 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnEnum component9()` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum? component9() { + return _component9(reference.pointer, _id_component9 as jni$_.JMethodIDPtr) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_component10 = _class.instanceMethodId( + r'component10', + r'()LJniAnotherEnum;', + ); + + static final _component10 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAnotherEnum component10()` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum? component10() { + return _component10( + reference.pointer, _id_component10 as jni$_.JMethodIDPtr) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_component11 = _class.instanceMethodId( + r'component11', + r'()Ljava/lang/String;', + ); + + static final _component11 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.String component11()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? component11() { + return _component11( + reference.pointer, _id_component11 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_component12 = _class.instanceMethodId( + r'component12', + r'()Ljava/lang/Object;', + ); + + static final _component12 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.lang.Object component12()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? component12() { + return _component12( + reference.pointer, _id_component12 as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_component13 = _class.instanceMethodId( + r'component13', + r'()Ljava/util/List;', + ); + + static final _component13 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component13()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component13() { + return _component13( + reference.pointer, _id_component13 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_component14 = _class.instanceMethodId( + r'component14', + r'()Ljava/util/List;', + ); + + static final _component14 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component14()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component14() { + return _component14( + reference.pointer, _id_component14 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JStringNullableType())); + } + + static final _id_component15 = _class.instanceMethodId( + r'component15', + r'()Ljava/util/List;', + ); + + static final _component15 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component15()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component15() { + return _component15( + reference.pointer, _id_component15 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JLongNullableType())); + } + + static final _id_component16 = _class.instanceMethodId( + r'component16', + r'()Ljava/util/List;', + ); + + static final _component16 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component16()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component16() { + return _component16( + reference.pointer, _id_component16 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JDoubleNullableType())); + } + + static final _id_component17 = _class.instanceMethodId( + r'component17', + r'()Ljava/util/List;', + ); + + static final _component17 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component17()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component17() { + return _component17( + reference.pointer, _id_component17 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JBooleanNullableType())); + } + + static final _id_component18 = _class.instanceMethodId( + r'component18', + r'()Ljava/util/List;', + ); + + static final _component18 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component18()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component18() { + return _component18( + reference.pointer, _id_component18 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAnEnum$NullableType())); + } + + static final _id_component19 = _class.instanceMethodId( + r'component19', + r'()Ljava/util/List;', + ); + + static final _component19 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component19()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component19() { + return _component19( + reference.pointer, _id_component19 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + jni$_.JObjectNullableType())); + } + + static final _id_component20 = _class.instanceMethodId( + r'component20', + r'()Ljava/util/List;', + ); + + static final _component20 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> component20()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component20() { + return _component20( + reference.pointer, _id_component20 as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_.JListNullableType?>( + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_component21 = _class.instanceMethodId( + r'component21', + r'()Ljava/util/List;', + ); + + static final _component21 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List> component21()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList?>? component21() { + return _component21( + reference.pointer, _id_component21 as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JListNullableType?>( + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_component22 = _class.instanceMethodId( + r'component22', + r'()Ljava/util/Map;', + ); + + static final _component22 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component22()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component22() { + return _component22( + reference.pointer, _id_component22 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectType(), jni$_.JObjectNullableType())); + } + + static final _id_component23 = _class.instanceMethodId( + r'component23', + r'()Ljava/util/Map;', + ); + + static final _component23 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component23()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component23() { + return _component23( + reference.pointer, _id_component23 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JStringNullableType())); + } + + static final _id_component24 = _class.instanceMethodId( + r'component24', + r'()Ljava/util/Map;', + ); + + static final _component24 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component24()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component24() { + return _component24( + reference.pointer, _id_component24 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), jni$_.JLongNullableType())); + } + + static final _id_component25 = _class.instanceMethodId( + r'component25', + r'()Ljava/util/Map;', + ); + + static final _component25 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component25()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component25() { + return _component25( + reference.pointer, _id_component25 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + $JniAnEnum$NullableType(), $JniAnEnum$NullableType())); + } + + static final _id_component26 = _class.instanceMethodId( + r'component26', + r'()Ljava/util/Map;', + ); + + static final _component26 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component26()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component26() { + return _component26( + reference.pointer, _id_component26 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_component27 = _class.instanceMethodId( + r'component27', + r'()Ljava/util/Map;', + ); + + static final _component27 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> component27()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? component27() { + return _component27( + reference.pointer, _id_component27 as jni$_.JMethodIDPtr) + .object?>?>( + const jni$_ + .JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JListNullableType( + jni$_.JObjectNullableType()))); + } + + static final _id_component28 = _class.instanceMethodId( + r'component28', + r'()Ljava/util/Map;', + ); + + static final _component28 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map> component28()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap?>? + component28() { + return _component28(reference.pointer, _id_component28 as jni$_.JMethodIDPtr) + .object< + jni$_.JMap?>?>(const jni$_ + .JMapNullableType?>( + jni$_.JLongNullableType(), + jni$_.JMapNullableType( + jni$_.JObjectNullableType(), jni$_.JObjectNullableType()))); + } + + static final _id_copy = _class.instanceMethodId( + r'copy', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLJniAnEnum;LJniAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)LJniAllNullableTypesWithoutRecursion;', + ); + + static final _copy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public final JniAllNullableTypesWithoutRecursion copy(java.lang.Boolean boolean, java.lang.Long long, java.lang.Long long1, java.lang.Double double, byte[] bs, int[] is, long[] js, double[] ds, JniAnEnum jniAnEnum, JniAnotherEnum jniAnotherEnum, java.lang.String string, java.lang.Object object, java.util.List list, java.util.List list1, java.util.List list2, java.util.List list3, java.util.List list4, java.util.List list5, java.util.List list6, java.util.List list7, java.util.List list8, java.util.Map map, java.util.Map map1, java.util.Map map2, java.util.Map map3, java.util.Map map4, java.util.Map map5, java.util.Map map6)` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion copy( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + JniAnEnum? jniAnEnum, + JniAnotherEnum? jniAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JList? list2, + jni$_.JList? list3, + jni$_.JList? list4, + jni$_.JList? list5, + jni$_.JList? list6, + jni$_.JList?>? list7, + jni$_.JList?>? list8, + jni$_.JMap? map, + jni$_.JMap? map1, + jni$_.JMap? map2, + jni$_.JMap? map3, + jni$_.JMap? map4, + jni$_.JMap?>? map5, + jni$_.JMap?>? map6, + ) { + final _$boolean = boolean?.reference ?? jni$_.jNullReference; + final _$long = long?.reference ?? jni$_.jNullReference; + final _$long1 = long1?.reference ?? jni$_.jNullReference; + final _$double = double?.reference ?? jni$_.jNullReference; + final _$bs = bs?.reference ?? jni$_.jNullReference; + final _$is$ = is$?.reference ?? jni$_.jNullReference; + final _$js = js?.reference ?? jni$_.jNullReference; + final _$ds = ds?.reference ?? jni$_.jNullReference; + final _$jniAnEnum = jniAnEnum?.reference ?? jni$_.jNullReference; + final _$jniAnotherEnum = jniAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$list2 = list2?.reference ?? jni$_.jNullReference; + final _$list3 = list3?.reference ?? jni$_.jNullReference; + final _$list4 = list4?.reference ?? jni$_.jNullReference; + final _$list5 = list5?.reference ?? jni$_.jNullReference; + final _$list6 = list6?.reference ?? jni$_.jNullReference; + final _$list7 = list7?.reference ?? jni$_.jNullReference; + final _$list8 = list8?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$map2 = map2?.reference ?? jni$_.jNullReference; + final _$map3 = map3?.reference ?? jni$_.jNullReference; + final _$map4 = map4?.reference ?? jni$_.jNullReference; + final _$map5 = map5?.reference ?? jni$_.jNullReference; + final _$map6 = map6?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy as jni$_.JMethodIDPtr, + _$boolean.pointer, + _$long.pointer, + _$long1.pointer, + _$double.pointer, + _$bs.pointer, + _$is$.pointer, + _$js.pointer, + _$ds.pointer, + _$jniAnEnum.pointer, + _$jniAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$list.pointer, + _$list1.pointer, + _$list2.pointer, + _$list3.pointer, + _$list4.pointer, + _$list5.pointer, + _$list6.pointer, + _$list7.pointer, + _$list8.pointer, + _$map.pointer, + _$map1.pointer, + _$map2.pointer, + _$map3.pointer, + _$map4.pointer, + _$map5.pointer, + _$map6.pointer) + .object( + const $JniAllNullableTypesWithoutRecursion$Type()); + } + + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String toString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); + } + + static final _id_new$2 = _class.constructorId( + r'()V', + ); + + static final _new$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllNullableTypesWithoutRecursion.new$2() { + return JniAllNullableTypesWithoutRecursion.fromReference( + _new$2(_class.reference.pointer, _id_new$2 as jni$_.JMethodIDPtr) + .reference); + } +} + +final class $JniAllNullableTypesWithoutRecursion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypesWithoutRecursion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypesWithoutRecursion;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypesWithoutRecursion? fromReference( + jni$_.JReference reference) => + reference.isNull + ? null + : JniAllNullableTypesWithoutRecursion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => + ($JniAllNullableTypesWithoutRecursion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == + ($JniAllNullableTypesWithoutRecursion$NullableType) && + other is $JniAllNullableTypesWithoutRecursion$NullableType; + } +} + +final class $JniAllNullableTypesWithoutRecursion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAllNullableTypesWithoutRecursion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllNullableTypesWithoutRecursion;'; + + @jni$_.internal + @core$_.override + JniAllNullableTypesWithoutRecursion fromReference( + jni$_.JReference reference) => + JniAllNullableTypesWithoutRecursion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAllNullableTypesWithoutRecursion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllNullableTypesWithoutRecursion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllNullableTypesWithoutRecursion$Type) && + other is $JniAllNullableTypesWithoutRecursion$Type; + } +} + +/// from: `JniAllClassesWrapper$Companion` +class JniAllClassesWrapper$Companion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllClassesWrapper$Companion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAllClassesWrapper$Companion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAllClassesWrapper$Companion$NullableType(); + static const type = $JniAllClassesWrapper$Companion$Type(); + static final _id_fromList = _class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)LJniAllClassesWrapper;', + ); + + static final _fromList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public final JniAllClassesWrapper fromList(java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + JniAllClassesWrapper fromList( + jni$_.JList list, + ) { + final _$list = list.reference; + return _fromList(reference.pointer, _id_fromList as jni$_.JMethodIDPtr, + _$list.pointer) + .object(const $JniAllClassesWrapper$Type()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllClassesWrapper$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAllClassesWrapper$Companion.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $JniAllClassesWrapper$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAllClassesWrapper$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllClassesWrapper$Companion;'; + + @jni$_.internal + @core$_.override + JniAllClassesWrapper$Companion? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniAllClassesWrapper$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllClassesWrapper$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == + ($JniAllClassesWrapper$Companion$NullableType) && + other is $JniAllClassesWrapper$Companion$NullableType; + } +} + +final class $JniAllClassesWrapper$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAllClassesWrapper$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllClassesWrapper$Companion;'; + + @jni$_.internal + @core$_.override + JniAllClassesWrapper$Companion fromReference(jni$_.JReference reference) => + JniAllClassesWrapper$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAllClassesWrapper$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllClassesWrapper$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllClassesWrapper$Companion$Type) && + other is $JniAllClassesWrapper$Companion$Type; + } +} + +/// from: `JniAllClassesWrapper` +class JniAllClassesWrapper extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAllClassesWrapper.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAllClassesWrapper'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAllClassesWrapper$NullableType(); + static const type = $JniAllClassesWrapper$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LJniAllClassesWrapper$Companion;', + ); + + /// from: `static public final JniAllClassesWrapper$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static JniAllClassesWrapper$Companion get Companion => + _id_Companion.get(_class, const $JniAllClassesWrapper$Companion$Type()); + + static final _id_new$ = _class.constructorId( + r'(LJniAllNullableTypes;LJniAllNullableTypesWithoutRecursion;LJniAllTypes;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void (JniAllNullableTypes jniAllNullableTypes, JniAllNullableTypesWithoutRecursion jniAllNullableTypesWithoutRecursion, JniAllTypes jniAllTypes, java.util.List list, java.util.List list1, java.util.Map map, java.util.Map map1)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllClassesWrapper( + JniAllNullableTypes jniAllNullableTypes, + JniAllNullableTypesWithoutRecursion? jniAllNullableTypesWithoutRecursion, + JniAllTypes? jniAllTypes, + jni$_.JList list, + jni$_.JList? list1, + jni$_.JMap map, + jni$_.JMap? map1, + ) { + final _$jniAllNullableTypes = jniAllNullableTypes.reference; + final _$jniAllNullableTypesWithoutRecursion = + jniAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$jniAllTypes = jniAllTypes?.reference ?? jni$_.jNullReference; + final _$list = list.reference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$map = map.reference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + return JniAllClassesWrapper.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$jniAllNullableTypes.pointer, + _$jniAllNullableTypesWithoutRecursion.pointer, + _$jniAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(LJniAllNullableTypes;LJniAllNullableTypesWithoutRecursion;LJniAllTypes;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32, + jni$_.Pointer + )>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + int, + jni$_.Pointer)>(); + + /// from: `synthetic public void (JniAllNullableTypes jniAllNullableTypes, JniAllNullableTypesWithoutRecursion jniAllNullableTypesWithoutRecursion, JniAllTypes jniAllTypes, java.util.List list, java.util.List list1, java.util.Map map, java.util.Map map1, int i, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAllClassesWrapper.new$1( + JniAllNullableTypes? jniAllNullableTypes, + JniAllNullableTypesWithoutRecursion? jniAllNullableTypesWithoutRecursion, + JniAllTypes? jniAllTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JMap? map, + jni$_.JMap? map1, + int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$jniAllNullableTypes = + jniAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$jniAllNullableTypesWithoutRecursion = + jniAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$jniAllTypes = jniAllTypes?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$map = map?.reference ?? jni$_.jNullReference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAllClassesWrapper.fromReference(_new$1( + _class.reference.pointer, + _id_new$1 as jni$_.JMethodIDPtr, + _$jniAllNullableTypes.pointer, + _$jniAllNullableTypesWithoutRecursion.pointer, + _$jniAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer, + i, + _$defaultConstructorMarker.pointer) + .reference); + } + + static final _id_getAllNullableTypes = _class.instanceMethodId( + r'getAllNullableTypes', + r'()LJniAllNullableTypes;', + ); + + static final _getAllNullableTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllNullableTypes getAllNullableTypes()` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes getAllNullableTypes() { + return _getAllNullableTypes( + reference.pointer, _id_getAllNullableTypes as jni$_.JMethodIDPtr) + .object(const $JniAllNullableTypes$Type()); + } + + static final _id_getAllNullableTypesWithoutRecursion = + _class.instanceMethodId( + r'getAllNullableTypesWithoutRecursion', + r'()LJniAllNullableTypesWithoutRecursion;', + ); + + static final _getAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllNullableTypesWithoutRecursion getAllNullableTypesWithoutRecursion()` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion? getAllNullableTypesWithoutRecursion() { + return _getAllNullableTypesWithoutRecursion(reference.pointer, + _id_getAllNullableTypesWithoutRecursion as jni$_.JMethodIDPtr) + .object( + const $JniAllNullableTypesWithoutRecursion$NullableType()); + } + + static final _id_getAllTypes = _class.instanceMethodId( + r'getAllTypes', + r'()LJniAllTypes;', + ); + + static final _getAllTypes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllTypes getAllTypes()` + /// The returned object must be released after use, by calling the [release] method. + JniAllTypes? getAllTypes() { + return _getAllTypes( + reference.pointer, _id_getAllTypes as jni$_.JMethodIDPtr) + .object(const $JniAllTypes$NullableType()); + } + + static final _id_getClassList = _class.instanceMethodId( + r'getClassList', + r'()Ljava/util/List;', + ); + + static final _getClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getClassList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList getClassList() { + return _getClassList( + reference.pointer, _id_getClassList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType($JniAllTypes$NullableType())); + } + + static final _id_getNullableClassList = _class.instanceMethodId( + r'getNullableClassList', + r'()Ljava/util/List;', + ); + + static final _getNullableClassList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List getNullableClassList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? getNullableClassList() { + return _getNullableClassList( + reference.pointer, _id_getNullableClassList as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypesWithoutRecursion$NullableType())); + } + + static final _id_getClassMap = _class.instanceMethodId( + r'getClassMap', + r'()Ljava/util/Map;', + ); + + static final _getClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getClassMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap getClassMap() { + return _getClassMap( + reference.pointer, _id_getClassMap as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JLongNullableType(), $JniAllTypes$NullableType())); + } + + static final _id_getNullableClassMap = _class.instanceMethodId( + r'getNullableClassMap', + r'()Ljava/util/Map;', + ); + + static final _getNullableClassMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map getNullableClassMap()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? + getNullableClassMap() { + return _getNullableClassMap( + reference.pointer, _id_getNullableClassMap as jni$_.JMethodIDPtr) + .object< + jni$_ + .JMap?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), + $JniAllNullableTypesWithoutRecursion$NullableType())); + } + + static final _id_toList = _class.instanceMethodId( + r'toList', + r'()Ljava/util/List;', + ); + + static final _toList = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List toList()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList toList() { + return _toList(reference.pointer, _id_toList as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType(jni$_.JObjectNullableType())); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_component1 = _class.instanceMethodId( + r'component1', + r'()LJniAllNullableTypes;', + ); + + static final _component1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllNullableTypes component1()` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypes component1() { + return _component1(reference.pointer, _id_component1 as jni$_.JMethodIDPtr) + .object(const $JniAllNullableTypes$Type()); + } + + static final _id_component2 = _class.instanceMethodId( + r'component2', + r'()LJniAllNullableTypesWithoutRecursion;', + ); + + static final _component2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllNullableTypesWithoutRecursion component2()` + /// The returned object must be released after use, by calling the [release] method. + JniAllNullableTypesWithoutRecursion? component2() { + return _component2(reference.pointer, _id_component2 as jni$_.JMethodIDPtr) + .object( + const $JniAllNullableTypesWithoutRecursion$NullableType()); + } + + static final _id_component3 = _class.instanceMethodId( + r'component3', + r'()LJniAllTypes;', + ); + + static final _component3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final JniAllTypes component3()` + /// The returned object must be released after use, by calling the [release] method. + JniAllTypes? component3() { + return _component3(reference.pointer, _id_component3 as jni$_.JMethodIDPtr) + .object(const $JniAllTypes$NullableType()); + } + + static final _id_component4 = _class.instanceMethodId( + r'component4', + r'()Ljava/util/List;', + ); + + static final _component4 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component4()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList component4() { + return _component4(reference.pointer, _id_component4 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JListType($JniAllTypes$NullableType())); + } + + static final _id_component5 = _class.instanceMethodId( + r'component5', + r'()Ljava/util/List;', + ); + + static final _component5 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.List component5()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JList? component5() { + return _component5(reference.pointer, _id_component5 as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JListNullableType( + $JniAllNullableTypesWithoutRecursion$NullableType())); + } + + static final _id_component6 = _class.instanceMethodId( + r'component6', + r'()Ljava/util/Map;', + ); + + static final _component6 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component6()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap component6() { + return _component6(reference.pointer, _id_component6 as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JLongNullableType(), $JniAllTypes$NullableType())); + } + + static final _id_component7 = _class.instanceMethodId( + r'component7', + r'()Ljava/util/Map;', + ); + + static final _component7 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final java.util.Map component7()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? component7() { + return _component7(reference.pointer, _id_component7 as jni$_.JMethodIDPtr) + .object< + jni$_ + .JMap?>( + const jni$_.JMapNullableType( + jni$_.JLongNullableType(), + $JniAllNullableTypesWithoutRecursion$NullableType())); + } + + static final _id_copy = _class.instanceMethodId( + r'copy', + r'(LJniAllNullableTypes;LJniAllNullableTypesWithoutRecursion;LJniAllTypes;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)LJniAllClassesWrapper;', + ); + + static final _copy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public final JniAllClassesWrapper copy(JniAllNullableTypes jniAllNullableTypes, JniAllNullableTypesWithoutRecursion jniAllNullableTypesWithoutRecursion, JniAllTypes jniAllTypes, java.util.List list, java.util.List list1, java.util.Map map, java.util.Map map1)` + /// The returned object must be released after use, by calling the [release] method. + JniAllClassesWrapper copy( + JniAllNullableTypes jniAllNullableTypes, + JniAllNullableTypesWithoutRecursion? jniAllNullableTypesWithoutRecursion, + JniAllTypes? jniAllTypes, + jni$_.JList list, + jni$_.JList? list1, + jni$_.JMap map, + jni$_.JMap? map1, + ) { + final _$jniAllNullableTypes = jniAllNullableTypes.reference; + final _$jniAllNullableTypesWithoutRecursion = + jniAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$jniAllTypes = jniAllTypes?.reference ?? jni$_.jNullReference; + final _$list = list.reference; + final _$list1 = list1?.reference ?? jni$_.jNullReference; + final _$map = map.reference; + final _$map1 = map1?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy as jni$_.JMethodIDPtr, + _$jniAllNullableTypes.pointer, + _$jniAllNullableTypesWithoutRecursion.pointer, + _$jniAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer) + .object(const $JniAllClassesWrapper$Type()); + } + + static final _id_toString$1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String toString()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as jni$_.JMethodIDPtr) + .object(const jni$_.JStringType()); + } +} + +final class $JniAllClassesWrapper$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAllClassesWrapper$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllClassesWrapper;'; + + @jni$_.internal + @core$_.override + JniAllClassesWrapper? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniAllClassesWrapper.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllClassesWrapper$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllClassesWrapper$NullableType) && + other is $JniAllClassesWrapper$NullableType; + } +} + +final class $JniAllClassesWrapper$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAllClassesWrapper$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAllClassesWrapper;'; + + @jni$_.internal + @core$_.override + JniAllClassesWrapper fromReference(jni$_.JReference reference) => + JniAllClassesWrapper.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAllClassesWrapper$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAllClassesWrapper$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAllClassesWrapper$Type) && + other is $JniAllClassesWrapper$Type; + } +} + +/// from: `JniAnEnum$Companion` +class JniAnEnum$Companion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAnEnum$Companion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAnEnum$Companion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAnEnum$Companion$NullableType(); + static const type = $JniAnEnum$Companion$Type(); + static final _id_ofRaw = _class.instanceMethodId( + r'ofRaw', + r'(I)LJniAnEnum;', + ); + + static final _ofRaw = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public final JniAnEnum ofRaw(int i)` + /// The returned object must be released after use, by calling the [release] method. + JniAnEnum? ofRaw( + int i, + ) { + return _ofRaw(reference.pointer, _id_ofRaw as jni$_.JMethodIDPtr, i) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAnEnum$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAnEnum$Companion.fromReference(_new$(_class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $JniAnEnum$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAnEnum$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnEnum$Companion;'; + + @jni$_.internal + @core$_.override + JniAnEnum$Companion? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniAnEnum$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnEnum$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnEnum$Companion$NullableType) && + other is $JniAnEnum$Companion$NullableType; + } +} + +final class $JniAnEnum$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAnEnum$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnEnum$Companion;'; + + @jni$_.internal + @core$_.override + JniAnEnum$Companion fromReference(jni$_.JReference reference) => + JniAnEnum$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAnEnum$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnEnum$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnEnum$Companion$Type) && + other is $JniAnEnum$Companion$Type; + } +} + +/// from: `JniAnEnum` +class JniAnEnum extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAnEnum.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAnEnum'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAnEnum$NullableType(); + static const type = $JniAnEnum$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LJniAnEnum$Companion;', + ); + + /// from: `static public final JniAnEnum$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static JniAnEnum$Companion get Companion => + _id_Companion.get(_class, const $JniAnEnum$Companion$Type()); + + static final _id_ONE = _class.staticFieldId( + r'ONE', + r'LJniAnEnum;', + ); + + /// from: `static public final JniAnEnum ONE` + /// The returned object must be released after use, by calling the [release] method. + static JniAnEnum get ONE => _id_ONE.get(_class, const $JniAnEnum$Type()); + + static final _id_TWO = _class.staticFieldId( + r'TWO', + r'LJniAnEnum;', + ); + + /// from: `static public final JniAnEnum TWO` + /// The returned object must be released after use, by calling the [release] method. + static JniAnEnum get TWO => _id_TWO.get(_class, const $JniAnEnum$Type()); + + static final _id_THREE = _class.staticFieldId( + r'THREE', + r'LJniAnEnum;', + ); + + /// from: `static public final JniAnEnum THREE` + /// The returned object must be released after use, by calling the [release] method. + static JniAnEnum get THREE => _id_THREE.get(_class, const $JniAnEnum$Type()); + + static final _id_FORTY_TWO = _class.staticFieldId( + r'FORTY_TWO', + r'LJniAnEnum;', + ); + + /// from: `static public final JniAnEnum FORTY_TWO` + /// The returned object must be released after use, by calling the [release] method. + static JniAnEnum get FORTY_TWO => + _id_FORTY_TWO.get(_class, const $JniAnEnum$Type()); + + static final _id_FOUR_HUNDRED_TWENTY_TWO = _class.staticFieldId( + r'FOUR_HUNDRED_TWENTY_TWO', + r'LJniAnEnum;', + ); + + /// from: `static public final JniAnEnum FOUR_HUNDRED_TWENTY_TWO` + /// The returned object must be released after use, by calling the [release] method. + static JniAnEnum get FOUR_HUNDRED_TWENTY_TWO => + _id_FOUR_HUNDRED_TWENTY_TWO.get(_class, const $JniAnEnum$Type()); + + static final _id_getRaw = _class.instanceMethodId( + r'getRaw', + r'()I', + ); + + static final _getRaw = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int getRaw()` + int getRaw() { + return _getRaw(reference.pointer, _id_getRaw as jni$_.JMethodIDPtr).integer; + } + + static final _id_values = _class.staticMethodId( + r'values', + r'()[LJniAnEnum;', + ); + + static final _values = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public JniAnEnum[] values()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JArray? values() { + return _values(_class.reference.pointer, _id_values as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JArrayNullableType( + $JniAnEnum$NullableType())); + } + + static final _id_valueOf = _class.staticMethodId( + r'valueOf', + r'(Ljava/lang/String;)LJniAnEnum;', + ); + + static final _valueOf = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public JniAnEnum valueOf(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static JniAnEnum? valueOf( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _valueOf(_class.reference.pointer, _id_valueOf as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $JniAnEnum$NullableType()); + } + + static final _id_getEntries = _class.staticMethodId( + r'getEntries', + r'()Lkotlin/enums/EnumEntries;', + ); + + static final _getEntries = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public kotlin.enums.EnumEntries getEntries()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject getEntries() { + return _getEntries( + _class.reference.pointer, _id_getEntries as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } +} + +final class $JniAnEnum$NullableType extends jni$_.JObjType { + @jni$_.internal + const $JniAnEnum$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnEnum;'; + + @jni$_.internal + @core$_.override + JniAnEnum? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : JniAnEnum.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnEnum$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnEnum$NullableType) && + other is $JniAnEnum$NullableType; + } +} + +final class $JniAnEnum$Type extends jni$_.JObjType { + @jni$_.internal + const $JniAnEnum$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnEnum;'; + + @jni$_.internal + @core$_.override + JniAnEnum fromReference(jni$_.JReference reference) => + JniAnEnum.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAnEnum$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnEnum$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnEnum$Type) && other is $JniAnEnum$Type; + } +} + +/// from: `JniAnotherEnum$Companion` +class JniAnotherEnum$Companion extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAnotherEnum$Companion.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAnotherEnum$Companion'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAnotherEnum$Companion$NullableType(); + static const type = $JniAnotherEnum$Companion$Type(); + static final _id_ofRaw = _class.instanceMethodId( + r'ofRaw', + r'(I)LJniAnotherEnum;', + ); + + static final _ofRaw = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public final JniAnotherEnum ofRaw(int i)` + /// The returned object must be released after use, by calling the [release] method. + JniAnotherEnum? ofRaw( + int i, + ) { + return _ofRaw(reference.pointer, _id_ofRaw as jni$_.JMethodIDPtr, i) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_new$ = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` + /// The returned object must be released after use, by calling the [release] method. + factory JniAnotherEnum$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = + defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return JniAnotherEnum$Companion.fromReference(_new$( + _class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, + _$defaultConstructorMarker.pointer) + .reference); + } +} + +final class $JniAnotherEnum$Companion$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAnotherEnum$Companion$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnotherEnum$Companion;'; + + @jni$_.internal + @core$_.override + JniAnotherEnum$Companion? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : JniAnotherEnum$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnotherEnum$Companion$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnotherEnum$Companion$NullableType) && + other is $JniAnotherEnum$Companion$NullableType; + } +} + +final class $JniAnotherEnum$Companion$Type + extends jni$_.JObjType { + @jni$_.internal + const $JniAnotherEnum$Companion$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnotherEnum$Companion;'; + + @jni$_.internal + @core$_.override + JniAnotherEnum$Companion fromReference(jni$_.JReference reference) => + JniAnotherEnum$Companion.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAnotherEnum$Companion$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnotherEnum$Companion$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnotherEnum$Companion$Type) && + other is $JniAnotherEnum$Companion$Type; + } +} + +/// from: `JniAnotherEnum` +class JniAnotherEnum extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + JniAnotherEnum.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'JniAnotherEnum'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $JniAnotherEnum$NullableType(); + static const type = $JniAnotherEnum$Type(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'LJniAnotherEnum$Companion;', + ); + + /// from: `static public final JniAnotherEnum$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static JniAnotherEnum$Companion get Companion => + _id_Companion.get(_class, const $JniAnotherEnum$Companion$Type()); + + static final _id_JUST_IN_CASE = _class.staticFieldId( + r'JUST_IN_CASE', + r'LJniAnotherEnum;', + ); + + /// from: `static public final JniAnotherEnum JUST_IN_CASE` + /// The returned object must be released after use, by calling the [release] method. + static JniAnotherEnum get JUST_IN_CASE => + _id_JUST_IN_CASE.get(_class, const $JniAnotherEnum$Type()); + + static final _id_getRaw = _class.instanceMethodId( + r'getRaw', + r'()I', + ); + + static final _getRaw = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public final int getRaw()` + int getRaw() { + return _getRaw(reference.pointer, _id_getRaw as jni$_.JMethodIDPtr).integer; + } + + static final _id_values = _class.staticMethodId( + r'values', + r'()[LJniAnotherEnum;', + ); + + static final _values = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public JniAnotherEnum[] values()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JArray? values() { + return _values(_class.reference.pointer, _id_values as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JArrayNullableType( + $JniAnotherEnum$NullableType())); + } + + static final _id_valueOf = _class.staticMethodId( + r'valueOf', + r'(Ljava/lang/String;)LJniAnotherEnum;', + ); + + static final _valueOf = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public JniAnotherEnum valueOf(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static JniAnotherEnum? valueOf( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _valueOf(_class.reference.pointer, _id_valueOf as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $JniAnotherEnum$NullableType()); + } + + static final _id_getEntries = _class.staticMethodId( + r'getEntries', + r'()Lkotlin/enums/EnumEntries;', + ); + + static final _getEntries = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public kotlin.enums.EnumEntries getEntries()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject getEntries() { + return _getEntries( + _class.reference.pointer, _id_getEntries as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } +} + +final class $JniAnotherEnum$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $JniAnotherEnum$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnotherEnum;'; + + @jni$_.internal + @core$_.override + JniAnotherEnum? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : JniAnotherEnum.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => this; + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnotherEnum$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnotherEnum$NullableType) && + other is $JniAnotherEnum$NullableType; + } +} + +final class $JniAnotherEnum$Type extends jni$_.JObjType { + @jni$_.internal + const $JniAnotherEnum$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'LJniAnotherEnum;'; + + @jni$_.internal + @core$_.override + JniAnotherEnum fromReference(jni$_.JReference reference) => + JniAnotherEnum.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $JniAnotherEnum$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($JniAnotherEnum$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($JniAnotherEnum$Type) && + other is $JniAnotherEnum$Type; + } +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart index d25c97ce375..88b8f3aa973 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/message.gen.dart @@ -40,7 +40,7 @@ List wrapResponse( enum MessageRequestState { pending, success, - failure, + failure; } /// This comment is to test class documentation comments. diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart index 3ebff9c56bd..da8ab23b7bd 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/non_null_fields.gen.dart @@ -48,7 +48,7 @@ bool _deepEquals(Object? a, Object? b) { enum ReplyType { success, - error, + error; } class NonNullFieldSearchRequest { diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart index b281a87d9c3..3d7b53dc327 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/null_fields.gen.dart @@ -48,7 +48,7 @@ bool _deepEquals(Object? a, Object? b) { enum NullFieldsSearchReplyType { success, - failure, + failure; } class NullFieldsSearchRequest { diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart index 227b6792179..44f00344c03 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/proxy_api_tests.gen.dart @@ -413,7 +413,7 @@ class _PigeonInternalProxyApiBaseCodec extends _PigeonCodec { enum ProxyApiTestEnum { one, two, - three, + three; } class _PigeonCodec extends StandardMessageCodec { diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml b/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml index a345c4c7d30..63845dfd15f 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml @@ -18,4 +18,9 @@ dependencies: sdk: flutter integration_test: sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 735250a19b1a429869bfacccba833ecc93db34b6 mockito: ^5.4.4 diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore index bbe6aef544f..debb3751da5 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/.gitignore @@ -5,9 +5,10 @@ !TestPlugin.kt !CoreTests.gen.kt # This contains the declaration of the test classes wrapped by the ProxyApi tests and the -# implemetations of their APIs. +# implementations of their APIs. !ProxyApiTestApiImpls.kt # Including these makes it easier to review code generation changes. !ProxyApiTests.gen.kt !EventChannelTests.gen.kt +!jniTests.gen.kt \ No newline at end of file diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/JniTests.gen.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/JniTests.gen.kt new file mode 100644 index 00000000000..9cc55d33842 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/JniTests.gen.kt @@ -0,0 +1,2367 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon +@file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") + +import androidx.annotation.Keep + +/** + * Error class for passing custom error details to Flutter via a thrown PlatformException. + * + * @property code The error code. + * @property message The error message. + * @property details The error details. Must be a datatype supported by the api codec. + */ +class JniTestsError( + val code: String, + override val message: String? = null, + val details: Any? = null +) : Throwable() + +private fun deepEqualsJniTests(a: Any?, b: Any?): Boolean { + if (a is ByteArray && b is ByteArray) { + return a.contentEquals(b) + } + if (a is IntArray && b is IntArray) { + return a.contentEquals(b) + } + if (a is LongArray && b is LongArray) { + return a.contentEquals(b) + } + if (a is DoubleArray && b is DoubleArray) { + return a.contentEquals(b) + } + if (a is Array<*> && b is Array<*>) { + return a.size == b.size && a.indices.all { deepEqualsJniTests(a[it], b[it]) } + } + if (a is Map<*, *> && b is Map<*, *>) { + return a.size == b.size && + a.keys.all { (b as Map).containsKey(it) && deepEqualsJniTests(a[it], b[it]) } + } + return a == b +} + +enum class JniAnEnum(val raw: Int) { + ONE(0), + TWO(1), + THREE(2), + FORTY_TWO(3), + FOUR_HUNDRED_TWENTY_TWO(4); + + companion object { + fun ofRaw(raw: Int): JniAnEnum? { + return values().firstOrNull { it.raw == raw } + } + } +} + +enum class JniAnotherEnum(val raw: Int) { + JUST_IN_CASE(0); + + companion object { + fun ofRaw(raw: Int): JniAnotherEnum? { + return values().firstOrNull { it.raw == raw } + } + } +} + +/** Generated class from Pigeon that represents data sent in messages. */ +data class JniUnusedClass(val aField: Any? = null) { + companion object { + fun fromList(pigeonVar_list: List): JniUnusedClass { + val aField = pigeonVar_list[0] + return JniUnusedClass(aField) + } + } + + fun toList(): List { + return listOf( + aField, + ) + } + + override fun equals(other: Any?): Boolean { + if (other !is JniUnusedClass) { + return false + } + if (this === other) { + return true + } + return aField == other.aField + } + + override fun hashCode(): Int = toList().hashCode() +} + +/** + * A class containing all supported types. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class JniAllTypes( + val aBool: Boolean, + val anInt: Long, + val anInt64: Long, + val aDouble: Double, + val aByteArray: ByteArray, + val a4ByteArray: IntArray, + val a8ByteArray: LongArray, + val aFloatArray: DoubleArray, + val anEnum: JniAnEnum, + val anotherEnum: JniAnotherEnum, + val aString: String, + val anObject: Any, + val list: List, + val stringList: List, + val intList: List, + val doubleList: List, + val boolList: List, + val enumList: List, + val objectList: List, + val listList: List>, + val mapList: List>, + val map: Map, + val stringMap: Map, + val intMap: Map, + val enumMap: Map, + val objectMap: Map, + val listMap: Map>, + val mapMap: Map> +) { + companion object { + fun fromList(pigeonVar_list: List): JniAllTypes { + val aBool = pigeonVar_list[0] as Boolean + val anInt = pigeonVar_list[1] as Long + val anInt64 = pigeonVar_list[2] as Long + val aDouble = pigeonVar_list[3] as Double + val aByteArray = pigeonVar_list[4] as ByteArray + val a4ByteArray = pigeonVar_list[5] as IntArray + val a8ByteArray = pigeonVar_list[6] as LongArray + val aFloatArray = pigeonVar_list[7] as DoubleArray + val anEnum = pigeonVar_list[8] as JniAnEnum + val anotherEnum = pigeonVar_list[9] as JniAnotherEnum + val aString = pigeonVar_list[10] as String + val anObject = pigeonVar_list[11] as Any + val list = pigeonVar_list[12] as List + val stringList = pigeonVar_list[13] as List + val intList = pigeonVar_list[14] as List + val doubleList = pigeonVar_list[15] as List + val boolList = pigeonVar_list[16] as List + val enumList = pigeonVar_list[17] as List + val objectList = pigeonVar_list[18] as List + val listList = pigeonVar_list[19] as List> + val mapList = pigeonVar_list[20] as List> + val map = pigeonVar_list[21] as Map + val stringMap = pigeonVar_list[22] as Map + val intMap = pigeonVar_list[23] as Map + val enumMap = pigeonVar_list[24] as Map + val objectMap = pigeonVar_list[25] as Map + val listMap = pigeonVar_list[26] as Map> + val mapMap = pigeonVar_list[27] as Map> + return JniAllTypes( + aBool, + anInt, + anInt64, + aDouble, + aByteArray, + a4ByteArray, + a8ByteArray, + aFloatArray, + anEnum, + anotherEnum, + aString, + anObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap) + } + } + + fun toList(): List { + return listOf( + aBool, + anInt, + anInt64, + aDouble, + aByteArray, + a4ByteArray, + a8ByteArray, + aFloatArray, + anEnum, + anotherEnum, + aString, + anObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other !is JniAllTypes) { + return false + } + if (this === other) { + return true + } + return aBool == other.aBool && + anInt == other.anInt && + anInt64 == other.anInt64 && + aDouble == other.aDouble && + deepEqualsJniTests(aByteArray, other.aByteArray) && + deepEqualsJniTests(a4ByteArray, other.a4ByteArray) && + deepEqualsJniTests(a8ByteArray, other.a8ByteArray) && + deepEqualsJniTests(aFloatArray, other.aFloatArray) && + anEnum == other.anEnum && + anotherEnum == other.anotherEnum && + aString == other.aString && + anObject == other.anObject && + deepEqualsJniTests(list, other.list) && + deepEqualsJniTests(stringList, other.stringList) && + deepEqualsJniTests(intList, other.intList) && + deepEqualsJniTests(doubleList, other.doubleList) && + deepEqualsJniTests(boolList, other.boolList) && + deepEqualsJniTests(enumList, other.enumList) && + deepEqualsJniTests(objectList, other.objectList) && + deepEqualsJniTests(listList, other.listList) && + deepEqualsJniTests(mapList, other.mapList) && + deepEqualsJniTests(map, other.map) && + deepEqualsJniTests(stringMap, other.stringMap) && + deepEqualsJniTests(intMap, other.intMap) && + deepEqualsJniTests(enumMap, other.enumMap) && + deepEqualsJniTests(objectMap, other.objectMap) && + deepEqualsJniTests(listMap, other.listMap) && + deepEqualsJniTests(mapMap, other.mapMap) + } + + override fun hashCode(): Int = toList().hashCode() +} + +/** + * A class containing all supported nullable types. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class JniAllNullableTypes( + val aNullableBool: Boolean? = null, + val aNullableInt: Long? = null, + val aNullableInt64: Long? = null, + val aNullableDouble: Double? = null, + val aNullableByteArray: ByteArray? = null, + val aNullable4ByteArray: IntArray? = null, + val aNullable8ByteArray: LongArray? = null, + val aNullableFloatArray: DoubleArray? = null, + val aNullableEnum: JniAnEnum? = null, + val anotherNullableEnum: JniAnotherEnum? = null, + val aNullableString: String? = null, + val aNullableObject: Any? = null, + val allNullableTypes: JniAllNullableTypes? = null, + val list: List? = null, + val stringList: List? = null, + val intList: List? = null, + val doubleList: List? = null, + val boolList: List? = null, + val enumList: List? = null, + val objectList: List? = null, + val listList: List?>? = null, + val mapList: List?>? = null, + val recursiveClassList: List? = null, + val map: Map? = null, + val stringMap: Map? = null, + val intMap: Map? = null, + val enumMap: Map? = null, + val objectMap: Map? = null, + val listMap: Map?>? = null, + val mapMap: Map?>? = null, + val recursiveClassMap: Map? = null +) { + companion object { + fun fromList(pigeonVar_list: List): JniAllNullableTypes { + val aNullableBool = pigeonVar_list[0] as Boolean? + val aNullableInt = pigeonVar_list[1] as Long? + val aNullableInt64 = pigeonVar_list[2] as Long? + val aNullableDouble = pigeonVar_list[3] as Double? + val aNullableByteArray = pigeonVar_list[4] as ByteArray? + val aNullable4ByteArray = pigeonVar_list[5] as IntArray? + val aNullable8ByteArray = pigeonVar_list[6] as LongArray? + val aNullableFloatArray = pigeonVar_list[7] as DoubleArray? + val aNullableEnum = pigeonVar_list[8] as JniAnEnum? + val anotherNullableEnum = pigeonVar_list[9] as JniAnotherEnum? + val aNullableString = pigeonVar_list[10] as String? + val aNullableObject = pigeonVar_list[11] + val allNullableTypes = pigeonVar_list[12] as JniAllNullableTypes? + val list = pigeonVar_list[13] as List? + val stringList = pigeonVar_list[14] as List? + val intList = pigeonVar_list[15] as List? + val doubleList = pigeonVar_list[16] as List? + val boolList = pigeonVar_list[17] as List? + val enumList = pigeonVar_list[18] as List? + val objectList = pigeonVar_list[19] as List? + val listList = pigeonVar_list[20] as List?>? + val mapList = pigeonVar_list[21] as List?>? + val recursiveClassList = pigeonVar_list[22] as List? + val map = pigeonVar_list[23] as Map? + val stringMap = pigeonVar_list[24] as Map? + val intMap = pigeonVar_list[25] as Map? + val enumMap = pigeonVar_list[26] as Map? + val objectMap = pigeonVar_list[27] as Map? + val listMap = pigeonVar_list[28] as Map?>? + val mapMap = pigeonVar_list[29] as Map?>? + val recursiveClassMap = pigeonVar_list[30] as Map? + return JniAllNullableTypes( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + allNullableTypes, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + recursiveClassList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + recursiveClassMap) + } + } + + fun toList(): List { + return listOf( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + allNullableTypes, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + recursiveClassList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + recursiveClassMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other !is JniAllNullableTypes) { + return false + } + if (this === other) { + return true + } + return aNullableBool == other.aNullableBool && + aNullableInt == other.aNullableInt && + aNullableInt64 == other.aNullableInt64 && + aNullableDouble == other.aNullableDouble && + deepEqualsJniTests(aNullableByteArray, other.aNullableByteArray) && + deepEqualsJniTests(aNullable4ByteArray, other.aNullable4ByteArray) && + deepEqualsJniTests(aNullable8ByteArray, other.aNullable8ByteArray) && + deepEqualsJniTests(aNullableFloatArray, other.aNullableFloatArray) && + aNullableEnum == other.aNullableEnum && + anotherNullableEnum == other.anotherNullableEnum && + aNullableString == other.aNullableString && + aNullableObject == other.aNullableObject && + allNullableTypes == other.allNullableTypes && + deepEqualsJniTests(list, other.list) && + deepEqualsJniTests(stringList, other.stringList) && + deepEqualsJniTests(intList, other.intList) && + deepEqualsJniTests(doubleList, other.doubleList) && + deepEqualsJniTests(boolList, other.boolList) && + deepEqualsJniTests(enumList, other.enumList) && + deepEqualsJniTests(objectList, other.objectList) && + deepEqualsJniTests(listList, other.listList) && + deepEqualsJniTests(mapList, other.mapList) && + deepEqualsJniTests(recursiveClassList, other.recursiveClassList) && + deepEqualsJniTests(map, other.map) && + deepEqualsJniTests(stringMap, other.stringMap) && + deepEqualsJniTests(intMap, other.intMap) && + deepEqualsJniTests(enumMap, other.enumMap) && + deepEqualsJniTests(objectMap, other.objectMap) && + deepEqualsJniTests(listMap, other.listMap) && + deepEqualsJniTests(mapMap, other.mapMap) && + deepEqualsJniTests(recursiveClassMap, other.recursiveClassMap) + } + + override fun hashCode(): Int = toList().hashCode() +} + +/** + * The primary purpose for this class is to ensure coverage of Swift structs with nullable items, as + * the primary [JniAllNullableTypes] class is being used to test Swift classes. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class JniAllNullableTypesWithoutRecursion( + val aNullableBool: Boolean? = null, + val aNullableInt: Long? = null, + val aNullableInt64: Long? = null, + val aNullableDouble: Double? = null, + val aNullableByteArray: ByteArray? = null, + val aNullable4ByteArray: IntArray? = null, + val aNullable8ByteArray: LongArray? = null, + val aNullableFloatArray: DoubleArray? = null, + val aNullableEnum: JniAnEnum? = null, + val anotherNullableEnum: JniAnotherEnum? = null, + val aNullableString: String? = null, + val aNullableObject: Any? = null, + val list: List? = null, + val stringList: List? = null, + val intList: List? = null, + val doubleList: List? = null, + val boolList: List? = null, + val enumList: List? = null, + val objectList: List? = null, + val listList: List?>? = null, + val mapList: List?>? = null, + val map: Map? = null, + val stringMap: Map? = null, + val intMap: Map? = null, + val enumMap: Map? = null, + val objectMap: Map? = null, + val listMap: Map?>? = null, + val mapMap: Map?>? = null +) { + companion object { + fun fromList(pigeonVar_list: List): JniAllNullableTypesWithoutRecursion { + val aNullableBool = pigeonVar_list[0] as Boolean? + val aNullableInt = pigeonVar_list[1] as Long? + val aNullableInt64 = pigeonVar_list[2] as Long? + val aNullableDouble = pigeonVar_list[3] as Double? + val aNullableByteArray = pigeonVar_list[4] as ByteArray? + val aNullable4ByteArray = pigeonVar_list[5] as IntArray? + val aNullable8ByteArray = pigeonVar_list[6] as LongArray? + val aNullableFloatArray = pigeonVar_list[7] as DoubleArray? + val aNullableEnum = pigeonVar_list[8] as JniAnEnum? + val anotherNullableEnum = pigeonVar_list[9] as JniAnotherEnum? + val aNullableString = pigeonVar_list[10] as String? + val aNullableObject = pigeonVar_list[11] + val list = pigeonVar_list[12] as List? + val stringList = pigeonVar_list[13] as List? + val intList = pigeonVar_list[14] as List? + val doubleList = pigeonVar_list[15] as List? + val boolList = pigeonVar_list[16] as List? + val enumList = pigeonVar_list[17] as List? + val objectList = pigeonVar_list[18] as List? + val listList = pigeonVar_list[19] as List?>? + val mapList = pigeonVar_list[20] as List?>? + val map = pigeonVar_list[21] as Map? + val stringMap = pigeonVar_list[22] as Map? + val intMap = pigeonVar_list[23] as Map? + val enumMap = pigeonVar_list[24] as Map? + val objectMap = pigeonVar_list[25] as Map? + val listMap = pigeonVar_list[26] as Map?>? + val mapMap = pigeonVar_list[27] as Map?>? + return JniAllNullableTypesWithoutRecursion( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap) + } + } + + fun toList(): List { + return listOf( + aNullableBool, + aNullableInt, + aNullableInt64, + aNullableDouble, + aNullableByteArray, + aNullable4ByteArray, + aNullable8ByteArray, + aNullableFloatArray, + aNullableEnum, + anotherNullableEnum, + aNullableString, + aNullableObject, + list, + stringList, + intList, + doubleList, + boolList, + enumList, + objectList, + listList, + mapList, + map, + stringMap, + intMap, + enumMap, + objectMap, + listMap, + mapMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other !is JniAllNullableTypesWithoutRecursion) { + return false + } + if (this === other) { + return true + } + return aNullableBool == other.aNullableBool && + aNullableInt == other.aNullableInt && + aNullableInt64 == other.aNullableInt64 && + aNullableDouble == other.aNullableDouble && + deepEqualsJniTests(aNullableByteArray, other.aNullableByteArray) && + deepEqualsJniTests(aNullable4ByteArray, other.aNullable4ByteArray) && + deepEqualsJniTests(aNullable8ByteArray, other.aNullable8ByteArray) && + deepEqualsJniTests(aNullableFloatArray, other.aNullableFloatArray) && + aNullableEnum == other.aNullableEnum && + anotherNullableEnum == other.anotherNullableEnum && + aNullableString == other.aNullableString && + aNullableObject == other.aNullableObject && + deepEqualsJniTests(list, other.list) && + deepEqualsJniTests(stringList, other.stringList) && + deepEqualsJniTests(intList, other.intList) && + deepEqualsJniTests(doubleList, other.doubleList) && + deepEqualsJniTests(boolList, other.boolList) && + deepEqualsJniTests(enumList, other.enumList) && + deepEqualsJniTests(objectList, other.objectList) && + deepEqualsJniTests(listList, other.listList) && + deepEqualsJniTests(mapList, other.mapList) && + deepEqualsJniTests(map, other.map) && + deepEqualsJniTests(stringMap, other.stringMap) && + deepEqualsJniTests(intMap, other.intMap) && + deepEqualsJniTests(enumMap, other.enumMap) && + deepEqualsJniTests(objectMap, other.objectMap) && + deepEqualsJniTests(listMap, other.listMap) && + deepEqualsJniTests(mapMap, other.mapMap) + } + + override fun hashCode(): Int = toList().hashCode() +} + +/** + * A class for testing nested class handling. + * + * This is needed to test nested nullable and non-nullable classes, `JniAllNullableTypes` is + * non-nullable here as it is easier to instantiate than `JniAllTypes` when testing doesn't require + * both (ie. testing null classes). + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class JniAllClassesWrapper( + val allNullableTypes: JniAllNullableTypes, + val allNullableTypesWithoutRecursion: JniAllNullableTypesWithoutRecursion? = null, + val allTypes: JniAllTypes? = null, + val classList: List, + val nullableClassList: List? = null, + val classMap: Map, + val nullableClassMap: Map? = null +) { + companion object { + fun fromList(pigeonVar_list: List): JniAllClassesWrapper { + val allNullableTypes = pigeonVar_list[0] as JniAllNullableTypes + val allNullableTypesWithoutRecursion = + pigeonVar_list[1] as JniAllNullableTypesWithoutRecursion? + val allTypes = pigeonVar_list[2] as JniAllTypes? + val classList = pigeonVar_list[3] as List + val nullableClassList = pigeonVar_list[4] as List? + val classMap = pigeonVar_list[5] as Map + val nullableClassMap = pigeonVar_list[6] as Map? + return JniAllClassesWrapper( + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap) + } + } + + fun toList(): List { + return listOf( + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap, + ) + } + + override fun equals(other: Any?): Boolean { + if (other !is JniAllClassesWrapper) { + return false + } + if (this === other) { + return true + } + return allNullableTypes == other.allNullableTypes && + allNullableTypesWithoutRecursion == other.allNullableTypesWithoutRecursion && + allTypes == other.allTypes && + deepEqualsJniTests(classList, other.classList) && + deepEqualsJniTests(nullableClassList, other.nullableClassList) && + deepEqualsJniTests(classMap, other.classMap) && + deepEqualsJniTests(nullableClassMap, other.nullableClassMap) + } + + override fun hashCode(): Int = toList().hashCode() +} + +val JniHostIntegrationCoreApiInstances: MutableMap = + mutableMapOf() + +@Keep +abstract class JniHostIntegrationCoreApi { + /** A no-op function taking no arguments and returning no value, to sanity test basic calling. */ + abstract fun noop() + /** Returns the passed object, to test serialization and deserialization. */ + abstract fun echoAllTypes(everything: JniAllTypes): JniAllTypes + /** Returns an error, to test error handling. */ + abstract fun throwError(): Any? + /** Returns an error from a void function, to test error handling. */ + abstract fun throwErrorFromVoid() + /** Returns a Flutter error, to test error handling. */ + abstract fun throwFlutterError(): Any? + /** Returns passed in int. */ + abstract fun echoInt(anInt: Long): Long + /** Returns passed in double. */ + abstract fun echoDouble(aDouble: Double): Double + /** Returns the passed in boolean. */ + abstract fun echoBool(aBool: Boolean): Boolean + /** Returns the passed in string. */ + abstract fun echoString(aString: String): String + /** Returns the passed in Uint8List. */ + abstract fun echoUint8List(aUint8List: ByteArray): ByteArray + /** Returns the passed in Int32List. */ + abstract fun echoInt32List(aInt32List: IntArray): IntArray + /** Returns the passed in Int64List. */ + abstract fun echoInt64List(aInt64List: LongArray): LongArray + /** Returns the passed in Float64List. */ + abstract fun echoFloat64List(aFloat64List: DoubleArray): DoubleArray + /** Returns the passed in generic Object. */ + abstract fun echoObject(anObject: Any): Any + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoList(list: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoEnumList(enumList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoClassList(classList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNonNullEnumList(enumList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNonNullClassList(classList: List): List + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoMap(map: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoStringMap(stringMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoIntMap(intMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoEnumMap(enumMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoClassMap( + classMap: Map + ): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullStringMap(stringMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullIntMap(intMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullEnumMap(enumMap: Map): Map + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNonNullClassMap( + classMap: Map + ): Map + /** Returns the passed class to test nested class serialization and deserialization. */ + abstract fun echoClassWrapper(wrapper: JniAllClassesWrapper): JniAllClassesWrapper + /** Returns the passed enum to test serialization and deserialization. */ + abstract fun echoEnum(anEnum: JniAnEnum): JniAnEnum + /** Returns the passed enum to test serialization and deserialization. */ + abstract fun echoAnotherEnum(anotherEnum: JniAnotherEnum): JniAnotherEnum + /** Returns the default string. */ + abstract fun echoNamedDefaultString(aString: String): String + /** Returns passed in double. */ + abstract fun echoOptionalDefaultDouble(aDouble: Double): Double + /** Returns passed in int. */ + abstract fun echoRequiredInt(anInt: Long): Long + /** Returns the passed object, to test serialization and deserialization. */ + abstract fun echoAllNullableTypes(everything: JniAllNullableTypes?): JniAllNullableTypes? + /** Returns the passed object, to test serialization and deserialization. */ + abstract fun echoAllNullableTypesWithoutRecursion( + everything: JniAllNullableTypesWithoutRecursion? + ): JniAllNullableTypesWithoutRecursion? + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + abstract fun extractNestedNullableString(wrapper: JniAllClassesWrapper): String? + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + abstract fun createNestedNullableString(nullableString: String?): JniAllClassesWrapper + /** Returns passed in arguments of multiple types. */ + abstract fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): JniAllNullableTypes + /** Returns passed in arguments of multiple types. */ + abstract fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): JniAllNullableTypesWithoutRecursion + /** Returns passed in int. */ + abstract fun echoNullableInt(aNullableInt: Long?): Long? + /** Returns passed in double. */ + abstract fun echoNullableDouble(aNullableDouble: Double?): Double? + /** Returns the passed in boolean. */ + abstract fun echoNullableBool(aNullableBool: Boolean?): Boolean? + /** Returns the passed in string. */ + abstract fun echoNullableString(aNullableString: String?): String? + /** Returns the passed in Uint8List. */ + abstract fun echoNullableUint8List(aNullableUint8List: ByteArray?): ByteArray? + /** Returns the passed in Int32List. */ + abstract fun echoNullableInt32List(aNullableInt32List: IntArray?): IntArray? + /** Returns the passed in Int64List. */ + abstract fun echoNullableInt64List(aNullableInt64List: LongArray?): LongArray? + /** Returns the passed in Float64List. */ + abstract fun echoNullableFloat64List(aNullableFloat64List: DoubleArray?): DoubleArray? + /** Returns the passed in generic Object. */ + abstract fun echoNullableObject(aNullableObject: Any?): Any? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableList(aNullableList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableEnumList(enumList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableClassList( + classList: List? + ): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableNonNullEnumList(enumList: List?): List? + /** Returns the passed list, to test serialization and deserialization. */ + abstract fun echoNullableNonNullClassList( + classList: List? + ): List? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableMap(map: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableStringMap(stringMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableIntMap(intMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableEnumMap( + enumMap: Map? + ): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableClassMap( + classMap: Map? + ): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullStringMap(stringMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullIntMap(intMap: Map?): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullEnumMap( + enumMap: Map? + ): Map? + /** Returns the passed map, to test serialization and deserialization. */ + abstract fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? + + abstract fun echoNullableEnum(anEnum: JniAnEnum?): JniAnEnum? + + abstract fun echoAnotherNullableEnum(anotherEnum: JniAnotherEnum?): JniAnotherEnum? + /** Returns passed in int. */ + abstract fun echoOptionalNullableInt(aNullableInt: Long?): Long? + /** Returns the passed in string. */ + abstract fun echoNamedNullableString(aNullableString: String?): String? + /** + * A no-op function taking no arguments and returning no value, to sanity test basic asynchronous + * calling. + */ + abstract suspend fun noopAsync() + /** Returns passed in int asynchronously. */ + abstract suspend fun echoAsyncInt(anInt: Long): Long + /** Returns passed in double asynchronously. */ + abstract suspend fun echoAsyncDouble(aDouble: Double): Double + /** Returns the passed in boolean asynchronously. */ + abstract suspend fun echoAsyncBool(aBool: Boolean): Boolean + /** Returns the passed string asynchronously. */ + abstract suspend fun echoAsyncString(aString: String): String + /** Returns the passed in Uint8List asynchronously. */ + abstract suspend fun echoAsyncUint8List(aUint8List: ByteArray): ByteArray + /** Returns the passed in Int32List asynchronously. */ + abstract suspend fun echoAsyncInt32List(aInt32List: IntArray): IntArray + /** Returns the passed in Int64List asynchronously. */ + abstract suspend fun echoAsyncInt64List(aInt64List: LongArray): LongArray + /** Returns the passed in Float64List asynchronously. */ + abstract suspend fun echoAsyncFloat64List(aFloat64List: DoubleArray): DoubleArray + /** Returns the passed in generic Object asynchronously. */ + abstract suspend fun echoAsyncObject(anObject: Any): Any + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncList(list: List): List + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncEnumList(enumList: List): List + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncClassList( + classList: List + ): List + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncMap(map: Map): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncStringMap(stringMap: Map): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncIntMap(intMap: Map): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncEnumMap( + enumMap: Map + ): Map + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncClassMap( + classMap: Map + ): Map + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncEnum(anEnum: JniAnEnum): JniAnEnum + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAnotherAsyncEnum(anotherEnum: JniAnotherEnum): JniAnotherEnum + /** Responds with an error from an async function returning a value. */ + abstract suspend fun throwAsyncError(): Any? + /** Responds with an error from an async void function. */ + abstract suspend fun throwAsyncErrorFromVoid() + /** Responds with a Flutter error from an async function returning a value. */ + abstract suspend fun throwAsyncFlutterError(): Any? + /** Returns the passed object, to test async serialization and deserialization. */ + abstract suspend fun echoAsyncJniAllTypes(everything: JniAllTypes): JniAllTypes + /** Returns the passed object, to test serialization and deserialization. */ + abstract suspend fun echoAsyncNullableJniAllNullableTypes( + everything: JniAllNullableTypes? + ): JniAllNullableTypes? + /** Returns the passed object, to test serialization and deserialization. */ + abstract suspend fun echoAsyncNullableJniAllNullableTypesWithoutRecursion( + everything: JniAllNullableTypesWithoutRecursion? + ): JniAllNullableTypesWithoutRecursion? + /** Returns passed in int asynchronously. */ + abstract suspend fun echoAsyncNullableInt(anInt: Long?): Long? + /** Returns passed in double asynchronously. */ + abstract suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? + /** Returns the passed in boolean asynchronously. */ + abstract suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? + /** Returns the passed string asynchronously. */ + abstract suspend fun echoAsyncNullableString(aString: String?): String? + /** Returns the passed in Uint8List asynchronously. */ + abstract suspend fun echoAsyncNullableUint8List(aUint8List: ByteArray?): ByteArray? + /** Returns the passed in Int32List asynchronously. */ + abstract suspend fun echoAsyncNullableInt32List(aInt32List: IntArray?): IntArray? + /** Returns the passed in Int64List asynchronously. */ + abstract suspend fun echoAsyncNullableInt64List(aInt64List: LongArray?): LongArray? + /** Returns the passed in Float64List asynchronously. */ + abstract suspend fun echoAsyncNullableFloat64List(aFloat64List: DoubleArray?): DoubleArray? + /** Returns the passed in generic Object asynchronously. */ + abstract suspend fun echoAsyncNullableObject(anObject: Any?): Any? + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableList(list: List?): List? + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableEnumList(enumList: List?): List? + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableClassList( + classList: List? + ): List? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableMap(map: Map?): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableStringMap( + stringMap: Map? + ): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableIntMap(intMap: Map?): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableEnumMap( + enumMap: Map? + ): Map? + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableClassMap( + classMap: Map? + ): Map? + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAsyncNullableEnum(anEnum: JniAnEnum?): JniAnEnum? + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAnotherAsyncNullableEnum(anotherEnum: JniAnotherEnum?): JniAnotherEnum? +} + +@Keep +class JniHostIntegrationCoreApiRegistrar : JniHostIntegrationCoreApi() { + var api: JniHostIntegrationCoreApi? = null + + fun register( + api: JniHostIntegrationCoreApi, + name: String = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" + ): JniHostIntegrationCoreApiRegistrar { + this.api = api + JniHostIntegrationCoreApiInstances[name] = this + return this + } + + @Keep + fun getInstance(name: String): JniHostIntegrationCoreApiRegistrar? { + return JniHostIntegrationCoreApiInstances[name] + } + /** A no-op function taking no arguments and returning no value, to sanity test basic calling. */ + override fun noop() { + api?.let { + try { + return api!!.noop() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllTypes(everything: JniAllTypes): JniAllTypes { + api?.let { + try { + return api!!.echoAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns an error, to test error handling. */ + override fun throwError(): Any? { + api?.let { + try { + return api!!.throwError() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns an error from a void function, to test error handling. */ + override fun throwErrorFromVoid() { + api?.let { + try { + return api!!.throwErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns a Flutter error, to test error handling. */ + override fun throwFlutterError(): Any? { + api?.let { + try { + return api!!.throwFlutterError() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoInt(anInt: Long): Long { + api?.let { + try { + return api!!.echoInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.echoDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean. */ + override fun echoBool(aBool: Boolean): Boolean { + api?.let { + try { + return api!!.echoBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoString(aString: String): String { + api?.let { + try { + return api!!.echoString(aString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List. */ + override fun echoUint8List(aUint8List: ByteArray): ByteArray { + api?.let { + try { + return api!!.echoUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List. */ + override fun echoInt32List(aInt32List: IntArray): IntArray { + api?.let { + try { + return api!!.echoInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List. */ + override fun echoInt64List(aInt64List: LongArray): LongArray { + api?.let { + try { + return api!!.echoInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List. */ + override fun echoFloat64List(aFloat64List: DoubleArray): DoubleArray { + api?.let { + try { + return api!!.echoFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object. */ + override fun echoObject(anObject: Any): Any { + api?.let { + try { + return api!!.echoObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoList(list: List): List { + api?.let { + try { + return api!!.echoList(list) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoEnumList(enumList: List): List { + api?.let { + try { + return api!!.echoEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoClassList(classList: List): List { + api?.let { + try { + return api!!.echoClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNonNullEnumList(enumList: List): List { + api?.let { + try { + return api!!.echoNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNonNullClassList( + classList: List + ): List { + api?.let { + try { + return api!!.echoNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoMap(map: Map): Map { + api?.let { + try { + return api!!.echoMap(map) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoStringMap(stringMap: Map): Map { + api?.let { + try { + return api!!.echoStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.echoIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoEnumMap(enumMap: Map): Map { + api?.let { + try { + return api!!.echoEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.echoClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullStringMap(stringMap: Map): Map { + api?.let { + try { + return api!!.echoNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.echoNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullEnumMap(enumMap: Map): Map { + api?.let { + try { + return api!!.echoNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.echoNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed class to test nested class serialization and deserialization. */ + override fun echoClassWrapper(wrapper: JniAllClassesWrapper): JniAllClassesWrapper { + api?.let { + try { + return api!!.echoClassWrapper(wrapper) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum to test serialization and deserialization. */ + override fun echoEnum(anEnum: JniAnEnum): JniAnEnum { + api?.let { + try { + return api!!.echoEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum to test serialization and deserialization. */ + override fun echoAnotherEnum(anotherEnum: JniAnotherEnum): JniAnotherEnum { + api?.let { + try { + return api!!.echoAnotherEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the default string. */ + override fun echoNamedDefaultString(aString: String): String { + api?.let { + try { + return api!!.echoNamedDefaultString(aString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoOptionalDefaultDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.echoOptionalDefaultDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoRequiredInt(anInt: Long): Long { + api?.let { + try { + return api!!.echoRequiredInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllNullableTypes(everything: JniAllNullableTypes?): JniAllNullableTypes? { + api?.let { + try { + return api!!.echoAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllNullableTypesWithoutRecursion( + everything: JniAllNullableTypesWithoutRecursion? + ): JniAllNullableTypesWithoutRecursion? { + api?.let { + try { + return api!!.echoAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + override fun extractNestedNullableString(wrapper: JniAllClassesWrapper): String? { + api?.let { + try { + return api!!.extractNestedNullableString(wrapper) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + override fun createNestedNullableString(nullableString: String?): JniAllClassesWrapper { + api?.let { + try { + return api!!.createNestedNullableString(nullableString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in arguments of multiple types. */ + override fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): JniAllNullableTypes { + api?.let { + try { + return api!!.sendMultipleNullableTypes(aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in arguments of multiple types. */ + override fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): JniAllNullableTypesWithoutRecursion { + api?.let { + try { + return api!!.sendMultipleNullableTypesWithoutRecursion( + aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoNullableInt(aNullableInt: Long?): Long? { + api?.let { + try { + return api!!.echoNullableInt(aNullableInt) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoNullableDouble(aNullableDouble: Double?): Double? { + api?.let { + try { + return api!!.echoNullableDouble(aNullableDouble) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean. */ + override fun echoNullableBool(aNullableBool: Boolean?): Boolean? { + api?.let { + try { + return api!!.echoNullableBool(aNullableBool) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoNullableString(aNullableString: String?): String? { + api?.let { + try { + return api!!.echoNullableString(aNullableString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List. */ + override fun echoNullableUint8List(aNullableUint8List: ByteArray?): ByteArray? { + api?.let { + try { + return api!!.echoNullableUint8List(aNullableUint8List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List. */ + override fun echoNullableInt32List(aNullableInt32List: IntArray?): IntArray? { + api?.let { + try { + return api!!.echoNullableInt32List(aNullableInt32List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List. */ + override fun echoNullableInt64List(aNullableInt64List: LongArray?): LongArray? { + api?.let { + try { + return api!!.echoNullableInt64List(aNullableInt64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List. */ + override fun echoNullableFloat64List(aNullableFloat64List: DoubleArray?): DoubleArray? { + api?.let { + try { + return api!!.echoNullableFloat64List(aNullableFloat64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object. */ + override fun echoNullableObject(aNullableObject: Any?): Any? { + api?.let { + try { + return api!!.echoNullableObject(aNullableObject) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableList(aNullableList: List?): List? { + api?.let { + try { + return api!!.echoNullableList(aNullableList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.echoNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.echoNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableNonNullEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.echoNullableNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableNonNullClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.echoNullableNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableMap(map: Map?): Map? { + api?.let { + try { + return api!!.echoNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableStringMap(stringMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullStringMap(stringMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.echoNullableNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoNullableNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + + override fun echoNullableEnum(anEnum: JniAnEnum?): JniAnEnum? { + api?.let { + try { + return api!!.echoNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + + override fun echoAnotherNullableEnum(anotherEnum: JniAnotherEnum?): JniAnotherEnum? { + api?.let { + try { + return api!!.echoAnotherNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoOptionalNullableInt(aNullableInt: Long?): Long? { + api?.let { + try { + return api!!.echoOptionalNullableInt(aNullableInt) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoNamedNullableString(aNullableString: String?): String? { + api?.let { + try { + return api!!.echoNamedNullableString(aNullableString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** + * A no-op function taking no arguments and returning no value, to sanity test basic asynchronous + * calling. + */ + override suspend fun noopAsync() { + api?.let { + try { + return api!!.noopAsync() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in int asynchronously. */ + override suspend fun echoAsyncInt(anInt: Long): Long { + api?.let { + try { + return api!!.echoAsyncInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in double asynchronously. */ + override suspend fun echoAsyncDouble(aDouble: Double): Double { + api?.let { + try { + return api!!.echoAsyncDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean asynchronously. */ + override suspend fun echoAsyncBool(aBool: Boolean): Boolean { + api?.let { + try { + return api!!.echoAsyncBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed string asynchronously. */ + override suspend fun echoAsyncString(aString: String): String { + api?.let { + try { + return api!!.echoAsyncString(aString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List asynchronously. */ + override suspend fun echoAsyncUint8List(aUint8List: ByteArray): ByteArray { + api?.let { + try { + return api!!.echoAsyncUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List asynchronously. */ + override suspend fun echoAsyncInt32List(aInt32List: IntArray): IntArray { + api?.let { + try { + return api!!.echoAsyncInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List asynchronously. */ + override suspend fun echoAsyncInt64List(aInt64List: LongArray): LongArray { + api?.let { + try { + return api!!.echoAsyncInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List asynchronously. */ + override suspend fun echoAsyncFloat64List(aFloat64List: DoubleArray): DoubleArray { + api?.let { + try { + return api!!.echoAsyncFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object asynchronously. */ + override suspend fun echoAsyncObject(anObject: Any): Any { + api?.let { + try { + return api!!.echoAsyncObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncList(list: List): List { + api?.let { + try { + return api!!.echoAsyncList(list) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncEnumList(enumList: List): List { + api?.let { + try { + return api!!.echoAsyncEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncClassList( + classList: List + ): List { + api?.let { + try { + return api!!.echoAsyncClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncMap(map: Map): Map { + api?.let { + try { + return api!!.echoAsyncMap(map) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncStringMap(stringMap: Map): Map { + api?.let { + try { + return api!!.echoAsyncStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncIntMap(intMap: Map): Map { + api?.let { + try { + return api!!.echoAsyncIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return api!!.echoAsyncEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncClassMap( + classMap: Map + ): Map { + api?.let { + try { + return api!!.echoAsyncClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncEnum(anEnum: JniAnEnum): JniAnEnum { + api?.let { + try { + return api!!.echoAsyncEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAnotherAsyncEnum(anotherEnum: JniAnotherEnum): JniAnotherEnum { + api?.let { + try { + return api!!.echoAnotherAsyncEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Responds with an error from an async function returning a value. */ + override suspend fun throwAsyncError(): Any? { + api?.let { + try { + return api!!.throwAsyncError() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Responds with an error from an async void function. */ + override suspend fun throwAsyncErrorFromVoid() { + api?.let { + try { + return api!!.throwAsyncErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Responds with a Flutter error from an async function returning a value. */ + override suspend fun throwAsyncFlutterError(): Any? { + api?.let { + try { + return api!!.throwAsyncFlutterError() + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test async serialization and deserialization. */ + override suspend fun echoAsyncJniAllTypes(everything: JniAllTypes): JniAllTypes { + api?.let { + try { + return api!!.echoAsyncJniAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override suspend fun echoAsyncNullableJniAllNullableTypes( + everything: JniAllNullableTypes? + ): JniAllNullableTypes? { + api?.let { + try { + return api!!.echoAsyncNullableJniAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override suspend fun echoAsyncNullableJniAllNullableTypesWithoutRecursion( + everything: JniAllNullableTypesWithoutRecursion? + ): JniAllNullableTypesWithoutRecursion? { + api?.let { + try { + return api!!.echoAsyncNullableJniAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in int asynchronously. */ + override suspend fun echoAsyncNullableInt(anInt: Long?): Long? { + api?.let { + try { + return api!!.echoAsyncNullableInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns passed in double asynchronously. */ + override suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? { + api?.let { + try { + return api!!.echoAsyncNullableDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean asynchronously. */ + override suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? { + api?.let { + try { + return api!!.echoAsyncNullableBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed string asynchronously. */ + override suspend fun echoAsyncNullableString(aString: String?): String? { + api?.let { + try { + return api!!.echoAsyncNullableString(aString) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List asynchronously. */ + override suspend fun echoAsyncNullableUint8List(aUint8List: ByteArray?): ByteArray? { + api?.let { + try { + return api!!.echoAsyncNullableUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List asynchronously. */ + override suspend fun echoAsyncNullableInt32List(aInt32List: IntArray?): IntArray? { + api?.let { + try { + return api!!.echoAsyncNullableInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List asynchronously. */ + override suspend fun echoAsyncNullableInt64List(aInt64List: LongArray?): LongArray? { + api?.let { + try { + return api!!.echoAsyncNullableInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List asynchronously. */ + override suspend fun echoAsyncNullableFloat64List(aFloat64List: DoubleArray?): DoubleArray? { + api?.let { + try { + return api!!.echoAsyncNullableFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object asynchronously. */ + override suspend fun echoAsyncNullableObject(anObject: Any?): Any? { + api?.let { + try { + return api!!.echoAsyncNullableObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableList(list: List?): List? { + api?.let { + try { + return api!!.echoAsyncNullableList(list) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableEnumList(enumList: List?): List? { + api?.let { + try { + return api!!.echoAsyncNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return api!!.echoAsyncNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableMap(map: Map?): Map? { + api?.let { + try { + return api!!.echoAsyncNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoAsyncNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableIntMap(intMap: Map?): Map? { + api?.let { + try { + return api!!.echoAsyncNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoAsyncNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return api!!.echoAsyncNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableEnum(anEnum: JniAnEnum?): JniAnEnum? { + api?.let { + try { + return api!!.echoAsyncNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAnotherAsyncNullableEnum(anotherEnum: JniAnotherEnum?): JniAnotherEnum? { + api?.let { + try { + return api!!.echoAnotherAsyncNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("JniHostIntegrationCoreApi has not been set") + } +} + +val JniHostTrivialApiInstances: MutableMap = mutableMapOf() + +@Keep +abstract class JniHostTrivialApi { + abstract fun noop() +} + +@Keep +class JniHostTrivialApiRegistrar : JniHostTrivialApi() { + var api: JniHostTrivialApi? = null + + fun register( + api: JniHostTrivialApi, + name: String = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" + ): JniHostTrivialApiRegistrar { + this.api = api + JniHostTrivialApiInstances[name] = this + return this + } + + @Keep + fun getInstance(name: String): JniHostTrivialApiRegistrar? { + return JniHostTrivialApiInstances[name] + } + + override fun noop() { + api?.let { + try { + return api!!.noop() + } catch (e: Exception) { + throw e + } + } + error("JniHostTrivialApi has not been set") + } +} + +val JniHostSmallApiInstances: MutableMap = mutableMapOf() + +@Keep +abstract class JniHostSmallApi { + abstract suspend fun echo(aString: String): String + + abstract suspend fun voidVoid() +} + +@Keep +class JniHostSmallApiRegistrar : JniHostSmallApi() { + var api: JniHostSmallApi? = null + + fun register( + api: JniHostSmallApi, + name: String = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" + ): JniHostSmallApiRegistrar { + this.api = api + JniHostSmallApiInstances[name] = this + return this + } + + @Keep + fun getInstance(name: String): JniHostSmallApiRegistrar? { + return JniHostSmallApiInstances[name] + } + + override suspend fun echo(aString: String): String { + api?.let { + try { + return api!!.echo(aString) + } catch (e: Exception) { + throw e + } + } + error("JniHostSmallApi has not been set") + } + + override suspend fun voidVoid() { + api?.let { + try { + return api!!.voidVoid() + } catch (e: Exception) { + throw e + } + } + error("JniHostSmallApi has not been set") + } +} diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt index 7c6707c25a4..60a19b72797 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/TestPlugin.kt @@ -4,6 +4,16 @@ package com.example.test_plugin +import JniAllClassesWrapper +import JniAllNullableTypes +import JniAllNullableTypesWithoutRecursion +import JniAllTypes +import JniAnEnum +import JniAnotherEnum +import JniHostIntegrationCoreApi +import JniHostIntegrationCoreApiRegistrar +import JniHostSmallApi +import JniHostSmallApiRegistrar import android.os.Handler import android.os.Looper import io.flutter.embedding.engine.plugins.FlutterPlugin @@ -15,6 +25,9 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { private var flutterSmallApiOne: FlutterSmallApi? = null private var flutterSmallApiTwo: FlutterSmallApi? = null private var proxyApiRegistrar: ProxyApiRegistrar? = null + private var jniMessageApi: JniHostIntegrationCoreApiRegistrar? = null + private var jniSmallApiOne: JniHostSmallApiRegistrar? = null + private var jniSmallApiTwo: JniHostSmallApiRegistrar? = null override fun onAttachedToEngine(binding: FlutterPluginBinding) { HostIntegrationCoreApi.setUp(binding.binaryMessenger, this) @@ -22,6 +35,11 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { testSuffixApiOne.setUp(binding, "suffixOne") val testSuffixApiTwo = TestPluginWithSuffix() testSuffixApiTwo.setUp(binding, "suffixTwo") + + jniMessageApi = JniHostIntegrationCoreApiRegistrar().register(JniIntegrationTests()) + jniSmallApiOne = JniHostSmallApiRegistrar().register(JniHostSmallApiTests(), "suffixOne") + jniSmallApiTwo = JniHostSmallApiRegistrar().register(JniHostSmallApiTests(), "suffixTwo") + flutterApi = FlutterIntegrationCoreApi(binding.binaryMessenger) flutterSmallApiOne = FlutterSmallApi(binding.binaryMessenger, "suffixOne") flutterSmallApiTwo = FlutterSmallApi(binding.binaryMessenger, "suffixTwo") @@ -37,7 +55,7 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { binding.binaryMessenger, SendConsistentNumbers(2), "2") } - override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) { + override fun onDetachedFromEngine(binding: FlutterPluginBinding) { proxyApiRegistrar?.tearDown() } @@ -527,11 +545,11 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { } override fun defaultIsMainThread(): Boolean { - return Thread.currentThread() == Looper.getMainLooper().getThread() + return Thread.currentThread() == Looper.getMainLooper().thread } override fun taskQueueIsBackgroundThread(): Boolean { - return Thread.currentThread() != Looper.getMainLooper().getThread() + return Thread.currentThread() != Looper.getMainLooper().thread } override fun callFlutterNoop(callback: (Result) -> Unit) { @@ -885,6 +903,519 @@ class TestPluginWithSuffix : HostSmallApi { } } +class JniIntegrationTests : JniHostIntegrationCoreApi() { + override fun noop() {} + + override fun echoAllTypes(everything: JniAllTypes): JniAllTypes { + return everything + } + + override fun throwError(): Any? { + throw Exception("An error") + } + + override fun throwErrorFromVoid() { + throw Exception("An error") + } + + override fun throwFlutterError(): Any? { + throw FlutterError("code1111111", "message22222222", "details33333333") + } + + override fun echoInt(anInt: Long): Long { + return anInt + } + + override fun echoDouble(aDouble: Double): Double { + return aDouble + } + + override fun echoBool(aBool: Boolean): Boolean { + return aBool + } + + override fun echoString(aString: String): String { + return aString + } + + override fun echoUint8List(aUint8List: ByteArray): ByteArray { + return aUint8List + } + + override fun echoInt32List(aInt32List: IntArray): IntArray { + return aInt32List + } + + override fun echoInt64List(aInt64List: LongArray): LongArray { + return aInt64List + } + + override fun echoFloat64List(aFloat64List: DoubleArray): DoubleArray { + return aFloat64List + } + + override fun echoObject(anObject: Any): Any { + return anObject + } + + override fun echoList(list: List): List { + return list + } + + override fun echoEnumList(enumList: List): List { + return enumList + } + + override fun echoClassList(classList: List): List { + return classList + } + + override fun echoNonNullEnumList(enumList: List): List { + return enumList + } + + override fun echoNonNullClassList( + classList: List + ): List { + return classList + } + + override fun echoMap(map: Map): Map { + return map + } + + override fun echoStringMap(stringMap: Map): Map { + return stringMap + } + + override fun echoIntMap(intMap: Map): Map { + return intMap + } + + override fun echoEnumMap(enumMap: Map): Map { + return enumMap + } + + override fun echoClassMap( + classMap: Map + ): Map { + return classMap + } + + override fun echoNonNullStringMap(stringMap: Map): Map { + return stringMap + } + + override fun echoNonNullIntMap(intMap: Map): Map { + return intMap + } + + override fun echoNonNullEnumMap(enumMap: Map): Map { + return enumMap + } + + override fun echoNonNullClassMap( + classMap: Map + ): Map { + return classMap + } + + override fun echoClassWrapper(wrapper: JniAllClassesWrapper): JniAllClassesWrapper { + return wrapper + } + + override fun echoEnum(anEnum: JniAnEnum): JniAnEnum { + return anEnum + } + + override fun echoAnotherEnum(anotherEnum: JniAnotherEnum): JniAnotherEnum { + return anotherEnum + } + + override fun echoNamedDefaultString(aString: String): String { + return aString + } + + override fun echoOptionalDefaultDouble(aDouble: Double): Double { + return aDouble + } + + override fun echoRequiredInt(anInt: Long): Long { + return anInt + } + + override fun echoAllNullableTypes(everything: JniAllNullableTypes?): JniAllNullableTypes? { + return everything + } + + override fun echoAllNullableTypesWithoutRecursion( + everything: JniAllNullableTypesWithoutRecursion? + ): JniAllNullableTypesWithoutRecursion? { + return everything + } + + override fun extractNestedNullableString(wrapper: JniAllClassesWrapper): String? { + return wrapper.allNullableTypes.aNullableString + } + + override fun createNestedNullableString(nullableString: String?): JniAllClassesWrapper { + return JniAllClassesWrapper( + JniAllNullableTypes(aNullableString = nullableString), + classList = arrayOf().toList(), + classMap = HashMap()) + } + + override fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): JniAllNullableTypes { + return JniAllNullableTypes( + aNullableBool = aNullableBool, + aNullableInt = aNullableInt, + aNullableString = aNullableString) + } + + override fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): JniAllNullableTypesWithoutRecursion { + return JniAllNullableTypesWithoutRecursion( + aNullableBool = aNullableBool, + aNullableInt = aNullableInt, + aNullableString = aNullableString) + } + + override fun echoNullableInt(aNullableInt: Long?): Long? { + return aNullableInt + } + + override fun echoNullableDouble(aNullableDouble: Double?): Double? { + return aNullableDouble + } + + override fun echoNullableBool(aNullableBool: Boolean?): Boolean? { + return aNullableBool + } + + override fun echoNullableString(aNullableString: String?): String? { + return aNullableString + } + + override fun echoNullableUint8List(aNullableUint8List: ByteArray?): ByteArray? { + return aNullableUint8List + } + + override fun echoNullableInt32List(aNullableInt32List: IntArray?): IntArray? { + return aNullableInt32List + } + + override fun echoNullableInt64List(aNullableInt64List: LongArray?): LongArray? { + return aNullableInt64List + } + + override fun echoNullableFloat64List(aNullableFloat64List: DoubleArray?): DoubleArray? { + return aNullableFloat64List + } + + override fun echoNullableObject(aNullableObject: Any?): Any? { + return aNullableObject + } + + override fun echoNullableList(aNullableList: List?): List? { + return aNullableList + } + + override fun echoNullableEnumList(enumList: List?): List? { + return enumList + } + + override fun echoNullableClassList( + classList: List? + ): List? { + return classList + } + + override fun echoNullableNonNullEnumList(enumList: List?): List? { + return enumList + } + + override fun echoNullableNonNullClassList( + classList: List? + ): List? { + return classList + } + + override fun echoNullableMap(map: Map?): Map? { + return map + } + + override fun echoNullableStringMap(stringMap: Map?): Map? { + return stringMap + } + + override fun echoNullableIntMap(intMap: Map?): Map? { + return intMap + } + + override fun echoNullableEnumMap( + enumMap: Map? + ): Map? { + return enumMap + } + + override fun echoNullableClassMap( + classMap: Map? + ): Map? { + return classMap + } + + override fun echoNullableNonNullStringMap(stringMap: Map?): Map? { + return stringMap + } + + override fun echoNullableNonNullIntMap(intMap: Map?): Map? { + return intMap + } + + override fun echoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + return enumMap + } + + override fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? { + return classMap + } + + override fun echoNullableEnum(anEnum: JniAnEnum?): JniAnEnum? { + return anEnum + } + + override fun echoAnotherNullableEnum(anotherEnum: JniAnotherEnum?): JniAnotherEnum? { + return anotherEnum + } + + override fun echoOptionalNullableInt(aNullableInt: Long?): Long? { + return aNullableInt + } + + override fun echoNamedNullableString(aNullableString: String?): String? { + return aNullableString + } + + override suspend fun noopAsync() { + return + } + + override suspend fun echoAsyncInt(anInt: Long): Long { + return anInt + } + + override suspend fun echoAsyncDouble(aDouble: Double): Double { + return aDouble + } + + override suspend fun echoAsyncBool(aBool: Boolean): Boolean { + return aBool + } + + override suspend fun echoAsyncString(aString: String): String { + return aString + } + + override suspend fun echoAsyncUint8List(aUint8List: ByteArray): ByteArray { + return aUint8List + } + + override suspend fun echoAsyncInt32List(aInt32List: IntArray): IntArray { + return aInt32List + } + + override suspend fun echoAsyncInt64List(aInt64List: LongArray): LongArray { + return aInt64List + } + + override suspend fun echoAsyncFloat64List(aFloat64List: DoubleArray): DoubleArray { + return aFloat64List + } + + override suspend fun echoAsyncObject(anObject: Any): Any { + return anObject + } + + override suspend fun echoAsyncList(list: List): List { + return list + } + + override suspend fun echoAsyncEnumList(enumList: List): List { + return enumList + } + + override suspend fun echoAsyncClassList( + classList: List + ): List { + return classList + } + + override suspend fun echoAsyncMap(map: Map): Map { + return map + } + + override suspend fun echoAsyncStringMap(stringMap: Map): Map { + return stringMap + } + + override suspend fun echoAsyncIntMap(intMap: Map): Map { + return intMap + } + + override suspend fun echoAsyncEnumMap( + enumMap: Map + ): Map { + return enumMap + } + + override suspend fun echoAsyncClassMap( + classMap: Map + ): Map { + return classMap + } + + override suspend fun echoAsyncEnum(anEnum: JniAnEnum): JniAnEnum { + return anEnum + } + + override suspend fun echoAnotherAsyncEnum(anotherEnum: JniAnotherEnum): JniAnotherEnum { + return anotherEnum + } + + override suspend fun throwAsyncError(): Any? { + throw Exception("An error") + } + + override suspend fun throwAsyncErrorFromVoid() { + throw Exception("An error") + } + + override suspend fun throwAsyncFlutterError(): Any? { + throw FlutterError("code", "message", "details") + } + + override suspend fun echoAsyncJniAllTypes(everything: JniAllTypes): JniAllTypes { + return everything + } + + override suspend fun echoAsyncNullableJniAllNullableTypes( + everything: JniAllNullableTypes? + ): JniAllNullableTypes? { + return everything + } + + override suspend fun echoAsyncNullableJniAllNullableTypesWithoutRecursion( + everything: JniAllNullableTypesWithoutRecursion? + ): JniAllNullableTypesWithoutRecursion? { + return everything + } + + override suspend fun echoAsyncNullableInt(anInt: Long?): Long? { + return anInt + } + + override suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? { + return aDouble + } + + override suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? { + return aBool + } + + override suspend fun echoAsyncNullableString(aString: String?): String? { + return aString + } + + override suspend fun echoAsyncNullableUint8List(aUint8List: ByteArray?): ByteArray? { + return aUint8List + } + + override suspend fun echoAsyncNullableInt32List(aInt32List: IntArray?): IntArray? { + return aInt32List + } + + override suspend fun echoAsyncNullableInt64List(aInt64List: LongArray?): LongArray? { + return aInt64List + } + + override suspend fun echoAsyncNullableFloat64List(aFloat64List: DoubleArray?): DoubleArray? { + return aFloat64List + } + + override suspend fun echoAsyncNullableObject(anObject: Any?): Any? { + return anObject + } + + override suspend fun echoAsyncNullableList(list: List?): List? { + return list + } + + override suspend fun echoAsyncNullableEnumList(enumList: List?): List? { + return enumList + } + + override suspend fun echoAsyncNullableClassList( + classList: List? + ): List? { + return classList + } + + override suspend fun echoAsyncNullableMap(map: Map?): Map? { + return map + } + + override suspend fun echoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + return stringMap + } + + override suspend fun echoAsyncNullableIntMap(intMap: Map?): Map? { + return intMap + } + + override suspend fun echoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + return enumMap + } + + override suspend fun echoAsyncNullableClassMap( + classMap: Map? + ): Map? { + return classMap + } + + override suspend fun echoAsyncNullableEnum(anEnum: JniAnEnum?): JniAnEnum? { + return anEnum + } + + override suspend fun echoAnotherAsyncNullableEnum(anotherEnum: JniAnotherEnum?): JniAnotherEnum? { + return anotherEnum + } +} + +class JniHostSmallApiTests : JniHostSmallApi() { + override suspend fun echo(aString: String): String { + return aString + } + + override suspend fun voidVoid() { + return + } +} + object SendInts : StreamIntsStreamHandler() { val handler = Handler(Looper.getMainLooper()) @@ -921,7 +1452,7 @@ object SendClass : StreamEventsStreamHandler() { ClassEvent(EventAllNullableTypes(aNullableInt = 0))) override fun onListen(p0: Any?, sink: PigeonEventSink) { - var count: Int = 0 + var count = 0 val r: Runnable = object : Runnable { override fun run() { @@ -945,7 +1476,7 @@ class SendConsistentNumbers(private val numberToSend: Long) : private val handler = Handler(Looper.getMainLooper()) override fun onListen(p0: Any?, sink: PigeonEventSink) { - var count: Int = 0 + var count = 0 val r: Runnable = object : Runnable { override fun run() { diff --git a/packages/pigeon/platform_tests/test_plugin/example/jnigen.yaml b/packages/pigeon/platform_tests/test_plugin/example/jnigen.yaml new file mode 100644 index 00000000000..89abfb5399a --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/jnigen.yaml @@ -0,0 +1,31 @@ +android_sdk_config: + add_gradle_deps: true + android_example: '/Users/tarrinneal/work/packages/packages/pigeon/platform_tests/test_plugin/example' + +# source_path: +# - 'android/src/main/java' + +summarizer: + backend: asm + +output: + dart: + path: /Users/tarrinneal/work/packages/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/jni_tests.gen.jni.dart + structure: single_file + +log_level: all + +classes: + - 'JniHostIntegrationCoreApi' + - 'JniHostIntegrationCoreApiRegistrar' + - 'JniHostTrivialApi' + - 'JniHostTrivialApiRegistrar' + - 'JniHostSmallApi' + - 'JniHostSmallApiRegistrar' + - 'JniUnusedClass' + - 'JniAllTypes' + - 'JniAllNullableTypes' + - 'JniAllNullableTypesWithoutRecursion' + - 'JniAllClassesWrapper' + - 'JniAnEnum' + - 'JniAnotherEnum' diff --git a/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml b/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml index 9b5f46bcb78..62962765633 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml +++ b/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml @@ -8,6 +8,11 @@ environment: dependencies: flutter: sdk: flutter + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 735250a19b1a429869bfacccba833ecc93db34b6 shared_test_plugin_code: path: ../../shared_test_plugin_code test_plugin: diff --git a/packages/pigeon/platform_tests/test_plugin/pubspec.yaml b/packages/pigeon/platform_tests/test_plugin/pubspec.yaml index 0547092ec50..601219c7bca 100644 --- a/packages/pigeon/platform_tests/test_plugin/pubspec.yaml +++ b/packages/pigeon/platform_tests/test_plugin/pubspec.yaml @@ -25,6 +25,11 @@ flutter: dependencies: flutter: sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 735250a19b1a429869bfacccba833ecc93db34b6 dev_dependencies: flutter_test: diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index 3459232c984..ca8d9ed0be3 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -14,6 +14,11 @@ dependencies: collection: ^1.15.0 dart_style: ^3.0.0 graphs: ^2.3.1 + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 735250a19b1a429869bfacccba833ecc93db34b6 meta: ^1.9.0 path: ^1.8.0 pub_semver: ^2.1.4 @@ -21,6 +26,11 @@ dependencies: dev_dependencies: test: ^1.11.1 + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 735250a19b1a429869bfacccba833ecc93db34b6 topics: - codegen diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index ec52d0b25c9..b2b9726b5eb 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -43,6 +43,13 @@ const Map> _unsupportedFiles = GeneratorLanguage.java, GeneratorLanguage.objc, }, + 'jni_tests': { + GeneratorLanguage.cpp, + GeneratorLanguage.gobject, + GeneratorLanguage.java, + GeneratorLanguage.objc, + GeneratorLanguage.swift, + }, }; String _snakeToPascalCase(String snake) { @@ -99,6 +106,7 @@ Future generateTestPigeons( 'nullable_returns', 'primitive', 'proxy_api_tests', + 'jni_tests' }; final String outputBase = p.join(baseDir, 'platform_tests', 'test_plugin'); @@ -140,6 +148,8 @@ Future generateTestPigeons( : '$outputBase/android/src/main/kotlin/com/example/test_plugin/$pascalCaseName.gen.kt', kotlinPackage: 'com.example.test_plugin', kotlinErrorClassName: kotlinErrorName, + kotlinUseJni: input == 'jni_tests', + kotlinExampleAppDirectory: '$outputBase/example', kotlinIncludeErrorClass: input != 'primitive', // iOS swiftOut: skipLanguages.contains(GeneratorLanguage.swift) @@ -252,7 +262,9 @@ Future runPigeon({ String? kotlinOut, String? kotlinPackage, String? kotlinErrorClassName, + bool kotlinUseJni = false, bool kotlinIncludeErrorClass = true, + String kotlinExampleAppDirectory = '', bool swiftIncludeErrorClass = true, String? swiftOut, String? swiftErrorClassName, @@ -310,7 +322,7 @@ Future runPigeon({ copyrightHeader: copyrightHeader, dartOut: dartOut, dartTestOut: dartTestOut, - dartOptions: const DartOptions(), + dartOptions: DartOptions(useJni: kotlinUseJni), cppHeaderOut: cppHeaderOut, cppSourceOut: cppSourceOut, cppOptions: CppOptions(namespace: cppNamespace), @@ -325,6 +337,8 @@ Future runPigeon({ package: kotlinPackage, errorClassName: kotlinErrorClassName, includeErrorClass: kotlinIncludeErrorClass, + useJni: kotlinUseJni, + exampleAppDirectory: kotlinExampleAppDirectory, ), objcHeaderOut: objcHeaderOut, objcSourceOut: objcSourceOut,