From 80693dacc7acd13b6a2d4add74c02774a308fa21 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Fri, 8 Nov 2024 17:59:29 +0100 Subject: [PATCH] Generate null-safe java code --- pkgs/jni/lib/jni_symbols.yaml | 17 + pkgs/jni/lib/src/accessors.dart | 2 +- pkgs/jni/lib/src/jobject.dart | 2 - pkgs/jni/lib/src/util/jlist.dart | 12 +- pkgs/jni/lib/src/util/jmap.dart | 12 +- .../in_app_java/lib/android_utils.dart | 2187 ++- .../kotlin_plugin/lib/kotlin_bindings.dart | 63 +- .../lib/notifications.dart | 63 +- .../org/apache/pdfbox/pdmodel/PDDocument.dart | 580 +- .../pdfbox/pdmodel/PDDocumentInformation.dart | 176 +- .../apache/pdfbox/text/PDFTextStripper.dart | 176 +- .../apisummarizer/disasm/AsmClassVisitor.java | 6 +- .../disasm/AsmMethodVisitor.java | 1 + .../lib/src/bindings/dart_generator.dart | 158 +- .../lib/src/bindings/kotlin_processor.dart | 12 +- pkgs/jnigen/lib/src/bindings/linker.dart | 32 +- pkgs/jnigen/lib/src/bindings/printer.dart | 20 +- pkgs/jnigen/lib/src/bindings/renamer.dart | 1 + pkgs/jnigen/lib/src/config/config_types.dart | 1 + pkgs/jnigen/lib/src/elements/elements.dart | 103 +- pkgs/jnigen/lib/src/generate_bindings.dart | 2 +- .../runtime_test_registrant.dart | 6 +- .../fasterxml/jackson/core/JsonFactory.dart | 656 +- .../fasterxml/jackson/core/JsonParser.dart | 533 +- .../com/fasterxml/jackson/core/JsonToken.dart | 73 +- .../test/kotlin_test/bindings/kotlin.dart | 388 +- .../kotlin_test/runtime_test_registrant.dart | 4 +- .../bindings/simple_package.dart | 11424 +++++++++++++--- .../test/simple_package_test/generate.dart | 10 +- .../runtime_test_registrant.dart | 153 +- 30 files changed, 13704 insertions(+), 3169 deletions(-) diff --git a/pkgs/jni/lib/jni_symbols.yaml b/pkgs/jni/lib/jni_symbols.yaml index ac4a74c0c..c06c5eb91 100644 --- a/pkgs/jni/lib/jni_symbols.yaml +++ b/pkgs/jni/lib/jni_symbols.yaml @@ -4,50 +4,62 @@ files: 'java.lang.Object': name: JObject type_class: JObjectType + nullable_type_class: JObjectNullableType super_count: 0 'java.lang.String': name: JString type_class: JStringType + nullable_type_class: JStringNullableType super_count: 1 'java.lang.Number': name: JNumber type_class: JNumberType + nullable_type_class: JNumberNullableType super_count: 1 'java.lang.Byte': name: JByte type_class: JByteType + nullable_type_class: JByteNullableType super_count: 2 'java.lang.Short': name: JShort type_class: JShortType + nullable_type_class: JShortNullableType super_count: 2 'java.lang.Integer': name: JInteger type_class: JIntegerType + nullable_type_class: JIntegerNullableType super_count: 2 'java.lang.Long': name: JLong type_class: JLongType + nullable_type_class: JLongNullableType super_count: 2 'java.lang.Float': name: JFloat type_class: JFloatType + nullable_type_class: JFloatNullableType super_count: 2 'java.lang.Double': name: JDouble type_class: JDoubleType + nullable_type_class: JDoubleNullableType super_count: 2 'java.lang.Boolean': name: JBoolean type_class: JBooleanType + nullable_type_class: JBooleanNullableType super_count: 1 'java.lang.Character': name: JCharacter type_class: JCharacterType + nullable_type_class: JCharacterNullableType super_count: 1 'java.util.Set': name: JSet type_class: JSetType + nullable_type_class: JSetNullableType super_count: 1 type_params: E: @@ -55,6 +67,7 @@ files: 'java.util.List': name: JList type_class: JListType + nullable_type_class: JListNullableType super_count: 1 type_params: E: @@ -62,6 +75,7 @@ files: 'java.util.Iterator': name: JIterator type_class: JIteratorType + nullable_type_class: JIteratorNullableType super_count: 1 type_params: E: @@ -69,6 +83,7 @@ files: 'java.util.Map': name: JMap type_class: JMapType + nullable_type_class: JMapNullableType super_count: 1 type_params: K: @@ -78,8 +93,10 @@ files: 'java.nio.Buffer': name: JBuffer type_class: JBufferType + nullable_type_class: JBufferNullableType super_count: 1 'java.nio.ByteBuffer': name: JByteBuffer type_class: JByteBufferType + nullable_type_class: JByteBufferNullableType super_count: 2 diff --git a/pkgs/jni/lib/src/accessors.dart b/pkgs/jni/lib/src/accessors.dart index c90bd9529..548acb4cd 100644 --- a/pkgs/jni/lib/src/accessors.dart +++ b/pkgs/jni/lib/src/accessors.dart @@ -67,7 +67,7 @@ extension JniResultMethods on JniResult { return pointer == nullptr ? jNullReference : JGlobalReference(pointer); } - T object(JObjType type) { + T object(JObjType type) { return type.fromReference(reference); } diff --git a/pkgs/jni/lib/src/jobject.dart b/pkgs/jni/lib/src/jobject.dart index a439fb366..5aee70b03 100644 --- a/pkgs/jni/lib/src/jobject.dart +++ b/pkgs/jni/lib/src/jobject.dart @@ -115,8 +115,6 @@ class JObject { return JClass.fromReference(JGlobalReference(classRef)); } - bool get isNull => reference.isNull; - /// Releases the underlying [reference]. /// /// Releasing in one isolate while using or releasing in another isolate might diff --git a/pkgs/jni/lib/src/util/jlist.dart b/pkgs/jni/lib/src/util/jlist.dart index 9a91ea742..788c29c1e 100644 --- a/pkgs/jni/lib/src/util/jlist.dart +++ b/pkgs/jni/lib/src/util/jlist.dart @@ -14,13 +14,13 @@ import '../types.dart'; import 'jiterator.dart'; import 'jset.dart'; -final class JNullableListType<$E extends JObject?> +final class JListNullableType<$E extends JObject?> extends JObjType?> { @internal final JObjType<$E> E; @internal - const JNullableListType( + const JListNullableType( this.E, ); @@ -46,12 +46,12 @@ final class JNullableListType<$E extends JObject?> final superCount = 1; @override - int get hashCode => Object.hash(JNullableListType, E); + int get hashCode => Object.hash(JListNullableType, E); @override bool operator ==(Object other) { - return other.runtimeType == (JNullableListType<$E>) && - other is JNullableListType<$E> && + return other.runtimeType == (JListNullableType<$E>) && + other is JListNullableType<$E> && E == other.E; } } @@ -80,7 +80,7 @@ final class JListType<$E extends JObject?> extends JObjType> { @internal @override - JObjType?> get nullableType => JNullableListType<$E>(E); + JObjType?> get nullableType => JListNullableType<$E>(E); @internal @override diff --git a/pkgs/jni/lib/src/util/jmap.dart b/pkgs/jni/lib/src/util/jmap.dart index 32b94b40a..7f79680d3 100644 --- a/pkgs/jni/lib/src/util/jmap.dart +++ b/pkgs/jni/lib/src/util/jmap.dart @@ -11,7 +11,7 @@ import '../jreference.dart'; import '../types.dart'; import 'jset.dart'; -final class JNullableMapType<$K extends JObject?, $V extends JObject?> +final class JMapNullableType<$K extends JObject?, $V extends JObject?> extends JObjType?> { @internal final JObjType<$K> K; @@ -20,7 +20,7 @@ final class JNullableMapType<$K extends JObject?, $V extends JObject?> final JObjType<$V> V; @internal - const JNullableMapType( + const JMapNullableType( this.K, this.V, ); @@ -47,12 +47,12 @@ final class JNullableMapType<$K extends JObject?, $V extends JObject?> final superCount = 1; @override - int get hashCode => Object.hash(JNullableMapType, K, V); + int get hashCode => Object.hash(JMapNullableType, K, V); @override bool operator ==(Object other) { - return other.runtimeType == (JNullableMapType<$K, $V>) && - other is JNullableMapType<$K, $V> && + return other.runtimeType == (JMapNullableType<$K, $V>) && + other is JMapNullableType<$K, $V> && K == other.K && V == other.V; } @@ -87,7 +87,7 @@ final class JMapType<$K extends JObject?, $V extends JObject?> @internal @override - JObjType?> get nullableType => JNullableMapType<$K, $V>(K, V); + JObjType?> get nullableType => JMapNullableType<$K, $V>(K, V); @internal @override diff --git a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart index 8c03e0107..6a9ed32c5 100644 --- a/pkgs/jnigen/example/in_app_java/lib/android_utils.dart +++ b/pkgs/jnigen/example/in_app_java/lib/android_utils.dart @@ -50,6 +50,7 @@ class R_drawable extends _$jni.JObject { _$jni.JClass.forName(r'com/example/in_app_java/R$drawable'); /// The type which includes information such as the signature of this class. + static const nullableType = $R_drawable$NullableType(); static const type = $R_drawable$Type(); static final _id_launch_background = _class.staticFieldId( r'launch_background', @@ -65,6 +66,43 @@ class R_drawable extends _$jni.JObject { _id_launch_background.set(_class, const _$jni.jintType(), value); } +final class $R_drawable$NullableType extends _$jni.JObjType { + @_$jni.internal + const $R_drawable$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/example/in_app_java/R$drawable;'; + + @_$jni.internal + @_$core.override + R_drawable? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : R_drawable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($R_drawable$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($R_drawable$NullableType) && + other is $R_drawable$NullableType; + } +} + final class $R_drawable$Type extends _$jni.JObjType { @_$jni.internal const $R_drawable$Type(); @@ -76,11 +114,17 @@ final class $R_drawable$Type extends _$jni.JObjType { @_$jni.internal @_$core.override R_drawable fromReference(_$jni.JReference reference) => - R_drawable.fromReference(reference); + R_drawable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $R_drawable$NullableType(); @_$jni.internal @_$core.override @@ -111,6 +155,7 @@ class R_mipmap extends _$jni.JObject { _$jni.JClass.forName(r'com/example/in_app_java/R$mipmap'); /// The type which includes information such as the signature of this class. + static const nullableType = $R_mipmap$NullableType(); static const type = $R_mipmap$Type(); static final _id_ic_launcher = _class.staticFieldId( r'ic_launcher', @@ -126,6 +171,43 @@ class R_mipmap extends _$jni.JObject { _id_ic_launcher.set(_class, const _$jni.jintType(), value); } +final class $R_mipmap$NullableType extends _$jni.JObjType { + @_$jni.internal + const $R_mipmap$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/example/in_app_java/R$mipmap;'; + + @_$jni.internal + @_$core.override + R_mipmap? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : R_mipmap.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($R_mipmap$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($R_mipmap$NullableType) && + other is $R_mipmap$NullableType; + } +} + final class $R_mipmap$Type extends _$jni.JObjType { @_$jni.internal const $R_mipmap$Type(); @@ -136,12 +218,16 @@ final class $R_mipmap$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - R_mipmap fromReference(_$jni.JReference reference) => - R_mipmap.fromReference(reference); + R_mipmap fromReference(_$jni.JReference reference) => R_mipmap.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => const $R_mipmap$NullableType(); @_$jni.internal @_$core.override @@ -172,6 +258,7 @@ class R_style extends _$jni.JObject { _$jni.JClass.forName(r'com/example/in_app_java/R$style'); /// The type which includes information such as the signature of this class. + static const nullableType = $R_style$NullableType(); static const type = $R_style$Type(); static final _id_LaunchTheme = _class.staticFieldId( r'LaunchTheme', @@ -200,6 +287,43 @@ class R_style extends _$jni.JObject { _id_NormalTheme.set(_class, const _$jni.jintType(), value); } +final class $R_style$NullableType extends _$jni.JObjType { + @_$jni.internal + const $R_style$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/example/in_app_java/R$style;'; + + @_$jni.internal + @_$core.override + R_style? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : R_style.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($R_style$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($R_style$NullableType) && + other is $R_style$NullableType; + } +} + final class $R_style$Type extends _$jni.JObjType { @_$jni.internal const $R_style$Type(); @@ -210,12 +334,16 @@ final class $R_style$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - R_style fromReference(_$jni.JReference reference) => - R_style.fromReference(reference); + R_style fromReference(_$jni.JReference reference) => R_style.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => const $R_style$NullableType(); @_$jni.internal @_$core.override @@ -245,9 +373,46 @@ class R extends _$jni.JObject { static final _class = _$jni.JClass.forName(r'com/example/in_app_java/R'); /// The type which includes information such as the signature of this class. + static const nullableType = $R$NullableType(); static const type = $R$Type(); } +final class $R$NullableType extends _$jni.JObjType { + @_$jni.internal + const $R$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/example/in_app_java/R;'; + + @_$jni.internal + @_$core.override + R? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : R.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($R$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($R$NullableType) && other is $R$NullableType; + } +} + final class $R$Type extends _$jni.JObjType { @_$jni.internal const $R$Type(); @@ -258,11 +423,16 @@ final class $R$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - R fromReference(_$jni.JReference reference) => R.fromReference(reference); + R fromReference(_$jni.JReference reference) => R.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => const $R$NullableType(); @_$jni.internal @_$core.override @@ -293,6 +463,8 @@ class EmojiCompat_CodepointSequenceMatchResult extends _$jni.JObject { r'androidx/emoji2/text/EmojiCompat$CodepointSequenceMatchResult'); /// The type which includes information such as the signature of this class. + static const nullableType = + $EmojiCompat_CodepointSequenceMatchResult$NullableType(); static const type = $EmojiCompat_CodepointSequenceMatchResult$Type(); /// Maps a specific port to the implemented interface. @@ -378,6 +550,50 @@ final class _$EmojiCompat_CodepointSequenceMatchResult _$EmojiCompat_CodepointSequenceMatchResult(); } +final class $EmojiCompat_CodepointSequenceMatchResult$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_CodepointSequenceMatchResult$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/EmojiCompat$CodepointSequenceMatchResult;'; + + @_$jni.internal + @_$core.override + EmojiCompat_CodepointSequenceMatchResult? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_CodepointSequenceMatchResult.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => + ($EmojiCompat_CodepointSequenceMatchResult$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($EmojiCompat_CodepointSequenceMatchResult$NullableType) && + other is $EmojiCompat_CodepointSequenceMatchResult$NullableType; + } +} + final class $EmojiCompat_CodepointSequenceMatchResult$Type extends _$jni.JObjType { @_$jni.internal @@ -392,11 +608,17 @@ final class $EmojiCompat_CodepointSequenceMatchResult$Type @_$core.override EmojiCompat_CodepointSequenceMatchResult fromReference( _$jni.JReference reference) => - EmojiCompat_CodepointSequenceMatchResult.fromReference(reference); + EmojiCompat_CodepointSequenceMatchResult.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_CodepointSequenceMatchResult$NullableType(); @_$jni.internal @_$core.override @@ -429,6 +651,7 @@ class EmojiCompat_Config extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/EmojiCompat$Config'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_Config$NullableType(); static const type = $EmojiCompat_Config$Type(); static final _id_registerInitCallback = _class.instanceMethodId( r'registerInitCallback', @@ -448,14 +671,15 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config registerInitCallback(androidx.emoji2.text.EmojiCompat$InitCallback initCallback)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config registerInitCallback( - EmojiCompat_InitCallback initCallback, + EmojiCompat_Config? registerInitCallback( + EmojiCompat_InitCallback? initCallback, ) { + final _initCallback = initCallback?.reference ?? _$jni.jNullReference; return _registerInitCallback( reference.pointer, _id_registerInitCallback as _$jni.JMethodIDPtr, - initCallback.reference.pointer) - .object(const $EmojiCompat_Config$Type()); + _initCallback.pointer) + .object(const $EmojiCompat_Config$NullableType()); } static final _id_unregisterInitCallback = _class.instanceMethodId( @@ -476,14 +700,15 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config unregisterInitCallback(androidx.emoji2.text.EmojiCompat$InitCallback initCallback)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config unregisterInitCallback( - EmojiCompat_InitCallback initCallback, + EmojiCompat_Config? unregisterInitCallback( + EmojiCompat_InitCallback? initCallback, ) { + final _initCallback = initCallback?.reference ?? _$jni.jNullReference; return _unregisterInitCallback( reference.pointer, _id_unregisterInitCallback as _$jni.JMethodIDPtr, - initCallback.reference.pointer) - .object(const $EmojiCompat_Config$Type()); + _initCallback.pointer) + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setReplaceAll = _class.instanceMethodId( @@ -503,12 +728,12 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setReplaceAll(boolean z)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setReplaceAll( + EmojiCompat_Config? setReplaceAll( bool z, ) { return _setReplaceAll(reference.pointer, _id_setReplaceAll as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const $EmojiCompat_Config$Type()); + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setUseEmojiAsDefaultStyle = _class.instanceMethodId( @@ -528,12 +753,12 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setUseEmojiAsDefaultStyle(boolean z)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setUseEmojiAsDefaultStyle( + EmojiCompat_Config? setUseEmojiAsDefaultStyle( bool z, ) { return _setUseEmojiAsDefaultStyle(reference.pointer, _id_setUseEmojiAsDefaultStyle as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const $EmojiCompat_Config$Type()); + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setUseEmojiAsDefaultStyle$1 = _class.instanceMethodId( @@ -558,16 +783,17 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setUseEmojiAsDefaultStyle(boolean z, java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setUseEmojiAsDefaultStyle$1( + EmojiCompat_Config? setUseEmojiAsDefaultStyle$1( bool z, - _$jni.JList<_$jni.JInteger> list, + _$jni.JList<_$jni.JInteger?>? list, ) { + final _list = list?.reference ?? _$jni.jNullReference; return _setUseEmojiAsDefaultStyle$1( reference.pointer, _id_setUseEmojiAsDefaultStyle$1 as _$jni.JMethodIDPtr, z ? 1 : 0, - list.reference.pointer) - .object(const $EmojiCompat_Config$Type()); + _list.pointer) + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setEmojiSpanIndicatorEnabled = _class.instanceMethodId( @@ -587,12 +813,12 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setEmojiSpanIndicatorEnabled(boolean z)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setEmojiSpanIndicatorEnabled( + EmojiCompat_Config? setEmojiSpanIndicatorEnabled( bool z, ) { return _setEmojiSpanIndicatorEnabled(reference.pointer, _id_setEmojiSpanIndicatorEnabled as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const $EmojiCompat_Config$Type()); + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setEmojiSpanIndicatorColor = _class.instanceMethodId( @@ -612,12 +838,12 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setEmojiSpanIndicatorColor(int i)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setEmojiSpanIndicatorColor( + EmojiCompat_Config? setEmojiSpanIndicatorColor( int i, ) { return _setEmojiSpanIndicatorColor(reference.pointer, _id_setEmojiSpanIndicatorColor as _$jni.JMethodIDPtr, i) - .object(const $EmojiCompat_Config$Type()); + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setMetadataLoadStrategy = _class.instanceMethodId( @@ -637,12 +863,12 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setMetadataLoadStrategy(int i)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setMetadataLoadStrategy( + EmojiCompat_Config? setMetadataLoadStrategy( int i, ) { return _setMetadataLoadStrategy(reference.pointer, _id_setMetadataLoadStrategy as _$jni.JMethodIDPtr, i) - .object(const $EmojiCompat_Config$Type()); + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setSpanFactory = _class.instanceMethodId( @@ -663,14 +889,13 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setSpanFactory(androidx.emoji2.text.EmojiCompat$SpanFactory spanFactory)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setSpanFactory( - EmojiCompat_SpanFactory spanFactory, + EmojiCompat_Config? setSpanFactory( + EmojiCompat_SpanFactory? spanFactory, ) { - return _setSpanFactory( - reference.pointer, - _id_setSpanFactory as _$jni.JMethodIDPtr, - spanFactory.reference.pointer) - .object(const $EmojiCompat_Config$Type()); + final _spanFactory = spanFactory?.reference ?? _$jni.jNullReference; + return _setSpanFactory(reference.pointer, + _id_setSpanFactory as _$jni.JMethodIDPtr, _spanFactory.pointer) + .object(const $EmojiCompat_Config$NullableType()); } static final _id_setGlyphChecker = _class.instanceMethodId( @@ -691,14 +916,52 @@ class EmojiCompat_Config extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiCompat$Config setGlyphChecker(androidx.emoji2.text.EmojiCompat$GlyphChecker glyphChecker)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config setGlyphChecker( - EmojiCompat_GlyphChecker glyphChecker, + EmojiCompat_Config? setGlyphChecker( + EmojiCompat_GlyphChecker? glyphChecker, ) { - return _setGlyphChecker( - reference.pointer, - _id_setGlyphChecker as _$jni.JMethodIDPtr, - glyphChecker.reference.pointer) - .object(const $EmojiCompat_Config$Type()); + final _glyphChecker = glyphChecker?.reference ?? _$jni.jNullReference; + return _setGlyphChecker(reference.pointer, + _id_setGlyphChecker as _$jni.JMethodIDPtr, _glyphChecker.pointer) + .object(const $EmojiCompat_Config$NullableType()); + } +} + +final class $EmojiCompat_Config$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_Config$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/EmojiCompat$Config;'; + + @_$jni.internal + @_$core.override + EmojiCompat_Config? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_Config.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat_Config$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($EmojiCompat_Config$NullableType) && + other is $EmojiCompat_Config$NullableType; } } @@ -714,11 +977,17 @@ final class $EmojiCompat_Config$Type @_$jni.internal @_$core.override EmojiCompat_Config fromReference(_$jni.JReference reference) => - EmojiCompat_Config.fromReference(reference); + EmojiCompat_Config.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_Config$NullableType(); @_$jni.internal @_$core.override @@ -750,6 +1019,7 @@ class EmojiCompat_DefaultSpanFactory extends _$jni.JObject { r'androidx/emoji2/text/EmojiCompat$DefaultSpanFactory'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_DefaultSpanFactory$NullableType(); static const type = $EmojiCompat_DefaultSpanFactory$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -793,12 +1063,55 @@ class EmojiCompat_DefaultSpanFactory extends _$jni.JObject { /// from: `public androidx.emoji2.text.EmojiSpan createSpan(androidx.emoji2.text.TypefaceEmojiRasterizer typefaceEmojiRasterizer)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject createSpan( - _$jni.JObject typefaceEmojiRasterizer, + _$jni.JObject? createSpan( + _$jni.JObject? typefaceEmojiRasterizer, ) { + final _typefaceEmojiRasterizer = + typefaceEmojiRasterizer?.reference ?? _$jni.jNullReference; return _createSpan(reference.pointer, _id_createSpan as _$jni.JMethodIDPtr, - typefaceEmojiRasterizer.reference.pointer) - .object(const _$jni.JObjectType()); + _typefaceEmojiRasterizer.pointer) + .object(const _$jni.JObjectNullableType()); + } +} + +final class $EmojiCompat_DefaultSpanFactory$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_DefaultSpanFactory$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/EmojiCompat$DefaultSpanFactory;'; + + @_$jni.internal + @_$core.override + EmojiCompat_DefaultSpanFactory? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_DefaultSpanFactory.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat_DefaultSpanFactory$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($EmojiCompat_DefaultSpanFactory$NullableType) && + other is $EmojiCompat_DefaultSpanFactory$NullableType; } } @@ -815,11 +1128,17 @@ final class $EmojiCompat_DefaultSpanFactory$Type @_$jni.internal @_$core.override EmojiCompat_DefaultSpanFactory fromReference(_$jni.JReference reference) => - EmojiCompat_DefaultSpanFactory.fromReference(reference); + EmojiCompat_DefaultSpanFactory.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_DefaultSpanFactory$NullableType(); @_$jni.internal @_$core.override @@ -851,6 +1170,7 @@ class EmojiCompat_GlyphChecker extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/EmojiCompat$GlyphChecker'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_GlyphChecker$NullableType(); static const type = $EmojiCompat_GlyphChecker$Type(); static final _id_hasGlyph = _class.instanceMethodId( r'hasGlyph', @@ -875,13 +1195,14 @@ class EmojiCompat_GlyphChecker extends _$jni.JObject { /// from: `public abstract boolean hasGlyph(java.lang.CharSequence charSequence, int i, int i1, int i2)` bool hasGlyph( - _$jni.JObject charSequence, + _$jni.JObject? charSequence, int i, int i1, int i2, ) { + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; return _hasGlyph(reference.pointer, _id_hasGlyph as _$jni.JMethodIDPtr, - charSequence.reference.pointer, i, i1, i2) + _charSequence.pointer, i, i1, i2) .boolean; } @@ -917,7 +1238,7 @@ class EmojiCompat_GlyphChecker extends _$jni.JObject { final $a = $i.args; if ($d == r'hasGlyph(Ljava/lang/CharSequence;III)Z') { final $r = _$impls[$p]!.hasGlyph( - $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + $a[0].as(const _$jni.JObjectNullableType(), releaseOriginal: true), $a[1] .as(const _$jni.JIntegerType(), releaseOriginal: true) .intValue(releaseOriginal: true), @@ -974,27 +1295,66 @@ class EmojiCompat_GlyphChecker extends _$jni.JObject { abstract base mixin class $EmojiCompat_GlyphChecker { factory $EmojiCompat_GlyphChecker({ - required bool Function(_$jni.JObject charSequence, int i, int i1, int i2) + required bool Function(_$jni.JObject? charSequence, int i, int i1, int i2) hasGlyph, }) = _$EmojiCompat_GlyphChecker; - bool hasGlyph(_$jni.JObject charSequence, int i, int i1, int i2); + bool hasGlyph(_$jni.JObject? charSequence, int i, int i1, int i2); } final class _$EmojiCompat_GlyphChecker with $EmojiCompat_GlyphChecker { _$EmojiCompat_GlyphChecker({ - required bool Function(_$jni.JObject charSequence, int i, int i1, int i2) + required bool Function(_$jni.JObject? charSequence, int i, int i1, int i2) hasGlyph, }) : _hasGlyph = hasGlyph; - final bool Function(_$jni.JObject charSequence, int i, int i1, int i2) + final bool Function(_$jni.JObject? charSequence, int i, int i1, int i2) _hasGlyph; - bool hasGlyph(_$jni.JObject charSequence, int i, int i1, int i2) { + bool hasGlyph(_$jni.JObject? charSequence, int i, int i1, int i2) { return _hasGlyph(charSequence, i, i1, i2); } } +final class $EmojiCompat_GlyphChecker$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_GlyphChecker$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/EmojiCompat$GlyphChecker;'; + + @_$jni.internal + @_$core.override + EmojiCompat_GlyphChecker? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_GlyphChecker.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat_GlyphChecker$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($EmojiCompat_GlyphChecker$NullableType) && + other is $EmojiCompat_GlyphChecker$NullableType; + } +} + final class $EmojiCompat_GlyphChecker$Type extends _$jni.JObjType { @_$jni.internal @@ -1007,11 +1367,17 @@ final class $EmojiCompat_GlyphChecker$Type @_$jni.internal @_$core.override EmojiCompat_GlyphChecker fromReference(_$jni.JReference reference) => - EmojiCompat_GlyphChecker.fromReference(reference); + EmojiCompat_GlyphChecker.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_GlyphChecker$NullableType(); @_$jni.internal @_$core.override @@ -1043,6 +1409,7 @@ class EmojiCompat_InitCallback extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/EmojiCompat$InitCallback'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_InitCallback$NullableType(); static const type = $EmojiCompat_InitCallback$Type(); static final _id_onInitialized = _class.instanceMethodId( r'onInitialized', @@ -1085,14 +1452,54 @@ class EmojiCompat_InitCallback extends _$jni.JObject { /// from: `public void onFailed(java.lang.Throwable throwable)` void onFailed( - _$jni.JObject throwable, + _$jni.JObject? throwable, ) { + final _throwable = throwable?.reference ?? _$jni.jNullReference; _onFailed(reference.pointer, _id_onFailed as _$jni.JMethodIDPtr, - throwable.reference.pointer) + _throwable.pointer) .check(); } } +final class $EmojiCompat_InitCallback$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_InitCallback$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/EmojiCompat$InitCallback;'; + + @_$jni.internal + @_$core.override + EmojiCompat_InitCallback? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_InitCallback.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat_InitCallback$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($EmojiCompat_InitCallback$NullableType) && + other is $EmojiCompat_InitCallback$NullableType; + } +} + final class $EmojiCompat_InitCallback$Type extends _$jni.JObjType { @_$jni.internal @@ -1105,11 +1512,17 @@ final class $EmojiCompat_InitCallback$Type @_$jni.internal @_$core.override EmojiCompat_InitCallback fromReference(_$jni.JReference reference) => - EmojiCompat_InitCallback.fromReference(reference); + EmojiCompat_InitCallback.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_InitCallback$NullableType(); @_$jni.internal @_$core.override @@ -1141,6 +1554,7 @@ class EmojiCompat_LoadStrategy extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/EmojiCompat$LoadStrategy'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_LoadStrategy$NullableType(); static const type = $EmojiCompat_LoadStrategy$Type(); /// Maps a specific port to the implemented interface. @@ -1223,6 +1637,45 @@ final class _$EmojiCompat_LoadStrategy with $EmojiCompat_LoadStrategy { _$EmojiCompat_LoadStrategy(); } +final class $EmojiCompat_LoadStrategy$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_LoadStrategy$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/EmojiCompat$LoadStrategy;'; + + @_$jni.internal + @_$core.override + EmojiCompat_LoadStrategy? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_LoadStrategy.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat_LoadStrategy$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($EmojiCompat_LoadStrategy$NullableType) && + other is $EmojiCompat_LoadStrategy$NullableType; + } +} + final class $EmojiCompat_LoadStrategy$Type extends _$jni.JObjType { @_$jni.internal @@ -1235,11 +1688,17 @@ final class $EmojiCompat_LoadStrategy$Type @_$jni.internal @_$core.override EmojiCompat_LoadStrategy fromReference(_$jni.JReference reference) => - EmojiCompat_LoadStrategy.fromReference(reference); + EmojiCompat_LoadStrategy.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_LoadStrategy$NullableType(); @_$jni.internal @_$core.override @@ -1271,6 +1730,7 @@ class EmojiCompat_MetadataRepoLoader extends _$jni.JObject { r'androidx/emoji2/text/EmojiCompat$MetadataRepoLoader'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_MetadataRepoLoader$NullableType(); static const type = $EmojiCompat_MetadataRepoLoader$Type(); static final _id_load = _class.instanceMethodId( r'load', @@ -1290,10 +1750,12 @@ class EmojiCompat_MetadataRepoLoader extends _$jni.JObject { /// from: `public abstract void load(androidx.emoji2.text.EmojiCompat$MetadataRepoLoaderCallback metadataRepoLoaderCallback)` void load( - EmojiCompat_MetadataRepoLoaderCallback metadataRepoLoaderCallback, + EmojiCompat_MetadataRepoLoaderCallback? metadataRepoLoaderCallback, ) { + final _metadataRepoLoaderCallback = + metadataRepoLoaderCallback?.reference ?? _$jni.jNullReference; _load(reference.pointer, _id_load as _$jni.JMethodIDPtr, - metadataRepoLoaderCallback.reference.pointer) + _metadataRepoLoaderCallback.pointer) .check(); } @@ -1330,7 +1792,7 @@ class EmojiCompat_MetadataRepoLoader extends _$jni.JObject { if ($d == r'load(Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback;)V') { _$impls[$p]!.load( - $a[0].as(const $EmojiCompat_MetadataRepoLoaderCallback$Type(), + $a[0].as(const $EmojiCompat_MetadataRepoLoaderCallback$NullableType(), releaseOriginal: true), ); return _$jni.nullptr; @@ -1383,30 +1845,72 @@ class EmojiCompat_MetadataRepoLoader extends _$jni.JObject { abstract base mixin class $EmojiCompat_MetadataRepoLoader { factory $EmojiCompat_MetadataRepoLoader({ required void Function( - EmojiCompat_MetadataRepoLoaderCallback metadataRepoLoaderCallback) + EmojiCompat_MetadataRepoLoaderCallback? metadataRepoLoaderCallback) load, bool load$async, }) = _$EmojiCompat_MetadataRepoLoader; - void load(EmojiCompat_MetadataRepoLoaderCallback metadataRepoLoaderCallback); - bool get load$async => false; -} + void load(EmojiCompat_MetadataRepoLoaderCallback? metadataRepoLoaderCallback); + bool get load$async => false; +} + +final class _$EmojiCompat_MetadataRepoLoader + with $EmojiCompat_MetadataRepoLoader { + _$EmojiCompat_MetadataRepoLoader({ + required void Function( + EmojiCompat_MetadataRepoLoaderCallback? metadataRepoLoaderCallback) + load, + this.load$async = false, + }) : _load = load; + + final void Function( + EmojiCompat_MetadataRepoLoaderCallback? metadataRepoLoaderCallback) _load; + final bool load$async; + + void load( + EmojiCompat_MetadataRepoLoaderCallback? metadataRepoLoaderCallback) { + return _load(metadataRepoLoaderCallback); + } +} + +final class $EmojiCompat_MetadataRepoLoader$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_MetadataRepoLoader$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoader;'; + + @_$jni.internal + @_$core.override + EmojiCompat_MetadataRepoLoader? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_MetadataRepoLoader.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; -final class _$EmojiCompat_MetadataRepoLoader - with $EmojiCompat_MetadataRepoLoader { - _$EmojiCompat_MetadataRepoLoader({ - required void Function( - EmojiCompat_MetadataRepoLoaderCallback metadataRepoLoaderCallback) - load, - this.load$async = false, - }) : _load = load; + @_$jni.internal + @_$core.override + final superCount = 1; - final void Function( - EmojiCompat_MetadataRepoLoaderCallback metadataRepoLoaderCallback) _load; - final bool load$async; + @_$core.override + int get hashCode => ($EmojiCompat_MetadataRepoLoader$NullableType).hashCode; - void load(EmojiCompat_MetadataRepoLoaderCallback metadataRepoLoaderCallback) { - return _load(metadataRepoLoaderCallback); + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($EmojiCompat_MetadataRepoLoader$NullableType) && + other is $EmojiCompat_MetadataRepoLoader$NullableType; } } @@ -1423,11 +1927,17 @@ final class $EmojiCompat_MetadataRepoLoader$Type @_$jni.internal @_$core.override EmojiCompat_MetadataRepoLoader fromReference(_$jni.JReference reference) => - EmojiCompat_MetadataRepoLoader.fromReference(reference); + EmojiCompat_MetadataRepoLoader.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_MetadataRepoLoader$NullableType(); @_$jni.internal @_$core.override @@ -1459,6 +1969,8 @@ class EmojiCompat_MetadataRepoLoaderCallback extends _$jni.JObject { r'androidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback'); /// The type which includes information such as the signature of this class. + static const nullableType = + $EmojiCompat_MetadataRepoLoaderCallback$NullableType(); static const type = $EmojiCompat_MetadataRepoLoaderCallback$Type(); static final _id_onLoaded = _class.instanceMethodId( r'onLoaded', @@ -1478,10 +1990,11 @@ class EmojiCompat_MetadataRepoLoaderCallback extends _$jni.JObject { /// from: `public abstract void onLoaded(androidx.emoji2.text.MetadataRepo metadataRepo)` void onLoaded( - _$jni.JObject metadataRepo, + _$jni.JObject? metadataRepo, ) { + final _metadataRepo = metadataRepo?.reference ?? _$jni.jNullReference; _onLoaded(reference.pointer, _id_onLoaded as _$jni.JMethodIDPtr, - metadataRepo.reference.pointer) + _metadataRepo.pointer) .check(); } @@ -1503,14 +2016,59 @@ class EmojiCompat_MetadataRepoLoaderCallback extends _$jni.JObject { /// from: `public abstract void onFailed(java.lang.Throwable throwable)` void onFailed( - _$jni.JObject throwable, + _$jni.JObject? throwable, ) { + final _throwable = throwable?.reference ?? _$jni.jNullReference; _onFailed(reference.pointer, _id_onFailed as _$jni.JMethodIDPtr, - throwable.reference.pointer) + _throwable.pointer) .check(); } } +final class $EmojiCompat_MetadataRepoLoaderCallback$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_MetadataRepoLoaderCallback$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/EmojiCompat$MetadataRepoLoaderCallback;'; + + @_$jni.internal + @_$core.override + EmojiCompat_MetadataRepoLoaderCallback? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_MetadataRepoLoaderCallback.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => + ($EmojiCompat_MetadataRepoLoaderCallback$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($EmojiCompat_MetadataRepoLoaderCallback$NullableType) && + other is $EmojiCompat_MetadataRepoLoaderCallback$NullableType; + } +} + final class $EmojiCompat_MetadataRepoLoaderCallback$Type extends _$jni.JObjType { @_$jni.internal @@ -1525,11 +2083,17 @@ final class $EmojiCompat_MetadataRepoLoaderCallback$Type @_$core.override EmojiCompat_MetadataRepoLoaderCallback fromReference( _$jni.JReference reference) => - EmojiCompat_MetadataRepoLoaderCallback.fromReference(reference); + EmojiCompat_MetadataRepoLoaderCallback.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_MetadataRepoLoaderCallback$NullableType(); @_$jni.internal @_$core.override @@ -1562,6 +2126,7 @@ class EmojiCompat_ReplaceStrategy extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/EmojiCompat$ReplaceStrategy'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_ReplaceStrategy$NullableType(); static const type = $EmojiCompat_ReplaceStrategy$Type(); /// Maps a specific port to the implemented interface. @@ -1644,6 +2209,45 @@ final class _$EmojiCompat_ReplaceStrategy with $EmojiCompat_ReplaceStrategy { _$EmojiCompat_ReplaceStrategy(); } +final class $EmojiCompat_ReplaceStrategy$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_ReplaceStrategy$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/EmojiCompat$ReplaceStrategy;'; + + @_$jni.internal + @_$core.override + EmojiCompat_ReplaceStrategy? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_ReplaceStrategy.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat_ReplaceStrategy$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($EmojiCompat_ReplaceStrategy$NullableType) && + other is $EmojiCompat_ReplaceStrategy$NullableType; + } +} + final class $EmojiCompat_ReplaceStrategy$Type extends _$jni.JObjType { @_$jni.internal @@ -1656,11 +2260,17 @@ final class $EmojiCompat_ReplaceStrategy$Type @_$jni.internal @_$core.override EmojiCompat_ReplaceStrategy fromReference(_$jni.JReference reference) => - EmojiCompat_ReplaceStrategy.fromReference(reference); + EmojiCompat_ReplaceStrategy.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_ReplaceStrategy$NullableType(); @_$jni.internal @_$core.override @@ -1692,6 +2302,7 @@ class EmojiCompat_SpanFactory extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/EmojiCompat$SpanFactory'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat_SpanFactory$NullableType(); static const type = $EmojiCompat_SpanFactory$Type(); static final _id_createSpan = _class.instanceMethodId( r'createSpan', @@ -1711,12 +2322,14 @@ class EmojiCompat_SpanFactory extends _$jni.JObject { /// from: `public abstract androidx.emoji2.text.EmojiSpan createSpan(androidx.emoji2.text.TypefaceEmojiRasterizer typefaceEmojiRasterizer)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject createSpan( - _$jni.JObject typefaceEmojiRasterizer, + _$jni.JObject? createSpan( + _$jni.JObject? typefaceEmojiRasterizer, ) { + final _typefaceEmojiRasterizer = + typefaceEmojiRasterizer?.reference ?? _$jni.jNullReference; return _createSpan(reference.pointer, _id_createSpan as _$jni.JMethodIDPtr, - typefaceEmojiRasterizer.reference.pointer) - .object(const _$jni.JObjectType()); + _typefaceEmojiRasterizer.pointer) + .object(const _$jni.JObjectNullableType()); } /// Maps a specific port to the implemented interface. @@ -1752,7 +2365,7 @@ class EmojiCompat_SpanFactory extends _$jni.JObject { if ($d == r'createSpan(Landroidx/emoji2/text/TypefaceEmojiRasterizer;)Landroidx/emoji2/text/EmojiSpan;') { final $r = _$impls[$p]!.createSpan( - $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + $a[0].as(const _$jni.JObjectNullableType(), releaseOriginal: true), ); return ($r as _$jni.JObject) .as(const _$jni.JObjectType()) @@ -1803,27 +2416,66 @@ class EmojiCompat_SpanFactory extends _$jni.JObject { abstract base mixin class $EmojiCompat_SpanFactory { factory $EmojiCompat_SpanFactory({ - required _$jni.JObject Function(_$jni.JObject typefaceEmojiRasterizer) + required _$jni.JObject? Function(_$jni.JObject? typefaceEmojiRasterizer) createSpan, }) = _$EmojiCompat_SpanFactory; - _$jni.JObject createSpan(_$jni.JObject typefaceEmojiRasterizer); + _$jni.JObject? createSpan(_$jni.JObject? typefaceEmojiRasterizer); } final class _$EmojiCompat_SpanFactory with $EmojiCompat_SpanFactory { _$EmojiCompat_SpanFactory({ - required _$jni.JObject Function(_$jni.JObject typefaceEmojiRasterizer) + required _$jni.JObject? Function(_$jni.JObject? typefaceEmojiRasterizer) createSpan, }) : _createSpan = createSpan; - final _$jni.JObject Function(_$jni.JObject typefaceEmojiRasterizer) + final _$jni.JObject? Function(_$jni.JObject? typefaceEmojiRasterizer) _createSpan; - _$jni.JObject createSpan(_$jni.JObject typefaceEmojiRasterizer) { + _$jni.JObject? createSpan(_$jni.JObject? typefaceEmojiRasterizer) { return _createSpan(typefaceEmojiRasterizer); } } +final class $EmojiCompat_SpanFactory$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat_SpanFactory$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/EmojiCompat$SpanFactory;'; + + @_$jni.internal + @_$core.override + EmojiCompat_SpanFactory? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : EmojiCompat_SpanFactory.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat_SpanFactory$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($EmojiCompat_SpanFactory$NullableType) && + other is $EmojiCompat_SpanFactory$NullableType; + } +} + final class $EmojiCompat_SpanFactory$Type extends _$jni.JObjType { @_$jni.internal @@ -1836,11 +2488,17 @@ final class $EmojiCompat_SpanFactory$Type @_$jni.internal @_$core.override EmojiCompat_SpanFactory fromReference(_$jni.JReference reference) => - EmojiCompat_SpanFactory.fromReference(reference); + EmojiCompat_SpanFactory.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat_SpanFactory$NullableType(); @_$jni.internal @_$core.override @@ -1872,6 +2530,7 @@ class EmojiCompat extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/EmojiCompat'); /// The type which includes information such as the signature of this class. + static const nullableType = $EmojiCompat$NullableType(); static const type = $EmojiCompat$Type(); static final _id_EDITOR_INFO_METAVERSION_KEY = _class.staticFieldId( r'EDITOR_INFO_METAVERSION_KEY', @@ -1880,8 +2539,9 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public final java.lang.String EDITOR_INFO_METAVERSION_KEY` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get EDITOR_INFO_METAVERSION_KEY => - _id_EDITOR_INFO_METAVERSION_KEY.get(_class, const _$jni.JStringType()); + static _$jni.JString? get EDITOR_INFO_METAVERSION_KEY => + _id_EDITOR_INFO_METAVERSION_KEY.get( + _class, const _$jni.JStringNullableType()); static final _id_EDITOR_INFO_REPLACE_ALL_KEY = _class.staticFieldId( r'EDITOR_INFO_REPLACE_ALL_KEY', @@ -1890,8 +2550,9 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public final java.lang.String EDITOR_INFO_REPLACE_ALL_KEY` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get EDITOR_INFO_REPLACE_ALL_KEY => - _id_EDITOR_INFO_REPLACE_ALL_KEY.get(_class, const _$jni.JStringType()); + static _$jni.JString? get EDITOR_INFO_REPLACE_ALL_KEY => + _id_EDITOR_INFO_REPLACE_ALL_KEY.get( + _class, const _$jni.JStringNullableType()); /// from: `static public final int LOAD_STATE_DEFAULT` static const LOAD_STATE_DEFAULT = 3; @@ -1946,12 +2607,13 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public androidx.emoji2.text.EmojiCompat init(android.content.Context context)` /// The returned object must be released after use, by calling the [release] method. - static EmojiCompat init( - _$jni.JObject context, + static EmojiCompat? init( + _$jni.JObject? context, ) { + final _context = context?.reference ?? _$jni.jNullReference; return _init(_class.reference.pointer, _id_init as _$jni.JMethodIDPtr, - context.reference.pointer) - .object(const $EmojiCompat$Type()); + _context.pointer) + .object(const $EmojiCompat$NullableType()); } static final _id_init$1 = _class.staticMethodId( @@ -1978,17 +2640,17 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public androidx.emoji2.text.EmojiCompat init(android.content.Context context, androidx.emoji2.text.DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory defaultEmojiCompatConfigFactory)` /// The returned object must be released after use, by calling the [release] method. - static EmojiCompat init$1( - _$jni.JObject context, - DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory + static EmojiCompat? init$1( + _$jni.JObject? context, + DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory? defaultEmojiCompatConfigFactory, ) { - return _init$1( - _class.reference.pointer, - _id_init$1 as _$jni.JMethodIDPtr, - context.reference.pointer, - defaultEmojiCompatConfigFactory.reference.pointer) - .object(const $EmojiCompat$Type()); + final _context = context?.reference ?? _$jni.jNullReference; + final _defaultEmojiCompatConfigFactory = + defaultEmojiCompatConfigFactory?.reference ?? _$jni.jNullReference; + return _init$1(_class.reference.pointer, _id_init$1 as _$jni.JMethodIDPtr, + _context.pointer, _defaultEmojiCompatConfigFactory.pointer) + .object(const $EmojiCompat$NullableType()); } static final _id_init$2 = _class.staticMethodId( @@ -2009,12 +2671,13 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public androidx.emoji2.text.EmojiCompat init(androidx.emoji2.text.EmojiCompat$Config config)` /// The returned object must be released after use, by calling the [release] method. - static EmojiCompat init$2( - EmojiCompat_Config config, + static EmojiCompat? init$2( + EmojiCompat_Config? config, ) { + final _config = config?.reference ?? _$jni.jNullReference; return _init$2(_class.reference.pointer, _id_init$2 as _$jni.JMethodIDPtr, - config.reference.pointer) - .object(const $EmojiCompat$Type()); + _config.pointer) + .object(const $EmojiCompat$NullableType()); } static final _id_isConfigured = _class.staticMethodId( @@ -2059,12 +2722,13 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public androidx.emoji2.text.EmojiCompat reset(androidx.emoji2.text.EmojiCompat$Config config)` /// The returned object must be released after use, by calling the [release] method. - static EmojiCompat reset( - EmojiCompat_Config config, + static EmojiCompat? reset( + EmojiCompat_Config? config, ) { + final _config = config?.reference ?? _$jni.jNullReference; return _reset(_class.reference.pointer, _id_reset as _$jni.JMethodIDPtr, - config.reference.pointer) - .object(const $EmojiCompat$Type()); + _config.pointer) + .object(const $EmojiCompat$NullableType()); } static final _id_reset$1 = _class.staticMethodId( @@ -2085,12 +2749,13 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public androidx.emoji2.text.EmojiCompat reset(androidx.emoji2.text.EmojiCompat emojiCompat)` /// The returned object must be released after use, by calling the [release] method. - static EmojiCompat reset$1( - EmojiCompat emojiCompat, + static EmojiCompat? reset$1( + EmojiCompat? emojiCompat, ) { + final _emojiCompat = emojiCompat?.reference ?? _$jni.jNullReference; return _reset$1(_class.reference.pointer, _id_reset$1 as _$jni.JMethodIDPtr, - emojiCompat.reference.pointer) - .object(const $EmojiCompat$Type()); + _emojiCompat.pointer) + .object(const $EmojiCompat$NullableType()); } static final _id_skipDefaultConfigurationLookup = _class.staticMethodId( @@ -2136,9 +2801,9 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public androidx.emoji2.text.EmojiCompat get()` /// The returned object must be released after use, by calling the [release] method. - static EmojiCompat get() { + static EmojiCompat? get() { return _get(_class.reference.pointer, _id_get as _$jni.JMethodIDPtr) - .object(const $EmojiCompat$Type()); + .object(const $EmojiCompat$NullableType()); } static final _id_load = _class.instanceMethodId( @@ -2181,12 +2846,13 @@ class EmojiCompat extends _$jni.JObject { /// from: `public void registerInitCallback(androidx.emoji2.text.EmojiCompat$InitCallback initCallback)` void registerInitCallback( - EmojiCompat_InitCallback initCallback, + EmojiCompat_InitCallback? initCallback, ) { + final _initCallback = initCallback?.reference ?? _$jni.jNullReference; _registerInitCallback( reference.pointer, _id_registerInitCallback as _$jni.JMethodIDPtr, - initCallback.reference.pointer) + _initCallback.pointer) .check(); } @@ -2208,12 +2874,13 @@ class EmojiCompat extends _$jni.JObject { /// from: `public void unregisterInitCallback(androidx.emoji2.text.EmojiCompat$InitCallback initCallback)` void unregisterInitCallback( - EmojiCompat_InitCallback initCallback, + EmojiCompat_InitCallback? initCallback, ) { + final _initCallback = initCallback?.reference ?? _$jni.jNullReference; _unregisterInitCallback( reference.pointer, _id_unregisterInitCallback as _$jni.JMethodIDPtr, - initCallback.reference.pointer) + _initCallback.pointer) .check(); } @@ -2310,14 +2977,12 @@ class EmojiCompat extends _$jni.JObject { /// from: `public int getEmojiStart(java.lang.CharSequence charSequence, int i)` int getEmojiStart( - _$jni.JObject charSequence, + _$jni.JObject? charSequence, int i, ) { - return _getEmojiStart( - reference.pointer, - _id_getEmojiStart as _$jni.JMethodIDPtr, - charSequence.reference.pointer, - i) + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; + return _getEmojiStart(reference.pointer, + _id_getEmojiStart as _$jni.JMethodIDPtr, _charSequence.pointer, i) .integer; } @@ -2340,14 +3005,12 @@ class EmojiCompat extends _$jni.JObject { /// from: `public int getEmojiEnd(java.lang.CharSequence charSequence, int i)` int getEmojiEnd( - _$jni.JObject charSequence, + _$jni.JObject? charSequence, int i, ) { - return _getEmojiEnd( - reference.pointer, - _id_getEmojiEnd as _$jni.JMethodIDPtr, - charSequence.reference.pointer, - i) + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; + return _getEmojiEnd(reference.pointer, + _id_getEmojiEnd as _$jni.JMethodIDPtr, _charSequence.pointer, i) .integer; } @@ -2377,16 +3040,18 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public boolean handleOnKeyDown(android.text.Editable editable, int i, android.view.KeyEvent keyEvent)` static bool handleOnKeyDown( - _$jni.JObject editable, + _$jni.JObject? editable, int i, - _$jni.JObject keyEvent, + _$jni.JObject? keyEvent, ) { + final _editable = editable?.reference ?? _$jni.jNullReference; + final _keyEvent = keyEvent?.reference ?? _$jni.jNullReference; return _handleOnKeyDown( _class.reference.pointer, _id_handleOnKeyDown as _$jni.JMethodIDPtr, - editable.reference.pointer, + _editable.pointer, i, - keyEvent.reference.pointer) + _keyEvent.pointer) .boolean; } @@ -2421,17 +3086,19 @@ class EmojiCompat extends _$jni.JObject { /// from: `static public boolean handleDeleteSurroundingText(android.view.inputmethod.InputConnection inputConnection, android.text.Editable editable, int i, int i1, boolean z)` static bool handleDeleteSurroundingText( - _$jni.JObject inputConnection, - _$jni.JObject editable, + _$jni.JObject? inputConnection, + _$jni.JObject? editable, int i, int i1, bool z, ) { + final _inputConnection = inputConnection?.reference ?? _$jni.jNullReference; + final _editable = editable?.reference ?? _$jni.jNullReference; return _handleDeleteSurroundingText( _class.reference.pointer, _id_handleDeleteSurroundingText as _$jni.JMethodIDPtr, - inputConnection.reference.pointer, - editable.reference.pointer, + _inputConnection.pointer, + _editable.pointer, i, i1, z ? 1 : 0) @@ -2456,12 +3123,11 @@ class EmojiCompat extends _$jni.JObject { /// from: `public boolean hasEmojiGlyph(java.lang.CharSequence charSequence)` bool hasEmojiGlyph( - _$jni.JObject charSequence, + _$jni.JObject? charSequence, ) { - return _hasEmojiGlyph( - reference.pointer, - _id_hasEmojiGlyph as _$jni.JMethodIDPtr, - charSequence.reference.pointer) + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; + return _hasEmojiGlyph(reference.pointer, + _id_hasEmojiGlyph as _$jni.JMethodIDPtr, _charSequence.pointer) .boolean; } @@ -2484,14 +3150,12 @@ class EmojiCompat extends _$jni.JObject { /// from: `public boolean hasEmojiGlyph(java.lang.CharSequence charSequence, int i)` bool hasEmojiGlyph$1( - _$jni.JObject charSequence, + _$jni.JObject? charSequence, int i, ) { - return _hasEmojiGlyph$1( - reference.pointer, - _id_hasEmojiGlyph$1 as _$jni.JMethodIDPtr, - charSequence.reference.pointer, - i) + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; + return _hasEmojiGlyph$1(reference.pointer, + _id_hasEmojiGlyph$1 as _$jni.JMethodIDPtr, _charSequence.pointer, i) .boolean; } @@ -2514,14 +3178,12 @@ class EmojiCompat extends _$jni.JObject { /// from: `public int getEmojiMatch(java.lang.CharSequence charSequence, int i)` int getEmojiMatch( - _$jni.JObject charSequence, + _$jni.JObject? charSequence, int i, ) { - return _getEmojiMatch( - reference.pointer, - _id_getEmojiMatch as _$jni.JMethodIDPtr, - charSequence.reference.pointer, - i) + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; + return _getEmojiMatch(reference.pointer, + _id_getEmojiMatch as _$jni.JMethodIDPtr, _charSequence.pointer, i) .integer; } @@ -2543,12 +3205,13 @@ class EmojiCompat extends _$jni.JObject { /// from: `public java.lang.CharSequence process(java.lang.CharSequence charSequence)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject process( - _$jni.JObject charSequence, + _$jni.JObject? process( + _$jni.JObject? charSequence, ) { + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; return _process(reference.pointer, _id_process as _$jni.JMethodIDPtr, - charSequence.reference.pointer) - .object(const _$jni.JObjectType()); + _charSequence.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_process$1 = _class.instanceMethodId( @@ -2573,14 +3236,15 @@ class EmojiCompat extends _$jni.JObject { /// from: `public java.lang.CharSequence process(java.lang.CharSequence charSequence, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject process$1( - _$jni.JObject charSequence, + _$jni.JObject? process$1( + _$jni.JObject? charSequence, int i, int i1, ) { + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; return _process$1(reference.pointer, _id_process$1 as _$jni.JMethodIDPtr, - charSequence.reference.pointer, i, i1) - .object(const _$jni.JObjectType()); + _charSequence.pointer, i, i1) + .object(const _$jni.JObjectNullableType()); } static final _id_process$2 = _class.instanceMethodId( @@ -2606,15 +3270,16 @@ class EmojiCompat extends _$jni.JObject { /// from: `public java.lang.CharSequence process(java.lang.CharSequence charSequence, int i, int i1, int i2)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject process$2( - _$jni.JObject charSequence, + _$jni.JObject? process$2( + _$jni.JObject? charSequence, int i, int i1, int i2, ) { + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; return _process$2(reference.pointer, _id_process$2 as _$jni.JMethodIDPtr, - charSequence.reference.pointer, i, i1, i2) - .object(const _$jni.JObjectType()); + _charSequence.pointer, i, i1, i2) + .object(const _$jni.JObjectNullableType()); } static final _id_process$3 = _class.instanceMethodId( @@ -2647,16 +3312,17 @@ class EmojiCompat extends _$jni.JObject { /// from: `public java.lang.CharSequence process(java.lang.CharSequence charSequence, int i, int i1, int i2, int i3)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject process$3( - _$jni.JObject charSequence, + _$jni.JObject? process$3( + _$jni.JObject? charSequence, int i, int i1, int i2, int i3, ) { + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; return _process$3(reference.pointer, _id_process$3 as _$jni.JMethodIDPtr, - charSequence.reference.pointer, i, i1, i2, i3) - .object(const _$jni.JObjectType()); + _charSequence.pointer, i, i1, i2, i3) + .object(const _$jni.JObjectNullableType()); } static final _id_getAssetSignature = _class.instanceMethodId( @@ -2678,10 +3344,10 @@ class EmojiCompat extends _$jni.JObject { /// from: `public java.lang.String getAssetSignature()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JString getAssetSignature() { + _$jni.JString? getAssetSignature() { return _getAssetSignature( reference.pointer, _id_getAssetSignature as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_updateEditorInfo = _class.instanceMethodId( @@ -2702,16 +3368,52 @@ class EmojiCompat extends _$jni.JObject { /// from: `public void updateEditorInfo(android.view.inputmethod.EditorInfo editorInfo)` void updateEditorInfo( - _$jni.JObject editorInfo, + _$jni.JObject? editorInfo, ) { - _updateEditorInfo( - reference.pointer, - _id_updateEditorInfo as _$jni.JMethodIDPtr, - editorInfo.reference.pointer) + final _editorInfo = editorInfo?.reference ?? _$jni.jNullReference; + _updateEditorInfo(reference.pointer, + _id_updateEditorInfo as _$jni.JMethodIDPtr, _editorInfo.pointer) .check(); } } +final class $EmojiCompat$NullableType extends _$jni.JObjType { + @_$jni.internal + const $EmojiCompat$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/EmojiCompat;'; + + @_$jni.internal + @_$core.override + EmojiCompat? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : EmojiCompat.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($EmojiCompat$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($EmojiCompat$NullableType) && + other is $EmojiCompat$NullableType; + } +} + final class $EmojiCompat$Type extends _$jni.JObjType { @_$jni.internal const $EmojiCompat$Type(); @@ -2723,11 +3425,17 @@ final class $EmojiCompat$Type extends _$jni.JObjType { @_$jni.internal @_$core.override EmojiCompat fromReference(_$jni.JReference reference) => - EmojiCompat.fromReference(reference); + EmojiCompat.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $EmojiCompat$NullableType(); @_$jni.internal @_$core.override @@ -2761,6 +3469,8 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory r'androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory'); /// The type which includes information such as the signature of this class. + static const nullableType = + $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$NullableType(); static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$Type(); static final _id_new$ = _class.constructorId( @@ -2781,14 +3491,16 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory /// from: `public void (androidx.emoji2.text.DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper defaultEmojiCompatConfigHelper)` /// The returned object must be released after use, by calling the [release] method. factory DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory( - DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper + DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper? defaultEmojiCompatConfigHelper, ) { + final _defaultEmojiCompatConfigHelper = + defaultEmojiCompatConfigHelper?.reference ?? _$jni.jNullReference; return DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory .fromReference(_new$( _class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, - defaultEmojiCompatConfigHelper.reference.pointer) + _defaultEmojiCompatConfigHelper.pointer) .reference); } @@ -2810,12 +3522,61 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory /// from: `public androidx.emoji2.text.EmojiCompat$Config create(android.content.Context context)` /// The returned object must be released after use, by calling the [release] method. - EmojiCompat_Config create( - _$jni.JObject context, + EmojiCompat_Config? create( + _$jni.JObject? context, ) { + final _context = context?.reference ?? _$jni.jNullReference; return _create(reference.pointer, _id_create as _$jni.JMethodIDPtr, - context.reference.pointer) - .object(const $EmojiCompat_Config$Type()); + _context.pointer) + .object(const $EmojiCompat_Config$NullableType()); + } +} + +final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$NullableType + extends _$jni + .JObjType { + @_$jni.internal + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigFactory;'; + + @_$jni.internal + @_$core.override + DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory + .fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType + get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$NullableType) + .hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$NullableType) && + other + is $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$NullableType; } } @@ -2835,11 +3596,17 @@ final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$Type DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory fromReference( _$jni.JReference reference) => DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory.fromReference( - reference); + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType + get nullableType => + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigFactory$NullableType(); @_$jni.internal @_$core.override @@ -2875,6 +3642,8 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper r'androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper'); /// The type which includes information such as the signature of this class. + static const nullableType = + $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType(); static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$Type(); static final _id_new$ = _class.constructorId( @@ -2926,16 +3695,18 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper /// from: `public android.content.pm.Signature[] getSigningSignatures(android.content.pm.PackageManager packageManager, java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.JObject> getSigningSignatures( - _$jni.JObject packageManager, - _$jni.JString string, + _$jni.JArray<_$jni.JObject?>? getSigningSignatures( + _$jni.JObject? packageManager, + _$jni.JString? string, ) { + final _packageManager = packageManager?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; return _getSigningSignatures( reference.pointer, _id_getSigningSignatures as _$jni.JMethodIDPtr, - packageManager.reference.pointer, - string.reference.pointer) - .object(const _$jni.JArrayType(_$jni.JObjectType())); + _packageManager.pointer, + _string.pointer) + .object(const _$jni.JArrayNullableType(_$jni.JObjectNullableType())); } static final _id_queryIntentContentProviders = _class.instanceMethodId( @@ -2965,18 +3736,20 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper /// from: `public java.util.List queryIntentContentProviders(android.content.pm.PackageManager packageManager, android.content.Intent intent, int i)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JObject> queryIntentContentProviders( - _$jni.JObject packageManager, - _$jni.JObject intent, + _$jni.JList<_$jni.JObject?>? queryIntentContentProviders( + _$jni.JObject? packageManager, + _$jni.JObject? intent, int i, ) { + final _packageManager = packageManager?.reference ?? _$jni.jNullReference; + final _intent = intent?.reference ?? _$jni.jNullReference; return _queryIntentContentProviders( reference.pointer, _id_queryIntentContentProviders as _$jni.JMethodIDPtr, - packageManager.reference.pointer, - intent.reference.pointer, + _packageManager.pointer, + _intent.pointer, i) - .object(const _$jni.JListType(_$jni.JObjectType())); + .object(const _$jni.JListNullableType(_$jni.JObjectNullableType())); } static final _id_getProviderInfo = _class.instanceMethodId( @@ -2997,14 +3770,61 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper /// from: `public android.content.pm.ProviderInfo getProviderInfo(android.content.pm.ResolveInfo resolveInfo)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject getProviderInfo( - _$jni.JObject resolveInfo, + _$jni.JObject? getProviderInfo( + _$jni.JObject? resolveInfo, ) { - return _getProviderInfo( - reference.pointer, - _id_getProviderInfo as _$jni.JMethodIDPtr, - resolveInfo.reference.pointer) - .object(const _$jni.JObjectType()); + final _resolveInfo = resolveInfo?.reference ?? _$jni.jNullReference; + return _getProviderInfo(reference.pointer, + _id_getProviderInfo as _$jni.JMethodIDPtr, _resolveInfo.pointer) + .object(const _$jni.JObjectNullableType()); + } +} + +final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType + extends _$jni + .JObjType { + @_$jni.internal + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper;'; + + @_$jni.internal + @_$core.override + DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper + .fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType + get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType) + .hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType) && + other + is $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType; } } @@ -3024,11 +3844,17 @@ final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$Type DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper fromReference( _$jni.JReference reference) => DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper.fromReference( - reference); + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType + get nullableType => + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType(); @_$jni.internal @_$core.override @@ -3065,6 +3891,8 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 r'androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API19'); /// The type which includes information such as the signature of this class. + static const nullableType = + $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType(); static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$Type(); static final _id_new$ = _class.constructorId( @@ -3119,18 +3947,20 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 /// from: `public java.util.List queryIntentContentProviders(android.content.pm.PackageManager packageManager, android.content.Intent intent, int i)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JObject> queryIntentContentProviders( - _$jni.JObject packageManager, - _$jni.JObject intent, + _$jni.JList<_$jni.JObject?>? queryIntentContentProviders( + _$jni.JObject? packageManager, + _$jni.JObject? intent, int i, ) { + final _packageManager = packageManager?.reference ?? _$jni.jNullReference; + final _intent = intent?.reference ?? _$jni.jNullReference; return _queryIntentContentProviders( reference.pointer, _id_queryIntentContentProviders as _$jni.JMethodIDPtr, - packageManager.reference.pointer, - intent.reference.pointer, + _packageManager.pointer, + _intent.pointer, i) - .object(const _$jni.JListType(_$jni.JObjectType())); + .object(const _$jni.JListNullableType(_$jni.JObjectNullableType())); } static final _id_getProviderInfo = _class.instanceMethodId( @@ -3151,14 +3981,62 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 /// from: `public android.content.pm.ProviderInfo getProviderInfo(android.content.pm.ResolveInfo resolveInfo)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject getProviderInfo( - _$jni.JObject resolveInfo, + _$jni.JObject? getProviderInfo( + _$jni.JObject? resolveInfo, ) { - return _getProviderInfo( - reference.pointer, - _id_getProviderInfo as _$jni.JMethodIDPtr, - resolveInfo.reference.pointer) - .object(const _$jni.JObjectType()); + final _resolveInfo = resolveInfo?.reference ?? _$jni.jNullReference; + return _getProviderInfo(reference.pointer, + _id_getProviderInfo as _$jni.JMethodIDPtr, _resolveInfo.pointer) + .object(const _$jni.JObjectNullableType()); + } +} + +final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType + extends _$jni + .JObjType { + @_$jni.internal + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API19;'; + + @_$jni.internal + @_$core.override + DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 + .fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType + get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType) + .hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType) && + other + is $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType; } } @@ -3178,12 +4056,19 @@ final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$Type DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 fromReference( _$jni.JReference reference) => DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19 - .fromReference(reference); - + .fromReference( + reference, + ); @_$jni.internal @_$core.override _$jni.JObjType get superType => - const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$Type(); + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper$NullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType + get nullableType => + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType(); @_$jni.internal @_$core.override @@ -3222,6 +4107,8 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 r'androidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API28'); /// The type which includes information such as the signature of this class. + static const nullableType = + $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$NullableType(); static const type = $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$Type(); static final _id_new$ = _class.constructorId( @@ -3273,16 +4160,67 @@ class DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 /// from: `public android.content.pm.Signature[] getSigningSignatures(android.content.pm.PackageManager packageManager, java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.JObject> getSigningSignatures$1( - _$jni.JObject packageManager, - _$jni.JString string, + _$jni.JArray<_$jni.JObject?>? getSigningSignatures$1( + _$jni.JObject? packageManager, + _$jni.JString? string, ) { + final _packageManager = packageManager?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; return _getSigningSignatures$1( reference.pointer, _id_getSigningSignatures$1 as _$jni.JMethodIDPtr, - packageManager.reference.pointer, - string.reference.pointer) - .object(const _$jni.JArrayType(_$jni.JObjectType())); + _packageManager.pointer, + _string.pointer) + .object(const _$jni.JArrayNullableType(_$jni.JObjectNullableType())); + } +} + +final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$NullableType + extends _$jni + .JObjType { + @_$jni.internal + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Landroidx/emoji2/text/DefaultEmojiCompatConfig$DefaultEmojiCompatConfigHelper_API28;'; + + @_$jni.internal + @_$core.override + DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 + .fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType + get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 3; + + @_$core.override + int get hashCode => + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$NullableType) + .hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$NullableType) && + other + is $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$NullableType; } } @@ -3302,12 +4240,19 @@ final class $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$Type DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 fromReference( _$jni.JReference reference) => DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28 - .fromReference(reference); - + .fromReference( + reference, + ); @_$jni.internal @_$core.override _$jni.JObjType get superType => - const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$Type(); + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API19$NullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType + get nullableType => + const $DefaultEmojiCompatConfig_DefaultEmojiCompatConfigHelper_API28$NullableType(); @_$jni.internal @_$core.override @@ -3343,6 +4288,7 @@ class DefaultEmojiCompatConfig extends _$jni.JObject { _$jni.JClass.forName(r'androidx/emoji2/text/DefaultEmojiCompatConfig'); /// The type which includes information such as the signature of this class. + static const nullableType = $DefaultEmojiCompatConfig$NullableType(); static const type = $DefaultEmojiCompatConfig$Type(); static final _id_create = _class.staticMethodId( r'create', @@ -3362,12 +4308,52 @@ class DefaultEmojiCompatConfig extends _$jni.JObject { /// from: `static public androidx.emoji2.text.FontRequestEmojiCompatConfig create(android.content.Context context)` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JObject create( - _$jni.JObject context, + static _$jni.JObject? create( + _$jni.JObject? context, ) { + final _context = context?.reference ?? _$jni.jNullReference; return _create(_class.reference.pointer, _id_create as _$jni.JMethodIDPtr, - context.reference.pointer) - .object(const _$jni.JObjectType()); + _context.pointer) + .object(const _$jni.JObjectNullableType()); + } +} + +final class $DefaultEmojiCompatConfig$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $DefaultEmojiCompatConfig$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroidx/emoji2/text/DefaultEmojiCompatConfig;'; + + @_$jni.internal + @_$core.override + DefaultEmojiCompatConfig? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : DefaultEmojiCompatConfig.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($DefaultEmojiCompatConfig$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($DefaultEmojiCompatConfig$NullableType) && + other is $DefaultEmojiCompatConfig$NullableType; } } @@ -3383,11 +4369,17 @@ final class $DefaultEmojiCompatConfig$Type @_$jni.internal @_$core.override DefaultEmojiCompatConfig fromReference(_$jni.JReference reference) => - DefaultEmojiCompatConfig.fromReference(reference); + DefaultEmojiCompatConfig.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $DefaultEmojiCompatConfig$NullableType(); @_$jni.internal @_$core.override @@ -3418,6 +4410,7 @@ class Build_Partition extends _$jni.JObject { static final _class = _$jni.JClass.forName(r'android/os/Build$Partition'); /// The type which includes information such as the signature of this class. + static const nullableType = $Build_Partition$NullableType(); static const type = $Build_Partition$Type(); static final _id_PARTITION_NAME_SYSTEM = _class.staticFieldId( r'PARTITION_NAME_SYSTEM', @@ -3426,8 +4419,8 @@ class Build_Partition extends _$jni.JObject { /// from: `static public final java.lang.String PARTITION_NAME_SYSTEM` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get PARTITION_NAME_SYSTEM => - _id_PARTITION_NAME_SYSTEM.get(_class, const _$jni.JStringType()); + static _$jni.JString? get PARTITION_NAME_SYSTEM => + _id_PARTITION_NAME_SYSTEM.get(_class, const _$jni.JStringNullableType()); static final _id_getName = _class.instanceMethodId( r'getName', @@ -3448,9 +4441,9 @@ class Build_Partition extends _$jni.JObject { /// from: `public java.lang.String getName()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JString getName() { + _$jni.JString? getName() { return _getName(reference.pointer, _id_getName as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getFingerprint = _class.instanceMethodId( @@ -3472,10 +4465,10 @@ class Build_Partition extends _$jni.JObject { /// from: `public java.lang.String getFingerprint()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JString getFingerprint() { + _$jni.JString? getFingerprint() { return _getFingerprint( reference.pointer, _id_getFingerprint as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getBuildTimeMillis = _class.instanceMethodId( @@ -3520,10 +4513,11 @@ class Build_Partition extends _$jni.JObject { /// from: `public boolean equals(java.lang.Object object)` bool equals( - _$jni.JObject object, + _$jni.JObject? object, ) { + final _object = object?.reference ?? _$jni.jNullReference; return _equals(reference.pointer, _id_equals as _$jni.JMethodIDPtr, - object.reference.pointer) + _object.pointer) .boolean; } @@ -3551,6 +4545,44 @@ class Build_Partition extends _$jni.JObject { } } +final class $Build_Partition$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $Build_Partition$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroid/os/Build$Partition;'; + + @_$jni.internal + @_$core.override + Build_Partition? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Build_Partition.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Build_Partition$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Build_Partition$NullableType) && + other is $Build_Partition$NullableType; + } +} + final class $Build_Partition$Type extends _$jni.JObjType { @_$jni.internal const $Build_Partition$Type(); @@ -3562,11 +4594,17 @@ final class $Build_Partition$Type extends _$jni.JObjType { @_$jni.internal @_$core.override Build_Partition fromReference(_$jni.JReference reference) => - Build_Partition.fromReference(reference); + Build_Partition.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $Build_Partition$NullableType(); @_$jni.internal @_$core.override @@ -3597,6 +4635,7 @@ class Build_VERSION extends _$jni.JObject { static final _class = _$jni.JClass.forName(r'android/os/Build$VERSION'); /// The type which includes information such as the signature of this class. + static const nullableType = $Build_VERSION$NullableType(); static const type = $Build_VERSION$Type(); static final _id_BASE_OS = _class.staticFieldId( r'BASE_OS', @@ -3605,8 +4644,8 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String BASE_OS` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get BASE_OS => - _id_BASE_OS.get(_class, const _$jni.JStringType()); + static _$jni.JString? get BASE_OS => + _id_BASE_OS.get(_class, const _$jni.JStringNullableType()); static final _id_CODENAME = _class.staticFieldId( r'CODENAME', @@ -3615,8 +4654,8 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String CODENAME` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get CODENAME => - _id_CODENAME.get(_class, const _$jni.JStringType()); + static _$jni.JString? get CODENAME => + _id_CODENAME.get(_class, const _$jni.JStringNullableType()); static final _id_INCREMENTAL = _class.staticFieldId( r'INCREMENTAL', @@ -3625,8 +4664,8 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String INCREMENTAL` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get INCREMENTAL => - _id_INCREMENTAL.get(_class, const _$jni.JStringType()); + static _$jni.JString? get INCREMENTAL => + _id_INCREMENTAL.get(_class, const _$jni.JStringNullableType()); static final _id_MEDIA_PERFORMANCE_CLASS = _class.staticFieldId( r'MEDIA_PERFORMANCE_CLASS', @@ -3653,8 +4692,8 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String RELEASE` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get RELEASE => - _id_RELEASE.get(_class, const _$jni.JStringType()); + static _$jni.JString? get RELEASE => + _id_RELEASE.get(_class, const _$jni.JStringNullableType()); static final _id_RELEASE_OR_CODENAME = _class.staticFieldId( r'RELEASE_OR_CODENAME', @@ -3663,8 +4702,8 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String RELEASE_OR_CODENAME` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get RELEASE_OR_CODENAME => - _id_RELEASE_OR_CODENAME.get(_class, const _$jni.JStringType()); + static _$jni.JString? get RELEASE_OR_CODENAME => + _id_RELEASE_OR_CODENAME.get(_class, const _$jni.JStringNullableType()); static final _id_RELEASE_OR_PREVIEW_DISPLAY = _class.staticFieldId( r'RELEASE_OR_PREVIEW_DISPLAY', @@ -3673,8 +4712,9 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String RELEASE_OR_PREVIEW_DISPLAY` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get RELEASE_OR_PREVIEW_DISPLAY => - _id_RELEASE_OR_PREVIEW_DISPLAY.get(_class, const _$jni.JStringType()); + static _$jni.JString? get RELEASE_OR_PREVIEW_DISPLAY => + _id_RELEASE_OR_PREVIEW_DISPLAY.get( + _class, const _$jni.JStringNullableType()); static final _id_SDK = _class.staticFieldId( r'SDK', @@ -3683,8 +4723,8 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String SDK` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get SDK => - _id_SDK.get(_class, const _$jni.JStringType()); + static _$jni.JString? get SDK => + _id_SDK.get(_class, const _$jni.JStringNullableType()); static final _id_SDK_INT = _class.staticFieldId( r'SDK_INT', @@ -3701,8 +4741,8 @@ class Build_VERSION extends _$jni.JObject { /// from: `static public final java.lang.String SECURITY_PATCH` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get SECURITY_PATCH => - _id_SECURITY_PATCH.get(_class, const _$jni.JStringType()); + static _$jni.JString? get SECURITY_PATCH => + _id_SECURITY_PATCH.get(_class, const _$jni.JStringNullableType()); static final _id_new$ = _class.constructorId( r'()V', @@ -3729,6 +4769,43 @@ class Build_VERSION extends _$jni.JObject { } } +final class $Build_VERSION$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Build_VERSION$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroid/os/Build$VERSION;'; + + @_$jni.internal + @_$core.override + Build_VERSION? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Build_VERSION.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Build_VERSION$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Build_VERSION$NullableType) && + other is $Build_VERSION$NullableType; + } +} + final class $Build_VERSION$Type extends _$jni.JObjType { @_$jni.internal const $Build_VERSION$Type(); @@ -3740,11 +4817,17 @@ final class $Build_VERSION$Type extends _$jni.JObjType { @_$jni.internal @_$core.override Build_VERSION fromReference(_$jni.JReference reference) => - Build_VERSION.fromReference(reference); + Build_VERSION.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $Build_VERSION$NullableType(); @_$jni.internal @_$core.override @@ -3775,6 +4858,7 @@ class Build_VERSION_CODES extends _$jni.JObject { static final _class = _$jni.JClass.forName(r'android/os/Build$VERSION_CODES'); /// The type which includes information such as the signature of this class. + static const nullableType = $Build_VERSION_CODES$NullableType(); static const type = $Build_VERSION_CODES$Type(); /// from: `static public final int BASE` @@ -3909,6 +4993,45 @@ class Build_VERSION_CODES extends _$jni.JObject { } } +final class $Build_VERSION_CODES$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $Build_VERSION_CODES$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroid/os/Build$VERSION_CODES;'; + + @_$jni.internal + @_$core.override + Build_VERSION_CODES? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : Build_VERSION_CODES.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Build_VERSION_CODES$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Build_VERSION_CODES$NullableType) && + other is $Build_VERSION_CODES$NullableType; + } +} + final class $Build_VERSION_CODES$Type extends _$jni.JObjType { @_$jni.internal @@ -3921,11 +5044,17 @@ final class $Build_VERSION_CODES$Type @_$jni.internal @_$core.override Build_VERSION_CODES fromReference(_$jni.JReference reference) => - Build_VERSION_CODES.fromReference(reference); + Build_VERSION_CODES.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $Build_VERSION_CODES$NullableType(); @_$jni.internal @_$core.override @@ -3956,6 +5085,7 @@ class Build extends _$jni.JObject { static final _class = _$jni.JClass.forName(r'android/os/Build'); /// The type which includes information such as the signature of this class. + static const nullableType = $Build$NullableType(); static const type = $Build$Type(); static final _id_BOARD = _class.staticFieldId( r'BOARD', @@ -3964,8 +5094,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String BOARD` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get BOARD => - _id_BOARD.get(_class, const _$jni.JStringType()); + static _$jni.JString? get BOARD => + _id_BOARD.get(_class, const _$jni.JStringNullableType()); static final _id_BOOTLOADER = _class.staticFieldId( r'BOOTLOADER', @@ -3974,8 +5104,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String BOOTLOADER` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get BOOTLOADER => - _id_BOOTLOADER.get(_class, const _$jni.JStringType()); + static _$jni.JString? get BOOTLOADER => + _id_BOOTLOADER.get(_class, const _$jni.JStringNullableType()); static final _id_BRAND = _class.staticFieldId( r'BRAND', @@ -3984,8 +5114,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String BRAND` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get BRAND => - _id_BRAND.get(_class, const _$jni.JStringType()); + static _$jni.JString? get BRAND => + _id_BRAND.get(_class, const _$jni.JStringNullableType()); static final _id_CPU_ABI = _class.staticFieldId( r'CPU_ABI', @@ -3994,8 +5124,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String CPU_ABI` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get CPU_ABI => - _id_CPU_ABI.get(_class, const _$jni.JStringType()); + static _$jni.JString? get CPU_ABI => + _id_CPU_ABI.get(_class, const _$jni.JStringNullableType()); static final _id_CPU_ABI2 = _class.staticFieldId( r'CPU_ABI2', @@ -4004,8 +5134,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String CPU_ABI2` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get CPU_ABI2 => - _id_CPU_ABI2.get(_class, const _$jni.JStringType()); + static _$jni.JString? get CPU_ABI2 => + _id_CPU_ABI2.get(_class, const _$jni.JStringNullableType()); static final _id_DEVICE = _class.staticFieldId( r'DEVICE', @@ -4014,8 +5144,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String DEVICE` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get DEVICE => - _id_DEVICE.get(_class, const _$jni.JStringType()); + static _$jni.JString? get DEVICE => + _id_DEVICE.get(_class, const _$jni.JStringNullableType()); static final _id_DISPLAY = _class.staticFieldId( r'DISPLAY', @@ -4024,8 +5154,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String DISPLAY` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get DISPLAY => - _id_DISPLAY.get(_class, const _$jni.JStringType()); + static _$jni.JString? get DISPLAY => + _id_DISPLAY.get(_class, const _$jni.JStringNullableType()); static final _id_FINGERPRINT = _class.staticFieldId( r'FINGERPRINT', @@ -4034,8 +5164,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String FINGERPRINT` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get FINGERPRINT => - _id_FINGERPRINT.get(_class, const _$jni.JStringType()); + static _$jni.JString? get FINGERPRINT => + _id_FINGERPRINT.get(_class, const _$jni.JStringNullableType()); static final _id_HARDWARE = _class.staticFieldId( r'HARDWARE', @@ -4044,8 +5174,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String HARDWARE` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get HARDWARE => - _id_HARDWARE.get(_class, const _$jni.JStringType()); + static _$jni.JString? get HARDWARE => + _id_HARDWARE.get(_class, const _$jni.JStringNullableType()); static final _id_HOST = _class.staticFieldId( r'HOST', @@ -4054,8 +5184,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String HOST` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get HOST => - _id_HOST.get(_class, const _$jni.JStringType()); + static _$jni.JString? get HOST => + _id_HOST.get(_class, const _$jni.JStringNullableType()); static final _id_ID = _class.staticFieldId( r'ID', @@ -4064,7 +5194,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String ID` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get ID => _id_ID.get(_class, const _$jni.JStringType()); + static _$jni.JString? get ID => + _id_ID.get(_class, const _$jni.JStringNullableType()); static final _id_MANUFACTURER = _class.staticFieldId( r'MANUFACTURER', @@ -4073,8 +5204,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String MANUFACTURER` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get MANUFACTURER => - _id_MANUFACTURER.get(_class, const _$jni.JStringType()); + static _$jni.JString? get MANUFACTURER => + _id_MANUFACTURER.get(_class, const _$jni.JStringNullableType()); static final _id_MODEL = _class.staticFieldId( r'MODEL', @@ -4083,8 +5214,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String MODEL` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get MODEL => - _id_MODEL.get(_class, const _$jni.JStringType()); + static _$jni.JString? get MODEL => + _id_MODEL.get(_class, const _$jni.JStringNullableType()); static final _id_ODM_SKU = _class.staticFieldId( r'ODM_SKU', @@ -4093,8 +5224,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String ODM_SKU` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get ODM_SKU => - _id_ODM_SKU.get(_class, const _$jni.JStringType()); + static _$jni.JString? get ODM_SKU => + _id_ODM_SKU.get(_class, const _$jni.JStringNullableType()); static final _id_PRODUCT = _class.staticFieldId( r'PRODUCT', @@ -4103,8 +5234,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String PRODUCT` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get PRODUCT => - _id_PRODUCT.get(_class, const _$jni.JStringType()); + static _$jni.JString? get PRODUCT => + _id_PRODUCT.get(_class, const _$jni.JStringNullableType()); static final _id_RADIO = _class.staticFieldId( r'RADIO', @@ -4113,8 +5244,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String RADIO` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get RADIO => - _id_RADIO.get(_class, const _$jni.JStringType()); + static _$jni.JString? get RADIO => + _id_RADIO.get(_class, const _$jni.JStringNullableType()); static final _id_SERIAL = _class.staticFieldId( r'SERIAL', @@ -4123,8 +5254,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String SERIAL` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get SERIAL => - _id_SERIAL.get(_class, const _$jni.JStringType()); + static _$jni.JString? get SERIAL => + _id_SERIAL.get(_class, const _$jni.JStringNullableType()); static final _id_SKU = _class.staticFieldId( r'SKU', @@ -4133,8 +5264,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String SKU` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get SKU => - _id_SKU.get(_class, const _$jni.JStringType()); + static _$jni.JString? get SKU => + _id_SKU.get(_class, const _$jni.JStringNullableType()); static final _id_SOC_MANUFACTURER = _class.staticFieldId( r'SOC_MANUFACTURER', @@ -4143,8 +5274,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String SOC_MANUFACTURER` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get SOC_MANUFACTURER => - _id_SOC_MANUFACTURER.get(_class, const _$jni.JStringType()); + static _$jni.JString? get SOC_MANUFACTURER => + _id_SOC_MANUFACTURER.get(_class, const _$jni.JStringNullableType()); static final _id_SOC_MODEL = _class.staticFieldId( r'SOC_MODEL', @@ -4153,8 +5284,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String SOC_MODEL` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get SOC_MODEL => - _id_SOC_MODEL.get(_class, const _$jni.JStringType()); + static _$jni.JString? get SOC_MODEL => + _id_SOC_MODEL.get(_class, const _$jni.JStringNullableType()); static final _id_SUPPORTED_32_BIT_ABIS = _class.staticFieldId( r'SUPPORTED_32_BIT_ABIS', @@ -4163,9 +5294,9 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String[] SUPPORTED_32_BIT_ABIS` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray<_$jni.JString> get SUPPORTED_32_BIT_ABIS => + static _$jni.JArray<_$jni.JString?>? get SUPPORTED_32_BIT_ABIS => _id_SUPPORTED_32_BIT_ABIS.get( - _class, const _$jni.JArrayType(_$jni.JStringType())); + _class, const _$jni.JArrayNullableType(_$jni.JStringNullableType())); static final _id_SUPPORTED_64_BIT_ABIS = _class.staticFieldId( r'SUPPORTED_64_BIT_ABIS', @@ -4174,9 +5305,9 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String[] SUPPORTED_64_BIT_ABIS` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray<_$jni.JString> get SUPPORTED_64_BIT_ABIS => + static _$jni.JArray<_$jni.JString?>? get SUPPORTED_64_BIT_ABIS => _id_SUPPORTED_64_BIT_ABIS.get( - _class, const _$jni.JArrayType(_$jni.JStringType())); + _class, const _$jni.JArrayNullableType(_$jni.JStringNullableType())); static final _id_SUPPORTED_ABIS = _class.staticFieldId( r'SUPPORTED_ABIS', @@ -4185,8 +5316,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String[] SUPPORTED_ABIS` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray<_$jni.JString> get SUPPORTED_ABIS => _id_SUPPORTED_ABIS - .get(_class, const _$jni.JArrayType(_$jni.JStringType())); + static _$jni.JArray<_$jni.JString?>? get SUPPORTED_ABIS => _id_SUPPORTED_ABIS + .get(_class, const _$jni.JArrayNullableType(_$jni.JStringNullableType())); static final _id_TAGS = _class.staticFieldId( r'TAGS', @@ -4195,8 +5326,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String TAGS` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get TAGS => - _id_TAGS.get(_class, const _$jni.JStringType()); + static _$jni.JString? get TAGS => + _id_TAGS.get(_class, const _$jni.JStringNullableType()); static final _id_TIME = _class.staticFieldId( r'TIME', @@ -4213,8 +5344,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String TYPE` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get TYPE => - _id_TYPE.get(_class, const _$jni.JStringType()); + static _$jni.JString? get TYPE => + _id_TYPE.get(_class, const _$jni.JStringNullableType()); static final _id_UNKNOWN = _class.staticFieldId( r'UNKNOWN', @@ -4223,8 +5354,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String UNKNOWN` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get UNKNOWN => - _id_UNKNOWN.get(_class, const _$jni.JStringType()); + static _$jni.JString? get UNKNOWN => + _id_UNKNOWN.get(_class, const _$jni.JStringNullableType()); static final _id_USER = _class.staticFieldId( r'USER', @@ -4233,8 +5364,8 @@ class Build extends _$jni.JObject { /// from: `static public final java.lang.String USER` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString get USER => - _id_USER.get(_class, const _$jni.JStringType()); + static _$jni.JString? get USER => + _id_USER.get(_class, const _$jni.JStringNullableType()); static final _id_new$ = _class.constructorId( r'()V', @@ -4279,10 +5410,10 @@ class Build extends _$jni.JObject { /// from: `static public java.lang.String getSerial()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString getSerial() { + static _$jni.JString? getSerial() { return _getSerial( _class.reference.pointer, _id_getSerial as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getFingerprintedPartitions = _class.staticMethodId( @@ -4305,10 +5436,10 @@ class Build extends _$jni.JObject { /// from: `static public java.util.List getFingerprintedPartitions()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JList getFingerprintedPartitions() { + static _$jni.JList? getFingerprintedPartitions() { return _getFingerprintedPartitions(_class.reference.pointer, _id_getFingerprintedPartitions as _$jni.JMethodIDPtr) - .object(const _$jni.JListType($Build_Partition$Type())); + .object(const _$jni.JListNullableType($Build_Partition$NullableType())); } static final _id_getRadioVersion = _class.staticMethodId( @@ -4330,10 +5461,47 @@ class Build extends _$jni.JObject { /// from: `static public java.lang.String getRadioVersion()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JString getRadioVersion() { + static _$jni.JString? getRadioVersion() { return _getRadioVersion( _class.reference.pointer, _id_getRadioVersion as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); + } +} + +final class $Build$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Build$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Landroid/os/Build;'; + + @_$jni.internal + @_$core.override + Build? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Build.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Build$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Build$NullableType) && + other is $Build$NullableType; } } @@ -4347,12 +5515,16 @@ final class $Build$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - Build fromReference(_$jni.JReference reference) => - Build.fromReference(reference); + Build fromReference(_$jni.JReference reference) => Build.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => const $Build$NullableType(); @_$jni.internal @_$core.override @@ -4368,7 +5540,7 @@ final class $Build$Type extends _$jni.JObjType { } /// from: `java.util.HashMap` -class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> +class HashMap<$K extends _$jni.JObject?, $V extends _$jni.JObject?> extends _$jni.JObject { @_$jni.internal @_$core.override @@ -4391,12 +5563,23 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> static final _class = _$jni.JClass.forName(r'java/util/HashMap'); /// The type which includes information such as the signature of this class. + static $HashMap$NullableType<$K, $V> + nullableType<$K extends _$jni.JObject?, $V extends _$jni.JObject?>( + _$jni.JObjType<$K> K, + _$jni.JObjType<$V> V, + ) { + return $HashMap$NullableType<$K, $V>( + K, + V, + ); + } + static $HashMap$Type<$K, $V> - type<$K extends _$jni.JObject, $V extends _$jni.JObject>( + type<$K extends _$jni.JObject?, $V extends _$jni.JObject?>( _$jni.JObjType<$K> K, _$jni.JObjType<$V> V, ) { - return $HashMap$Type( + return $HashMap$Type<$K, $V>( K, V, ); @@ -4507,21 +5690,16 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public void (java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. factory HashMap.new$3( - _$jni.JMap<$K, $V> map, { - _$jni.JObjType<$K>? K, - _$jni.JObjType<$V>? V, + _$jni.JMap<_$jni.JObject, _$jni.JObject>? map, { + required _$jni.JObjType<$K> K, + required _$jni.JObjType<$V> V, }) { - K ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).K, - ]) as _$jni.JObjType<$K>; - V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, - ]) as _$jni.JObjType<$V>; + final _map = map?.reference ?? _$jni.jNullReference; return HashMap.fromReference( K, V, _new$3(_class.reference.pointer, _id_new$3 as _$jni.JMethodIDPtr, - map.reference.pointer) + _map.pointer) .reference); } @@ -4589,10 +5767,11 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public V get(java.lang.Object object)` /// The returned object must be released after use, by calling the [release] method. $V get( - _$jni.JObject object, + _$jni.JObject? object, ) { - return _get(reference.pointer, _id_get as _$jni.JMethodIDPtr, - object.reference.pointer) + final _object = object?.reference ?? _$jni.jNullReference; + return _get( + reference.pointer, _id_get as _$jni.JMethodIDPtr, _object.pointer) .object(V); } @@ -4614,10 +5793,11 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public boolean containsKey(java.lang.Object object)` bool containsKey( - _$jni.JObject object, + _$jni.JObject? object, ) { + final _object = object?.reference ?? _$jni.jNullReference; return _containsKey(reference.pointer, - _id_containsKey as _$jni.JMethodIDPtr, object.reference.pointer) + _id_containsKey as _$jni.JMethodIDPtr, _object.pointer) .boolean; } @@ -4649,8 +5829,10 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> $K object, $V object1, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; return _put(reference.pointer, _id_put as _$jni.JMethodIDPtr, - object.reference.pointer, object1.reference.pointer) + _object.pointer, _object1.pointer) .object(V); } @@ -4672,10 +5854,10 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public void putAll(java.util.Map map)` void putAll( - _$jni.JMap<$K, $V> map, + _$jni.JMap<_$jni.JObject, _$jni.JObject>? map, ) { - _putAll(reference.pointer, _id_putAll as _$jni.JMethodIDPtr, - map.reference.pointer) + final _map = map?.reference ?? _$jni.jNullReference; + _putAll(reference.pointer, _id_putAll as _$jni.JMethodIDPtr, _map.pointer) .check(); } @@ -4698,10 +5880,11 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public V remove(java.lang.Object object)` /// The returned object must be released after use, by calling the [release] method. $V remove( - _$jni.JObject object, + _$jni.JObject? object, ) { + final _object = object?.reference ?? _$jni.jNullReference; return _remove(reference.pointer, _id_remove as _$jni.JMethodIDPtr, - object.reference.pointer) + _object.pointer) .object(V); } @@ -4745,10 +5928,11 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public boolean containsValue(java.lang.Object object)` bool containsValue( - _$jni.JObject object, + _$jni.JObject? object, ) { + final _object = object?.reference ?? _$jni.jNullReference; return _containsValue(reference.pointer, - _id_containsValue as _$jni.JMethodIDPtr, object.reference.pointer) + _id_containsValue as _$jni.JMethodIDPtr, _object.pointer) .boolean; } @@ -4771,9 +5955,9 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public java.util.Set keySet()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JSet<$K> keySet() { + _$jni.JSet<$K>? keySet() { return _keySet(reference.pointer, _id_keySet as _$jni.JMethodIDPtr) - .object(_$jni.JSetType(K)); + .object(_$jni.JSetNullableType(K)); } static final _id_values = _class.instanceMethodId( @@ -4795,9 +5979,9 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public java.util.Collection values()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject values() { + _$jni.JObject? values() { return _values(reference.pointer, _id_values as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_entrySet = _class.instanceMethodId( @@ -4819,9 +6003,9 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public java.util.Set entrySet()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JSet<_$jni.JObject> entrySet() { + _$jni.JSet<_$jni.JObject?>? entrySet() { return _entrySet(reference.pointer, _id_entrySet as _$jni.JMethodIDPtr) - .object(const _$jni.JSetType(_$jni.JObjectType())); + .object(const _$jni.JSetNullableType(_$jni.JObjectNullableType())); } static final _id_getOrDefault = _class.instanceMethodId( @@ -4849,14 +6033,16 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public V getOrDefault(java.lang.Object object, V object1)` /// The returned object must be released after use, by calling the [release] method. $V getOrDefault( - _$jni.JObject object, + _$jni.JObject? object, $V object1, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; return _getOrDefault( reference.pointer, _id_getOrDefault as _$jni.JMethodIDPtr, - object.reference.pointer, - object1.reference.pointer) + _object.pointer, + _object1.pointer) .object(V); } @@ -4888,11 +6074,13 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> $K object, $V object1, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; return _putIfAbsent( reference.pointer, _id_putIfAbsent as _$jni.JMethodIDPtr, - object.reference.pointer, - object1.reference.pointer) + _object.pointer, + _object1.pointer) .object(V); } @@ -4920,11 +6108,13 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public boolean remove(java.lang.Object object, java.lang.Object object1)` bool remove$1( - _$jni.JObject object, - _$jni.JObject object1, + _$jni.JObject? object, + _$jni.JObject? object1, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; return _remove$1(reference.pointer, _id_remove$1 as _$jni.JMethodIDPtr, - object.reference.pointer, object1.reference.pointer) + _object.pointer, _object1.pointer) .boolean; } @@ -4958,12 +6148,11 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> $V object1, $V object2, ) { - return _replace( - reference.pointer, - _id_replace as _$jni.JMethodIDPtr, - object.reference.pointer, - object1.reference.pointer, - object2.reference.pointer) + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; + final _object2 = object2?.reference ?? _$jni.jNullReference; + return _replace(reference.pointer, _id_replace as _$jni.JMethodIDPtr, + _object.pointer, _object1.pointer, _object2.pointer) .boolean; } @@ -4995,8 +6184,10 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> $K object, $V object1, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; return _replace$1(reference.pointer, _id_replace$1 as _$jni.JMethodIDPtr, - object.reference.pointer, object1.reference.pointer) + _object.pointer, _object1.pointer) .object(V); } @@ -5026,13 +6217,15 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// The returned object must be released after use, by calling the [release] method. $V computeIfAbsent( $K object, - _$jni.JObject function, + _$jni.JObject? function, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _function = function?.reference ?? _$jni.jNullReference; return _computeIfAbsent( reference.pointer, _id_computeIfAbsent as _$jni.JMethodIDPtr, - object.reference.pointer, - function.reference.pointer) + _object.pointer, + _function.pointer) .object(V); } @@ -5062,13 +6255,15 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// The returned object must be released after use, by calling the [release] method. $V computeIfPresent( $K object, - _$jni.JObject biFunction, + _$jni.JObject? biFunction, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _biFunction = biFunction?.reference ?? _$jni.jNullReference; return _computeIfPresent( reference.pointer, _id_computeIfPresent as _$jni.JMethodIDPtr, - object.reference.pointer, - biFunction.reference.pointer) + _object.pointer, + _biFunction.pointer) .object(V); } @@ -5098,10 +6293,12 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// The returned object must be released after use, by calling the [release] method. $V compute( $K object, - _$jni.JObject biFunction, + _$jni.JObject? biFunction, ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _biFunction = biFunction?.reference ?? _$jni.jNullReference; return _compute(reference.pointer, _id_compute as _$jni.JMethodIDPtr, - object.reference.pointer, biFunction.reference.pointer) + _object.pointer, _biFunction.pointer) .object(V); } @@ -5134,14 +6331,13 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> $V merge( $K object, $V object1, - _$jni.JObject biFunction, + _$jni.JObject? biFunction, ) { - return _merge( - reference.pointer, - _id_merge as _$jni.JMethodIDPtr, - object.reference.pointer, - object1.reference.pointer, - biFunction.reference.pointer) + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; + final _biFunction = biFunction?.reference ?? _$jni.jNullReference; + return _merge(reference.pointer, _id_merge as _$jni.JMethodIDPtr, + _object.pointer, _object1.pointer, _biFunction.pointer) .object(V); } @@ -5163,10 +6359,11 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public void forEach(java.util.function.BiConsumer biConsumer)` void forEach( - _$jni.JObject biConsumer, + _$jni.JObject? biConsumer, ) { + final _biConsumer = biConsumer?.reference ?? _$jni.jNullReference; _forEach(reference.pointer, _id_forEach as _$jni.JMethodIDPtr, - biConsumer.reference.pointer) + _biConsumer.pointer) .check(); } @@ -5188,10 +6385,11 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public void replaceAll(java.util.function.BiFunction biFunction)` void replaceAll( - _$jni.JObject biFunction, + _$jni.JObject? biFunction, ) { + final _biFunction = biFunction?.reference ?? _$jni.jNullReference; _replaceAll(reference.pointer, _id_replaceAll as _$jni.JMethodIDPtr, - biFunction.reference.pointer) + _biFunction.pointer) .check(); } @@ -5214,9 +6412,9 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `public java.lang.Object clone()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject clone() { + _$jni.JObject? clone() { return _clone(reference.pointer, _id_clone as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_newHashMap = _class.staticMethodId( @@ -5235,19 +6433,70 @@ class HashMap<$K extends _$jni.JObject, $V extends _$jni.JObject> /// from: `static public java.util.HashMap newHashMap(int i)` /// The returned object must be released after use, by calling the [release] method. - static HashMap<$K, $V> - newHashMap<$K extends _$jni.JObject, $V extends _$jni.JObject>( + static HashMap<$K, $V>? + newHashMap<$K extends _$jni.JObject?, $V extends _$jni.JObject?>( int i, { required _$jni.JObjType<$K> K, required _$jni.JObjType<$V> V, }) { return _newHashMap( _class.reference.pointer, _id_newHashMap as _$jni.JMethodIDPtr, i) - .object($HashMap$Type(K, V)); + .object($HashMap$NullableType(K, V)); + } +} + +final class $HashMap$NullableType<$K extends _$jni.JObject?, + $V extends _$jni.JObject?> extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $HashMap$NullableType( + this.K, + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Ljava/util/HashMap;'; + + @_$jni.internal + @_$core.override + HashMap<$K, $V>? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : HashMap.fromReference( + K, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($HashMap$NullableType, K, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($HashMap$NullableType<$K, $V>) && + other is $HashMap$NullableType<$K, $V> && + K == other.K && + V == other.V; } } -final class $HashMap$Type<$K extends _$jni.JObject, $V extends _$jni.JObject> +final class $HashMap$Type<$K extends _$jni.JObject?, $V extends _$jni.JObject?> extends _$jni.JObjType> { @_$jni.internal final _$jni.JObjType<$K> K; @@ -5268,11 +6517,19 @@ final class $HashMap$Type<$K extends _$jni.JObject, $V extends _$jni.JObject> @_$jni.internal @_$core.override HashMap<$K, $V> fromReference(_$jni.JReference reference) => - HashMap.fromReference(K, V, reference); + HashMap.fromReference( + K, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType?> get nullableType => + $HashMap$NullableType(K, V); @_$jni.internal @_$core.override @@ -5306,6 +6563,7 @@ class AndroidUtils extends _$jni.JObject { _$jni.JClass.forName(r'com/example/in_app_java/AndroidUtils'); /// The type which includes information such as the signature of this class. + static const nullableType = $AndroidUtils$NullableType(); static const type = $AndroidUtils$Type(); static final _id_showToast = _class.staticMethodId( r'showToast', @@ -5333,16 +6591,55 @@ class AndroidUtils extends _$jni.JObject { /// from: `static public void showToast(android.app.Activity mainActivity, java.lang.CharSequence text, int duration)` static void showToast( - _$jni.JObject mainActivity, - _$jni.JObject text, + _$jni.JObject? mainActivity, + _$jni.JObject? text, int duration, ) { + final _mainActivity = mainActivity?.reference ?? _$jni.jNullReference; + final _text = text?.reference ?? _$jni.jNullReference; _showToast(_class.reference.pointer, _id_showToast as _$jni.JMethodIDPtr, - mainActivity.reference.pointer, text.reference.pointer, duration) + _mainActivity.pointer, _text.pointer, duration) .check(); } } +final class $AndroidUtils$NullableType extends _$jni.JObjType { + @_$jni.internal + const $AndroidUtils$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/example/in_app_java/AndroidUtils;'; + + @_$jni.internal + @_$core.override + AndroidUtils? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : AndroidUtils.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($AndroidUtils$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($AndroidUtils$NullableType) && + other is $AndroidUtils$NullableType; + } +} + final class $AndroidUtils$Type extends _$jni.JObjType { @_$jni.internal const $AndroidUtils$Type(); @@ -5354,11 +6651,17 @@ final class $AndroidUtils$Type extends _$jni.JObjType { @_$jni.internal @_$core.override AndroidUtils fromReference(_$jni.JReference reference) => - AndroidUtils.fromReference(reference); + AndroidUtils.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $AndroidUtils$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart b/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart index f5bfcb56e..9889ad2a7 100644 --- a/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart +++ b/pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart @@ -49,6 +49,7 @@ class Example extends _$jni.JObject { static final _class = _$jni.JClass.forName(r'Example'); /// The type which includes information such as the signature of this class. + static const nullableType = $Example$NullableType(); static const type = $Example$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -92,22 +93,58 @@ class Example extends _$jni.JObject { /// from: `public final java.lang.Object thinkBeforeAnswering(kotlin.coroutines.Continuation continuation)` /// The returned object must be released after use, by calling the [release] method. - _$core.Future<_$jni.JString> thinkBeforeAnswering() async { + _$core.Future<_$jni.JObject> thinkBeforeAnswering() async { + final _$c = $c?.reference ?? _$jni.jNullReference; final $p = _$jni.ReceivePort(); final $c = _$jni.JObject.fromReference( _$jni.ProtectedJniExtensions.newPortContinuation($p)); - _thinkBeforeAnswering( - reference.pointer, - _id_thinkBeforeAnswering as _$jni.JMethodIDPtr, - $c.reference.pointer) - .object(const _$jni.JObjectType()); + _thinkBeforeAnswering(reference.pointer, + _id_thinkBeforeAnswering as _$jni.JMethodIDPtr, _$c.pointer) + .object(const _$jni.JObjectNullableType()); final $o = _$jni.JGlobalReference(_$jni.JObjectPtr.fromAddress(await $p.first)); - final $k = const _$jni.JStringType().jClass.reference.pointer; + final $k = const _$jni.JObjectType().jClass.reference.pointer; if (!_$jni.Jni.env.IsInstanceOf($o.pointer, $k)) { throw 'Failed'; } - return const _$jni.JStringType().fromReference($o); + return const _$jni.JObjectType().fromReference($o); + } +} + +final class $Example$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Example$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'LExample;'; + + @_$jni.internal + @_$core.override + Example? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Example.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Example$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example$NullableType) && + other is $Example$NullableType; } } @@ -121,12 +158,16 @@ final class $Example$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - Example fromReference(_$jni.JReference reference) => - Example.fromReference(reference); + Example fromReference(_$jni.JReference reference) => Example.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => const $Example$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/example/notification_plugin/lib/notifications.dart b/pkgs/jnigen/example/notification_plugin/lib/notifications.dart index 2fa53747c..f71549739 100644 --- a/pkgs/jnigen/example/notification_plugin/lib/notifications.dart +++ b/pkgs/jnigen/example/notification_plugin/lib/notifications.dart @@ -54,6 +54,7 @@ class Notifications extends _$jni.JObject { _$jni.JClass.forName(r'com/example/notification_plugin/Notifications'); /// The type which includes information such as the signature of this class. + static const nullableType = $Notifications$NullableType(); static const type = $Notifications$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -107,22 +108,62 @@ class Notifications extends _$jni.JObject { /// from: `static public void showNotification(android.content.Context context, int notificationID, java.lang.String title, java.lang.String text)` static void showNotification( - _$jni.JObject context, + _$jni.JObject? context, int notificationID, - _$jni.JString title, - _$jni.JString text, + _$jni.JString? title, + _$jni.JString? text, ) { + final _context = context?.reference ?? _$jni.jNullReference; + final _title = title?.reference ?? _$jni.jNullReference; + final _text = text?.reference ?? _$jni.jNullReference; _showNotification( _class.reference.pointer, _id_showNotification as _$jni.JMethodIDPtr, - context.reference.pointer, + _context.pointer, notificationID, - title.reference.pointer, - text.reference.pointer) + _title.pointer, + _text.pointer) .check(); } } +final class $Notifications$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Notifications$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/example/notification_plugin/Notifications;'; + + @_$jni.internal + @_$core.override + Notifications? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Notifications.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Notifications$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Notifications$NullableType) && + other is $Notifications$NullableType; + } +} + final class $Notifications$Type extends _$jni.JObjType { @_$jni.internal const $Notifications$Type(); @@ -134,11 +175,17 @@ final class $Notifications$Type extends _$jni.JObjType { @_$jni.internal @_$core.override Notifications fromReference(_$jni.JReference reference) => - Notifications.fromReference(reference); + Notifications.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $Notifications$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart index 0943be9b2..68b65644c 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart +++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart @@ -74,6 +74,7 @@ class PDDocument extends _$jni.JObject { _$jni.JClass.forName(r'org/apache/pdfbox/pdmodel/PDDocument'); /// The type which includes information such as the signature of this class. + static const nullableType = $PDDocument$NullableType(); static const type = $PDDocument$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -124,10 +125,11 @@ class PDDocument extends _$jni.JObject { /// You need to add at least one page for the document to be valid. ///@param memUsageSetting defines how memory is used for buffering PDF streams factory PDDocument.new$1( - _$jni.JObject memUsageSetting, + _$jni.JObject? memUsageSetting, ) { + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; return PDDocument.fromReference(_new$1(_class.reference.pointer, - _id_new$1 as _$jni.JMethodIDPtr, memUsageSetting.reference.pointer) + _id_new$1 as _$jni.JMethodIDPtr, _memUsageSetting.pointer) .reference); } @@ -152,10 +154,11 @@ class PDDocument extends _$jni.JObject { /// Constructor that uses an existing document. The COSDocument that is passed in must be valid. ///@param doc The COSDocument that this document wraps. factory PDDocument.new$2( - _$jni.JObject doc, + _$jni.JObject? doc, ) { + final _doc = doc?.reference ?? _$jni.jNullReference; return PDDocument.fromReference(_new$2(_class.reference.pointer, - _id_new$2 as _$jni.JMethodIDPtr, doc.reference.pointer) + _id_new$2 as _$jni.JMethodIDPtr, _doc.pointer) .reference); } @@ -187,14 +190,13 @@ class PDDocument extends _$jni.JObject { ///@param doc The COSDocument that this document wraps. ///@param source the parser which is used to read the pdf factory PDDocument.new$3( - _$jni.JObject doc, - _$jni.JObject source, + _$jni.JObject? doc, + _$jni.JObject? source, ) { - return PDDocument.fromReference(_new$3( - _class.reference.pointer, - _id_new$3 as _$jni.JMethodIDPtr, - doc.reference.pointer, - source.reference.pointer) + final _doc = doc?.reference ?? _$jni.jNullReference; + final _source = source?.reference ?? _$jni.jNullReference; + return PDDocument.fromReference(_new$3(_class.reference.pointer, + _id_new$3 as _$jni.JMethodIDPtr, _doc.pointer, _source.pointer) .reference); } @@ -229,16 +231,19 @@ class PDDocument extends _$jni.JObject { ///@param source the parser which is used to read the pdf ///@param permission he access permissions of the pdf factory PDDocument.new$4( - _$jni.JObject doc, - _$jni.JObject source, - _$jni.JObject permission, + _$jni.JObject? doc, + _$jni.JObject? source, + _$jni.JObject? permission, ) { + final _doc = doc?.reference ?? _$jni.jNullReference; + final _source = source?.reference ?? _$jni.jNullReference; + final _permission = permission?.reference ?? _$jni.jNullReference; return PDDocument.fromReference(_new$4( _class.reference.pointer, _id_new$4 as _$jni.JMethodIDPtr, - doc.reference.pointer, - source.reference.pointer, - permission.reference.pointer) + _doc.pointer, + _source.pointer, + _permission.pointer) .reference); } @@ -264,10 +269,11 @@ class PDDocument extends _$jni.JObject { /// hierarchy and set the parent of the page to the root. ///@param page The page to add to the document. void addPage( - _$jni.JObject page, + _$jni.JObject? page, ) { - _addPage(reference.pointer, _id_addPage as _$jni.JMethodIDPtr, - page.reference.pointer) + final _page = page?.reference ?? _$jni.jNullReference; + _addPage( + reference.pointer, _id_addPage as _$jni.JMethodIDPtr, _page.pointer) .check(); } @@ -300,10 +306,11 @@ class PDDocument extends _$jni.JObject { ///@throws IllegalStateException if one attempts to add several signature /// fields. void addSignature( - _$jni.JObject sigObject, + _$jni.JObject? sigObject, ) { + final _sigObject = sigObject?.reference ?? _$jni.jNullReference; _addSignature(reference.pointer, _id_addSignature as _$jni.JMethodIDPtr, - sigObject.reference.pointer) + _sigObject.pointer) .check(); } @@ -343,11 +350,13 @@ class PDDocument extends _$jni.JObject { ///@throws IllegalStateException if one attempts to add several signature /// fields. void addSignature$1( - _$jni.JObject sigObject, - _$jni.JObject options, + _$jni.JObject? sigObject, + _$jni.JObject? options, ) { + final _sigObject = sigObject?.reference ?? _$jni.jNullReference; + final _options = options?.reference ?? _$jni.jNullReference; _addSignature$1(reference.pointer, _id_addSignature$1 as _$jni.JMethodIDPtr, - sigObject.reference.pointer, options.reference.pointer) + _sigObject.pointer, _options.pointer) .check(); } @@ -386,11 +395,14 @@ class PDDocument extends _$jni.JObject { ///@throws IllegalStateException if one attempts to add several signature /// fields. void addSignature$2( - _$jni.JObject sigObject, - _$jni.JObject signatureInterface, + _$jni.JObject? sigObject, + _$jni.JObject? signatureInterface, ) { + final _sigObject = sigObject?.reference ?? _$jni.jNullReference; + final _signatureInterface = + signatureInterface?.reference ?? _$jni.jNullReference; _addSignature$2(reference.pointer, _id_addSignature$2 as _$jni.JMethodIDPtr, - sigObject.reference.pointer, signatureInterface.reference.pointer) + _sigObject.pointer, _signatureInterface.pointer) .check(); } @@ -434,16 +446,16 @@ class PDDocument extends _$jni.JObject { ///@throws IllegalStateException if one attempts to add several signature /// fields. void addSignature$3( - _$jni.JObject sigObject, - _$jni.JObject signatureInterface, - _$jni.JObject options, + _$jni.JObject? sigObject, + _$jni.JObject? signatureInterface, + _$jni.JObject? options, ) { - _addSignature$3( - reference.pointer, - _id_addSignature$3 as _$jni.JMethodIDPtr, - sigObject.reference.pointer, - signatureInterface.reference.pointer, - options.reference.pointer) + final _sigObject = sigObject?.reference ?? _$jni.jNullReference; + final _signatureInterface = + signatureInterface?.reference ?? _$jni.jNullReference; + final _options = options?.reference ?? _$jni.jNullReference; + _addSignature$3(reference.pointer, _id_addSignature$3 as _$jni.JMethodIDPtr, + _sigObject.pointer, _signatureInterface.pointer, _options.pointer) .check(); } @@ -482,16 +494,20 @@ class PDDocument extends _$jni.JObject { ///@deprecated The method is misleading, because only one signature may be /// added in a document. The method will be removed in the future. void addSignatureField( - _$jni.JList<_$jni.JObject> sigFields, - _$jni.JObject signatureInterface, - _$jni.JObject options, + _$jni.JList<_$jni.JObject?>? sigFields, + _$jni.JObject? signatureInterface, + _$jni.JObject? options, ) { + final _sigFields = sigFields?.reference ?? _$jni.jNullReference; + final _signatureInterface = + signatureInterface?.reference ?? _$jni.jNullReference; + final _options = options?.reference ?? _$jni.jNullReference; _addSignatureField( reference.pointer, _id_addSignatureField as _$jni.JMethodIDPtr, - sigFields.reference.pointer, - signatureInterface.reference.pointer, - options.reference.pointer) + _sigFields.pointer, + _signatureInterface.pointer, + _options.pointer) .check(); } @@ -516,10 +532,11 @@ class PDDocument extends _$jni.JObject { /// Remove the page from the document. ///@param page The page to remove from the document. void removePage( - _$jni.JObject page, + _$jni.JObject? page, ) { + final _page = page?.reference ?? _$jni.jNullReference; _removePage(reference.pointer, _id_removePage as _$jni.JMethodIDPtr, - page.reference.pointer) + _page.pointer) .check(); } @@ -590,12 +607,13 @@ class PDDocument extends _$jni.JObject { ///@param page The page to import. ///@return The page that was imported. ///@throws IOException If there is an error copying the page. - _$jni.JObject importPage( - _$jni.JObject page, + _$jni.JObject? importPage( + _$jni.JObject? page, ) { + final _page = page?.reference ?? _$jni.jNullReference; return _importPage(reference.pointer, _id_importPage as _$jni.JMethodIDPtr, - page.reference.pointer) - .object(const _$jni.JObjectType()); + _page.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_getDocument = _class.instanceMethodId( @@ -620,10 +638,10 @@ class PDDocument extends _$jni.JObject { /// /// This will get the low level document. ///@return The document that this layer sits on top of. - _$jni.JObject getDocument() { + _$jni.JObject? getDocument() { return _getDocument( reference.pointer, _id_getDocument as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getDocumentInformation = _class.instanceMethodId( @@ -653,10 +671,11 @@ class PDDocument extends _$jni.JObject { /// document level metadata, a metadata stream should be used instead, see /// PDDocumentCatalog\#getMetadata(). ///@return The documents /Info dictionary, never null. - pddocumentinformation_.PDDocumentInformation getDocumentInformation() { + pddocumentinformation_.PDDocumentInformation? getDocumentInformation() { return _getDocumentInformation( reference.pointer, _id_getDocumentInformation as _$jni.JMethodIDPtr) - .object(const pddocumentinformation_.$PDDocumentInformation$Type()); + .object( + const pddocumentinformation_.$PDDocumentInformation$NullableType()); } static final _id_setDocumentInformation = _class.instanceMethodId( @@ -684,12 +703,11 @@ class PDDocument extends _$jni.JObject { /// PDDocumentCatalog\#setMetadata(org.apache.pdfbox.pdmodel.common.PDMetadata) PDDocumentCatalog\#setMetadata(PDMetadata). ///@param info The updated document information. void setDocumentInformation( - pddocumentinformation_.PDDocumentInformation info, + pddocumentinformation_.PDDocumentInformation? info, ) { - _setDocumentInformation( - reference.pointer, - _id_setDocumentInformation as _$jni.JMethodIDPtr, - info.reference.pointer) + final _info = info?.reference ?? _$jni.jNullReference; + _setDocumentInformation(reference.pointer, + _id_setDocumentInformation as _$jni.JMethodIDPtr, _info.pointer) .check(); } @@ -715,10 +733,10 @@ class PDDocument extends _$jni.JObject { /// /// This will get the document CATALOG. This is guaranteed to not return null. ///@return The documents /Root dictionary - _$jni.JObject getDocumentCatalog() { + _$jni.JObject? getDocumentCatalog() { return _getDocumentCatalog( reference.pointer, _id_getDocumentCatalog as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_isEncrypted = _class.instanceMethodId( @@ -773,10 +791,10 @@ class PDDocument extends _$jni.JObject { /// but the only supported subclass at this time is a /// PDStandardEncryption object. ///@return The encryption dictionary(most likely a PDStandardEncryption object) - _$jni.JObject getEncryption() { + _$jni.JObject? getEncryption() { return _getEncryption( reference.pointer, _id_getEncryption as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setEncryptionDictionary = _class.instanceMethodId( @@ -801,12 +819,13 @@ class PDDocument extends _$jni.JObject { ///@param encryption The encryption dictionary(most likely a PDStandardEncryption object) ///@throws IOException If there is an error determining which security handler to use. void setEncryptionDictionary( - _$jni.JObject encryption, + _$jni.JObject? encryption, ) { + final _encryption = encryption?.reference ?? _$jni.jNullReference; _setEncryptionDictionary( reference.pointer, _id_setEncryptionDictionary as _$jni.JMethodIDPtr, - encryption.reference.pointer) + _encryption.pointer) .check(); } @@ -835,10 +854,10 @@ class PDDocument extends _$jni.JObject { /// last in time when empty signature fields are created first but signed after other fields. ///@return the last signature as PDSignatureField. ///@throws IOException if no document catalog can be found. - _$jni.JObject getLastSignatureDictionary() { + _$jni.JObject? getLastSignatureDictionary() { return _getLastSignatureDictionary(reference.pointer, _id_getLastSignatureDictionary as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getSignatureFields = _class.instanceMethodId( @@ -864,10 +883,10 @@ class PDDocument extends _$jni.JObject { /// Retrieve all signature fields from the document. ///@return a List of PDSignatureFields ///@throws IOException if no document catalog can be found. - _$jni.JList<_$jni.JObject> getSignatureFields() { + _$jni.JList<_$jni.JObject?>? getSignatureFields() { return _getSignatureFields( reference.pointer, _id_getSignatureFields as _$jni.JMethodIDPtr) - .object(const _$jni.JListType(_$jni.JObjectType())); + .object(const _$jni.JListNullableType(_$jni.JObjectNullableType())); } static final _id_getSignatureDictionaries = _class.instanceMethodId( @@ -893,10 +912,10 @@ class PDDocument extends _$jni.JObject { /// Retrieve all signature dictionaries from the document. ///@return a List of PDSignatureFields ///@throws IOException if no document catalog can be found. - _$jni.JList<_$jni.JObject> getSignatureDictionaries() { + _$jni.JList<_$jni.JObject?>? getSignatureDictionaries() { return _getSignatureDictionaries(reference.pointer, _id_getSignatureDictionaries as _$jni.JMethodIDPtr) - .object(const _$jni.JListType(_$jni.JObjectType())); + .object(const _$jni.JListNullableType(_$jni.JObjectNullableType())); } static final _id_registerTrueTypeFontForClosing = _class.instanceMethodId( @@ -923,12 +942,13 @@ class PDDocument extends _$jni.JObject { /// method, it is done by the appropriate PDFont classes. ///@param ttf void registerTrueTypeFontForClosing( - _$jni.JObject ttf, + _$jni.JObject? ttf, ) { + final _ttf = ttf?.reference ?? _$jni.jNullReference; _registerTrueTypeFontForClosing( reference.pointer, _id_registerTrueTypeFontForClosing as _$jni.JMethodIDPtr, - ttf.reference.pointer) + _ttf.pointer) .check(); } @@ -956,12 +976,13 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the file required a non-empty password. ///@throws IOException in case of a file reading or parsing error - static PDDocument load( - _$jni.JObject file, + static PDDocument? load( + _$jni.JObject? file, ) { + final _file = file?.reference ?? _$jni.jNullReference; return _load(_class.reference.pointer, _id_load as _$jni.JMethodIDPtr, - file.reference.pointer) - .object(const $PDDocument$Type()); + _file.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$1 = _class.staticMethodId( @@ -995,13 +1016,15 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the file required a non-empty password. ///@throws IOException in case of a file reading or parsing error - static PDDocument load$1( - _$jni.JObject file, - _$jni.JObject memUsageSetting, + static PDDocument? load$1( + _$jni.JObject? file, + _$jni.JObject? memUsageSetting, ) { + final _file = file?.reference ?? _$jni.jNullReference; + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; return _load$1(_class.reference.pointer, _id_load$1 as _$jni.JMethodIDPtr, - file.reference.pointer, memUsageSetting.reference.pointer) - .object(const $PDDocument$Type()); + _file.pointer, _memUsageSetting.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$2 = _class.staticMethodId( @@ -1035,13 +1058,15 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException in case of a file reading or parsing error - static PDDocument load$2( - _$jni.JObject file, - _$jni.JString password, + static PDDocument? load$2( + _$jni.JObject? file, + _$jni.JString? password, ) { + final _file = file?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; return _load$2(_class.reference.pointer, _id_load$2 as _$jni.JMethodIDPtr, - file.reference.pointer, password.reference.pointer) - .object(const $PDDocument$Type()); + _file.pointer, _password.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$3 = _class.staticMethodId( @@ -1078,18 +1103,17 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException in case of a file reading or parsing error - static PDDocument load$3( - _$jni.JObject file, - _$jni.JString password, - _$jni.JObject memUsageSetting, + static PDDocument? load$3( + _$jni.JObject? file, + _$jni.JString? password, + _$jni.JObject? memUsageSetting, ) { - return _load$3( - _class.reference.pointer, - _id_load$3 as _$jni.JMethodIDPtr, - file.reference.pointer, - password.reference.pointer, - memUsageSetting.reference.pointer) - .object(const $PDDocument$Type()); + final _file = file?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; + return _load$3(_class.reference.pointer, _id_load$3 as _$jni.JMethodIDPtr, + _file.pointer, _password.pointer, _memUsageSetting.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$4 = _class.staticMethodId( @@ -1128,20 +1152,19 @@ class PDDocument extends _$jni.JObject { ///@param alias alias to be used for decryption when using public key security ///@return loaded document ///@throws IOException in case of a file reading or parsing error - static PDDocument load$4( - _$jni.JObject file, - _$jni.JString password, - _$jni.JObject keyStore, - _$jni.JString alias, + static PDDocument? load$4( + _$jni.JObject? file, + _$jni.JString? password, + _$jni.JObject? keyStore, + _$jni.JString? alias, ) { - return _load$4( - _class.reference.pointer, - _id_load$4 as _$jni.JMethodIDPtr, - file.reference.pointer, - password.reference.pointer, - keyStore.reference.pointer, - alias.reference.pointer) - .object(const $PDDocument$Type()); + final _file = file?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _keyStore = keyStore?.reference ?? _$jni.jNullReference; + final _alias = alias?.reference ?? _$jni.jNullReference; + return _load$4(_class.reference.pointer, _id_load$4 as _$jni.JMethodIDPtr, + _file.pointer, _password.pointer, _keyStore.pointer, _alias.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$5 = _class.staticMethodId( @@ -1183,22 +1206,27 @@ class PDDocument extends _$jni.JObject { ///@param memUsageSetting defines how memory is used for buffering PDF streams ///@return loaded document ///@throws IOException in case of a file reading or parsing error - static PDDocument load$5( - _$jni.JObject file, - _$jni.JString password, - _$jni.JObject keyStore, - _$jni.JString alias, - _$jni.JObject memUsageSetting, + static PDDocument? load$5( + _$jni.JObject? file, + _$jni.JString? password, + _$jni.JObject? keyStore, + _$jni.JString? alias, + _$jni.JObject? memUsageSetting, ) { + final _file = file?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _keyStore = keyStore?.reference ?? _$jni.jNullReference; + final _alias = alias?.reference ?? _$jni.jNullReference; + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; return _load$5( _class.reference.pointer, _id_load$5 as _$jni.JMethodIDPtr, - file.reference.pointer, - password.reference.pointer, - keyStore.reference.pointer, - alias.reference.pointer, - memUsageSetting.reference.pointer) - .object(const $PDDocument$Type()); + _file.pointer, + _password.pointer, + _keyStore.pointer, + _alias.pointer, + _memUsageSetting.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$6 = _class.staticMethodId( @@ -1226,12 +1254,13 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the PDF required a non-empty password. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$6( - _$jni.JObject input, + static PDDocument? load$6( + _$jni.JObject? input, ) { + final _input = input?.reference ?? _$jni.jNullReference; return _load$6(_class.reference.pointer, _id_load$6 as _$jni.JMethodIDPtr, - input.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$7 = _class.staticMethodId( @@ -1266,13 +1295,15 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the PDF required a non-empty password. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$7( - _$jni.JObject input, - _$jni.JObject memUsageSetting, + static PDDocument? load$7( + _$jni.JObject? input, + _$jni.JObject? memUsageSetting, ) { + final _input = input?.reference ?? _$jni.jNullReference; + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; return _load$7(_class.reference.pointer, _id_load$7 as _$jni.JMethodIDPtr, - input.reference.pointer, memUsageSetting.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer, _memUsageSetting.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$8 = _class.staticMethodId( @@ -1307,13 +1338,15 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$8( - _$jni.JObject input, - _$jni.JString password, + static PDDocument? load$8( + _$jni.JObject? input, + _$jni.JString? password, ) { + final _input = input?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; return _load$8(_class.reference.pointer, _id_load$8 as _$jni.JMethodIDPtr, - input.reference.pointer, password.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer, _password.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$9 = _class.staticMethodId( @@ -1353,20 +1386,24 @@ class PDDocument extends _$jni.JObject { ///@param alias alias to be used for decryption when using public key security ///@return loaded document ///@throws IOException In case of a reading or parsing error. - static PDDocument load$9( - _$jni.JObject input, - _$jni.JString password, - _$jni.JObject keyStore, - _$jni.JString alias, + static PDDocument? load$9( + _$jni.JObject? input, + _$jni.JString? password, + _$jni.JObject? keyStore, + _$jni.JString? alias, ) { + final _input = input?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _keyStore = keyStore?.reference ?? _$jni.jNullReference; + final _alias = alias?.reference ?? _$jni.jNullReference; return _load$9( _class.reference.pointer, _id_load$9 as _$jni.JMethodIDPtr, - input.reference.pointer, - password.reference.pointer, - keyStore.reference.pointer, - alias.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer, + _password.pointer, + _keyStore.pointer, + _alias.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$10 = _class.staticMethodId( @@ -1404,18 +1441,17 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$10( - _$jni.JObject input, - _$jni.JString password, - _$jni.JObject memUsageSetting, + static PDDocument? load$10( + _$jni.JObject? input, + _$jni.JString? password, + _$jni.JObject? memUsageSetting, ) { - return _load$10( - _class.reference.pointer, - _id_load$10 as _$jni.JMethodIDPtr, - input.reference.pointer, - password.reference.pointer, - memUsageSetting.reference.pointer) - .object(const $PDDocument$Type()); + final _input = input?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; + return _load$10(_class.reference.pointer, _id_load$10 as _$jni.JMethodIDPtr, + _input.pointer, _password.pointer, _memUsageSetting.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$11 = _class.staticMethodId( @@ -1459,22 +1495,27 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$11( - _$jni.JObject input, - _$jni.JString password, - _$jni.JObject keyStore, - _$jni.JString alias, - _$jni.JObject memUsageSetting, + static PDDocument? load$11( + _$jni.JObject? input, + _$jni.JString? password, + _$jni.JObject? keyStore, + _$jni.JString? alias, + _$jni.JObject? memUsageSetting, ) { + final _input = input?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _keyStore = keyStore?.reference ?? _$jni.jNullReference; + final _alias = alias?.reference ?? _$jni.jNullReference; + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; return _load$11( _class.reference.pointer, _id_load$11 as _$jni.JMethodIDPtr, - input.reference.pointer, - password.reference.pointer, - keyStore.reference.pointer, - alias.reference.pointer, - memUsageSetting.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer, + _password.pointer, + _keyStore.pointer, + _alias.pointer, + _memUsageSetting.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$12 = _class.staticMethodId( @@ -1501,12 +1542,13 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the PDF required a non-empty password. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$12( - _$jni.JArray<_$jni.jbyte> input, + static PDDocument? load$12( + _$jni.JArray<_$jni.jbyte>? input, ) { + final _input = input?.reference ?? _$jni.jNullReference; return _load$12(_class.reference.pointer, _id_load$12 as _$jni.JMethodIDPtr, - input.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$13 = _class.staticMethodId( @@ -1540,13 +1582,15 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$13( - _$jni.JArray<_$jni.jbyte> input, - _$jni.JString password, + static PDDocument? load$13( + _$jni.JArray<_$jni.jbyte>? input, + _$jni.JString? password, ) { + final _input = input?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; return _load$13(_class.reference.pointer, _id_load$13 as _$jni.JMethodIDPtr, - input.reference.pointer, password.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer, _password.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$14 = _class.staticMethodId( @@ -1586,20 +1630,24 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$14( - _$jni.JArray<_$jni.jbyte> input, - _$jni.JString password, - _$jni.JObject keyStore, - _$jni.JString alias, + static PDDocument? load$14( + _$jni.JArray<_$jni.jbyte>? input, + _$jni.JString? password, + _$jni.JObject? keyStore, + _$jni.JString? alias, ) { + final _input = input?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _keyStore = keyStore?.reference ?? _$jni.jNullReference; + final _alias = alias?.reference ?? _$jni.jNullReference; return _load$14( _class.reference.pointer, _id_load$14 as _$jni.JMethodIDPtr, - input.reference.pointer, - password.reference.pointer, - keyStore.reference.pointer, - alias.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer, + _password.pointer, + _keyStore.pointer, + _alias.pointer) + .object(const $PDDocument$NullableType()); } static final _id_load$15 = _class.staticMethodId( @@ -1642,22 +1690,27 @@ class PDDocument extends _$jni.JObject { ///@return loaded document ///@throws InvalidPasswordException If the password is incorrect. ///@throws IOException In case of a reading or parsing error. - static PDDocument load$15( - _$jni.JArray<_$jni.jbyte> input, - _$jni.JString password, - _$jni.JObject keyStore, - _$jni.JString alias, - _$jni.JObject memUsageSetting, + static PDDocument? load$15( + _$jni.JArray<_$jni.jbyte>? input, + _$jni.JString? password, + _$jni.JObject? keyStore, + _$jni.JString? alias, + _$jni.JObject? memUsageSetting, ) { + final _input = input?.reference ?? _$jni.jNullReference; + final _password = password?.reference ?? _$jni.jNullReference; + final _keyStore = keyStore?.reference ?? _$jni.jNullReference; + final _alias = alias?.reference ?? _$jni.jNullReference; + final _memUsageSetting = memUsageSetting?.reference ?? _$jni.jNullReference; return _load$15( _class.reference.pointer, _id_load$15 as _$jni.JMethodIDPtr, - input.reference.pointer, - password.reference.pointer, - keyStore.reference.pointer, - alias.reference.pointer, - memUsageSetting.reference.pointer) - .object(const $PDDocument$Type()); + _input.pointer, + _password.pointer, + _keyStore.pointer, + _alias.pointer, + _memUsageSetting.pointer) + .object(const $PDDocument$NullableType()); } static final _id_save = _class.instanceMethodId( @@ -1686,10 +1739,10 @@ class PDDocument extends _$jni.JObject { ///@param fileName The file to save as. ///@throws IOException if the output could not be written void save( - _$jni.JString fileName, + _$jni.JString? fileName, ) { - _save(reference.pointer, _id_save as _$jni.JMethodIDPtr, - fileName.reference.pointer) + final _fileName = fileName?.reference ?? _$jni.jNullReference; + _save(reference.pointer, _id_save as _$jni.JMethodIDPtr, _fileName.pointer) .check(); } @@ -1719,10 +1772,10 @@ class PDDocument extends _$jni.JObject { ///@param file The file to save as. ///@throws IOException if the output could not be written void save$1( - _$jni.JObject file, + _$jni.JObject? file, ) { - _save$1(reference.pointer, _id_save$1 as _$jni.JMethodIDPtr, - file.reference.pointer) + final _file = file?.reference ?? _$jni.jNullReference; + _save$1(reference.pointer, _id_save$1 as _$jni.JMethodIDPtr, _file.pointer) .check(); } @@ -1753,10 +1806,11 @@ class PDDocument extends _$jni.JObject { /// it in a java.io.BufferedOutputStream, unless it is already buffered. ///@throws IOException if the output could not be written void save$2( - _$jni.JObject output, + _$jni.JObject? output, ) { + final _output = output?.reference ?? _$jni.jNullReference; _save$2(reference.pointer, _id_save$2 as _$jni.JMethodIDPtr, - output.reference.pointer) + _output.pointer) .check(); } @@ -1792,10 +1846,11 @@ class PDDocument extends _$jni.JObject { ///@throws IOException if the output could not be written ///@throws IllegalStateException if the document was not loaded from a file or a stream. void saveIncremental( - _$jni.JObject output, + _$jni.JObject? output, ) { + final _output = output?.reference ?? _$jni.jNullReference; _saveIncremental(reference.pointer, - _id_saveIncremental as _$jni.JMethodIDPtr, output.reference.pointer) + _id_saveIncremental as _$jni.JMethodIDPtr, _output.pointer) .check(); } @@ -1842,14 +1897,16 @@ class PDDocument extends _$jni.JObject { ///@throws IOException if the output could not be written ///@throws IllegalStateException if the document was not loaded from a file or a stream. void saveIncremental$1( - _$jni.JObject output, - _$jni.JSet<_$jni.JObject> objectsToWrite, + _$jni.JObject? output, + _$jni.JSet<_$jni.JObject?>? objectsToWrite, ) { + final _output = output?.reference ?? _$jni.jNullReference; + final _objectsToWrite = objectsToWrite?.reference ?? _$jni.jNullReference; _saveIncremental$1( reference.pointer, _id_saveIncremental$1 as _$jni.JMethodIDPtr, - output.reference.pointer, - objectsToWrite.reference.pointer) + _output.pointer, + _objectsToWrite.pointer) .check(); } @@ -1910,14 +1967,15 @@ class PDDocument extends _$jni.JObject { ///@throws IOException if the output could not be written ///@throws IllegalStateException if the document was not loaded from a file or a stream or /// signature options were not set. - _$jni.JObject saveIncrementalForExternalSigning( - _$jni.JObject output, + _$jni.JObject? saveIncrementalForExternalSigning( + _$jni.JObject? output, ) { + final _output = output?.reference ?? _$jni.jNullReference; return _saveIncrementalForExternalSigning( reference.pointer, _id_saveIncrementalForExternalSigning as _$jni.JMethodIDPtr, - output.reference.pointer) - .object(const _$jni.JObjectType()); + _output.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_getPage = _class.instanceMethodId( @@ -1945,12 +2003,12 @@ class PDDocument extends _$jni.JObject { /// PDDocument\#getPages() instead. ///@param pageIndex the 0-based page index ///@return the page at the given index. - _$jni.JObject getPage( + _$jni.JObject? getPage( int pageIndex, ) { return _getPage( reference.pointer, _id_getPage as _$jni.JMethodIDPtr, pageIndex) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getPages = _class.instanceMethodId( @@ -1975,9 +2033,9 @@ class PDDocument extends _$jni.JObject { /// /// Returns the page tree. ///@return the page tree - _$jni.JObject getPages() { + _$jni.JObject? getPages() { return _getPages(reference.pointer, _id_getPages as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getNumberOfPages = _class.instanceMethodId( @@ -2061,10 +2119,11 @@ class PDDocument extends _$jni.JObject { ///@param policy The protection policy. ///@throws IOException if there isn't any suitable security handler. void protect( - _$jni.JObject policy, + _$jni.JObject? policy, ) { + final _policy = policy?.reference ?? _$jni.jNullReference; _protect(reference.pointer, _id_protect as _$jni.JMethodIDPtr, - policy.reference.pointer) + _policy.pointer) .check(); } @@ -2094,10 +2153,10 @@ class PDDocument extends _$jni.JObject { /// only mode so that permissions cannot be changed. Methods providing access to content should rely on this object /// to verify if the current user is allowed to proceed. ///@return the access permissions for the current user on the document. - _$jni.JObject getCurrentAccessPermission() { + _$jni.JObject? getCurrentAccessPermission() { return _getCurrentAccessPermission(reference.pointer, _id_getCurrentAccessPermission as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_isAllSecurityToBeRemoved = _class.instanceMethodId( @@ -2178,10 +2237,10 @@ class PDDocument extends _$jni.JObject { /// /// Provides the document ID. ///@return the document ID - _$jni.JLong getDocumentId() { + _$jni.JLong? getDocumentId() { return _getDocumentId( reference.pointer, _id_getDocumentId as _$jni.JMethodIDPtr) - .object(const _$jni.JLongType()); + .object(const _$jni.JLongNullableType()); } static final _id_setDocumentId = _class.instanceMethodId( @@ -2205,10 +2264,11 @@ class PDDocument extends _$jni.JObject { /// Sets the document ID to the given value. ///@param docId the new document ID void setDocumentId( - _$jni.JLong docId, + _$jni.JLong? docId, ) { + final _docId = docId?.reference ?? _$jni.jNullReference; _setDocumentId(reference.pointer, _id_setDocumentId as _$jni.JMethodIDPtr, - docId.reference.pointer) + _docId.pointer) .check(); } @@ -2287,10 +2347,10 @@ class PDDocument extends _$jni.JObject { /// /// Returns the resource cache associated with this document, or null if there is none. ///@return the resource cache or null. - _$jni.JObject getResourceCache() { + _$jni.JObject? getResourceCache() { return _getResourceCache( reference.pointer, _id_getResourceCache as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setResourceCache = _class.instanceMethodId( @@ -2314,16 +2374,52 @@ class PDDocument extends _$jni.JObject { /// Sets the resource cache associated with this document. ///@param resourceCache A resource cache, or null. void setResourceCache( - _$jni.JObject resourceCache, + _$jni.JObject? resourceCache, ) { - _setResourceCache( - reference.pointer, - _id_setResourceCache as _$jni.JMethodIDPtr, - resourceCache.reference.pointer) + final _resourceCache = resourceCache?.reference ?? _$jni.jNullReference; + _setResourceCache(reference.pointer, + _id_setResourceCache as _$jni.JMethodIDPtr, _resourceCache.pointer) .check(); } } +final class $PDDocument$NullableType extends _$jni.JObjType { + @_$jni.internal + const $PDDocument$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lorg/apache/pdfbox/pdmodel/PDDocument;'; + + @_$jni.internal + @_$core.override + PDDocument? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : PDDocument.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($PDDocument$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($PDDocument$NullableType) && + other is $PDDocument$NullableType; + } +} + final class $PDDocument$Type extends _$jni.JObjType { @_$jni.internal const $PDDocument$Type(); @@ -2335,11 +2431,17 @@ final class $PDDocument$Type extends _$jni.JObjType { @_$jni.internal @_$core.override PDDocument fromReference(_$jni.JReference reference) => - PDDocument.fromReference(reference); + PDDocument.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $PDDocument$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart index ae30379a0..e2716da55 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart +++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart @@ -74,6 +74,7 @@ class PDDocumentInformation extends _$jni.JObject { _$jni.JClass.forName(r'org/apache/pdfbox/pdmodel/PDDocumentInformation'); /// The type which includes information such as the signature of this class. + static const nullableType = $PDDocumentInformation$NullableType(); static const type = $PDDocumentInformation$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -122,10 +123,11 @@ class PDDocumentInformation extends _$jni.JObject { /// Constructor that is used for a preexisting dictionary. ///@param dic The underlying dictionary. factory PDDocumentInformation.new$1( - _$jni.JObject dic, + _$jni.JObject? dic, ) { + final _dic = dic?.reference ?? _$jni.jNullReference; return PDDocumentInformation.fromReference(_new$1(_class.reference.pointer, - _id_new$1 as _$jni.JMethodIDPtr, dic.reference.pointer) + _id_new$1 as _$jni.JMethodIDPtr, _dic.pointer) .reference); } @@ -151,10 +153,10 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the underlying dictionary that this object wraps. ///@return The underlying info dictionary. - _$jni.JObject getCOSObject() { + _$jni.JObject? getCOSObject() { return _getCOSObject( reference.pointer, _id_getCOSObject as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getPropertyStringValue = _class.instanceMethodId( @@ -184,14 +186,15 @@ class PDDocumentInformation extends _$jni.JObject { /// ///@param propertyKey the dictionaries key ///@return the properties value - _$jni.JObject getPropertyStringValue( - _$jni.JString propertyKey, + _$jni.JObject? getPropertyStringValue( + _$jni.JString? propertyKey, ) { + final _propertyKey = propertyKey?.reference ?? _$jni.jNullReference; return _getPropertyStringValue( reference.pointer, _id_getPropertyStringValue as _$jni.JMethodIDPtr, - propertyKey.reference.pointer) - .object(const _$jni.JObjectType()); + _propertyKey.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_getTitle = _class.instanceMethodId( @@ -216,9 +219,9 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the title of the document. This will return null if no title exists. ///@return The title of the document. - _$jni.JString getTitle() { + _$jni.JString? getTitle() { return _getTitle(reference.pointer, _id_getTitle as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setTitle = _class.instanceMethodId( @@ -242,10 +245,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the title of the document. ///@param title The new title for the document. void setTitle( - _$jni.JString title, + _$jni.JString? title, ) { + final _title = title?.reference ?? _$jni.jNullReference; _setTitle(reference.pointer, _id_setTitle as _$jni.JMethodIDPtr, - title.reference.pointer) + _title.pointer) .check(); } @@ -271,9 +275,9 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the author of the document. This will return null if no author exists. ///@return The author of the document. - _$jni.JString getAuthor() { + _$jni.JString? getAuthor() { return _getAuthor(reference.pointer, _id_getAuthor as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setAuthor = _class.instanceMethodId( @@ -297,10 +301,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the author of the document. ///@param author The new author for the document. void setAuthor( - _$jni.JString author, + _$jni.JString? author, ) { + final _author = author?.reference ?? _$jni.jNullReference; _setAuthor(reference.pointer, _id_setAuthor as _$jni.JMethodIDPtr, - author.reference.pointer) + _author.pointer) .check(); } @@ -326,9 +331,9 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the subject of the document. This will return null if no subject exists. ///@return The subject of the document. - _$jni.JString getSubject() { + _$jni.JString? getSubject() { return _getSubject(reference.pointer, _id_getSubject as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setSubject = _class.instanceMethodId( @@ -352,10 +357,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the subject of the document. ///@param subject The new subject for the document. void setSubject( - _$jni.JString subject, + _$jni.JString? subject, ) { + final _subject = subject?.reference ?? _$jni.jNullReference; _setSubject(reference.pointer, _id_setSubject as _$jni.JMethodIDPtr, - subject.reference.pointer) + _subject.pointer) .check(); } @@ -381,10 +387,10 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the keywords of the document. This will return null if no keywords exists. ///@return The keywords of the document. - _$jni.JString getKeywords() { + _$jni.JString? getKeywords() { return _getKeywords( reference.pointer, _id_getKeywords as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setKeywords = _class.instanceMethodId( @@ -408,10 +414,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the keywords of the document. ///@param keywords The new keywords for the document. void setKeywords( - _$jni.JString keywords, + _$jni.JString? keywords, ) { + final _keywords = keywords?.reference ?? _$jni.jNullReference; _setKeywords(reference.pointer, _id_setKeywords as _$jni.JMethodIDPtr, - keywords.reference.pointer) + _keywords.pointer) .check(); } @@ -437,9 +444,9 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the creator of the document. This will return null if no creator exists. ///@return The creator of the document. - _$jni.JString getCreator() { + _$jni.JString? getCreator() { return _getCreator(reference.pointer, _id_getCreator as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setCreator = _class.instanceMethodId( @@ -463,10 +470,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the creator of the document. ///@param creator The new creator for the document. void setCreator( - _$jni.JString creator, + _$jni.JString? creator, ) { + final _creator = creator?.reference ?? _$jni.jNullReference; _setCreator(reference.pointer, _id_setCreator as _$jni.JMethodIDPtr, - creator.reference.pointer) + _creator.pointer) .check(); } @@ -492,10 +500,10 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the producer of the document. This will return null if no producer exists. ///@return The producer of the document. - _$jni.JString getProducer() { + _$jni.JString? getProducer() { return _getProducer( reference.pointer, _id_getProducer as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setProducer = _class.instanceMethodId( @@ -519,10 +527,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the producer of the document. ///@param producer The new producer for the document. void setProducer( - _$jni.JString producer, + _$jni.JString? producer, ) { + final _producer = producer?.reference ?? _$jni.jNullReference; _setProducer(reference.pointer, _id_setProducer as _$jni.JMethodIDPtr, - producer.reference.pointer) + _producer.pointer) .check(); } @@ -548,10 +557,10 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the creation date of the document. This will return null if no creation date exists. ///@return The creation date of the document. - _$jni.JObject getCreationDate() { + _$jni.JObject? getCreationDate() { return _getCreationDate( reference.pointer, _id_getCreationDate as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setCreationDate = _class.instanceMethodId( @@ -575,10 +584,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the creation date of the document. ///@param date The new creation date for the document. void setCreationDate( - _$jni.JObject date, + _$jni.JObject? date, ) { + final _date = date?.reference ?? _$jni.jNullReference; _setCreationDate(reference.pointer, - _id_setCreationDate as _$jni.JMethodIDPtr, date.reference.pointer) + _id_setCreationDate as _$jni.JMethodIDPtr, _date.pointer) .check(); } @@ -604,10 +614,10 @@ class PDDocumentInformation extends _$jni.JObject { /// /// This will get the modification date of the document. This will return null if no modification date exists. ///@return The modification date of the document. - _$jni.JObject getModificationDate() { + _$jni.JObject? getModificationDate() { return _getModificationDate( reference.pointer, _id_getModificationDate as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setModificationDate = _class.instanceMethodId( @@ -631,12 +641,11 @@ class PDDocumentInformation extends _$jni.JObject { /// This will set the modification date of the document. ///@param date The new modification date for the document. void setModificationDate( - _$jni.JObject date, + _$jni.JObject? date, ) { - _setModificationDate( - reference.pointer, - _id_setModificationDate as _$jni.JMethodIDPtr, - date.reference.pointer) + final _date = date?.reference ?? _$jni.jNullReference; + _setModificationDate(reference.pointer, + _id_setModificationDate as _$jni.JMethodIDPtr, _date.pointer) .check(); } @@ -663,9 +672,9 @@ class PDDocumentInformation extends _$jni.JObject { /// This will get the trapped value for the document. /// This will return null if one is not found. ///@return The trapped value for the document. - _$jni.JString getTrapped() { + _$jni.JString? getTrapped() { return _getTrapped(reference.pointer, _id_getTrapped as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getMetadataKeys = _class.instanceMethodId( @@ -691,10 +700,10 @@ class PDDocumentInformation extends _$jni.JObject { /// This will get the keys of all metadata information fields for the document. ///@return all metadata key strings. ///@since Apache PDFBox 1.3.0 - _$jni.JSet<_$jni.JString> getMetadataKeys() { + _$jni.JSet<_$jni.JString?>? getMetadataKeys() { return _getMetadataKeys( reference.pointer, _id_getMetadataKeys as _$jni.JMethodIDPtr) - .object(const _$jni.JSetType(_$jni.JStringType())); + .object(const _$jni.JSetNullableType(_$jni.JStringNullableType())); } static final _id_getCustomMetadataValue = _class.instanceMethodId( @@ -720,14 +729,15 @@ class PDDocumentInformation extends _$jni.JObject { /// This will return null if one is not found. ///@param fieldName Name of custom metadata field from pdf document. ///@return String Value of metadata field - _$jni.JString getCustomMetadataValue( - _$jni.JString fieldName, + _$jni.JString? getCustomMetadataValue( + _$jni.JString? fieldName, ) { + final _fieldName = fieldName?.reference ?? _$jni.jNullReference; return _getCustomMetadataValue( reference.pointer, _id_getCustomMetadataValue as _$jni.JMethodIDPtr, - fieldName.reference.pointer) - .object(const _$jni.JStringType()); + _fieldName.pointer) + .object(const _$jni.JStringNullableType()); } static final _id_setCustomMetadataValue = _class.instanceMethodId( @@ -758,14 +768,16 @@ class PDDocumentInformation extends _$jni.JObject { ///@param fieldName The name of the custom metadata field. ///@param fieldValue The value to the custom metadata field. void setCustomMetadataValue( - _$jni.JString fieldName, - _$jni.JString fieldValue, + _$jni.JString? fieldName, + _$jni.JString? fieldValue, ) { + final _fieldName = fieldName?.reference ?? _$jni.jNullReference; + final _fieldValue = fieldValue?.reference ?? _$jni.jNullReference; _setCustomMetadataValue( reference.pointer, _id_setCustomMetadataValue as _$jni.JMethodIDPtr, - fieldName.reference.pointer, - fieldValue.reference.pointer) + _fieldName.pointer, + _fieldValue.pointer) .check(); } @@ -792,14 +804,54 @@ class PDDocumentInformation extends _$jni.JObject { ///@param value The new trapped value for the document. ///@throws IllegalArgumentException if the parameter is invalid. void setTrapped( - _$jni.JString value, + _$jni.JString? value, ) { + final _value = value?.reference ?? _$jni.jNullReference; _setTrapped(reference.pointer, _id_setTrapped as _$jni.JMethodIDPtr, - value.reference.pointer) + _value.pointer) .check(); } } +final class $PDDocumentInformation$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $PDDocumentInformation$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lorg/apache/pdfbox/pdmodel/PDDocumentInformation;'; + + @_$jni.internal + @_$core.override + PDDocumentInformation? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : PDDocumentInformation.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($PDDocumentInformation$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($PDDocumentInformation$NullableType) && + other is $PDDocumentInformation$NullableType; + } +} + final class $PDDocumentInformation$Type extends _$jni.JObjType { @_$jni.internal @@ -812,11 +864,17 @@ final class $PDDocumentInformation$Type @_$jni.internal @_$core.override PDDocumentInformation fromReference(_$jni.JReference reference) => - PDDocumentInformation.fromReference(reference); + PDDocumentInformation.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $PDDocumentInformation$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart index 134b0cc16..72b397863 100644 --- a/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart +++ b/pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart @@ -78,6 +78,7 @@ class PDFTextStripper extends _$jni.JObject { _$jni.JClass.forName(r'org/apache/pdfbox/text/PDFTextStripper'); /// The type which includes information such as the signature of this class. + static const nullableType = $PDFTextStripper$NullableType(); static const type = $PDFTextStripper$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -135,12 +136,13 @@ class PDFTextStripper extends _$jni.JObject { ///@param doc The document to get the text from. ///@return The text of the PDF document. ///@throws IOException if the doc state is invalid or it is encrypted. - _$jni.JString getText( - pddocument_.PDDocument doc, + _$jni.JString? getText( + pddocument_.PDDocument? doc, ) { - return _getText(reference.pointer, _id_getText as _$jni.JMethodIDPtr, - doc.reference.pointer) - .object(const _$jni.JStringType()); + final _doc = doc?.reference ?? _$jni.jNullReference; + return _getText( + reference.pointer, _id_getText as _$jni.JMethodIDPtr, _doc.pointer) + .object(const _$jni.JStringNullableType()); } static final _id_writeText = _class.instanceMethodId( @@ -172,11 +174,13 @@ class PDFTextStripper extends _$jni.JObject { ///@param outputStream The location to put the text. ///@throws IOException If the doc is in an invalid state. void writeText( - pddocument_.PDDocument doc, - _$jni.JObject outputStream, + pddocument_.PDDocument? doc, + _$jni.JObject? outputStream, ) { + final _doc = doc?.reference ?? _$jni.jNullReference; + final _outputStream = outputStream?.reference ?? _$jni.jNullReference; _writeText(reference.pointer, _id_writeText as _$jni.JMethodIDPtr, - doc.reference.pointer, outputStream.reference.pointer) + _doc.pointer, _outputStream.pointer) .check(); } @@ -202,10 +206,11 @@ class PDFTextStripper extends _$jni.JObject { ///@param page The page to process. ///@throws IOException If there is an error processing the page. void processPage( - _$jni.JObject page, + _$jni.JObject? page, ) { + final _page = page?.reference ?? _$jni.jNullReference; _processPage(reference.pointer, _id_processPage as _$jni.JMethodIDPtr, - page.reference.pointer) + _page.pointer) .check(); } @@ -342,12 +347,11 @@ class PDFTextStripper extends _$jni.JObject { /// preference is not set explicitly using this method. ///@param separator The desired line separator string. void setLineSeparator( - _$jni.JString separator, + _$jni.JString? separator, ) { - _setLineSeparator( - reference.pointer, - _id_setLineSeparator as _$jni.JMethodIDPtr, - separator.reference.pointer) + final _separator = separator?.reference ?? _$jni.jNullReference; + _setLineSeparator(reference.pointer, + _id_setLineSeparator as _$jni.JMethodIDPtr, _separator.pointer) .check(); } @@ -373,10 +377,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// This will get the line separator. ///@return The desired line separator string. - _$jni.JString getLineSeparator() { + _$jni.JString? getLineSeparator() { return _getLineSeparator( reference.pointer, _id_getLineSeparator as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getWordSeparator = _class.instanceMethodId( @@ -401,10 +405,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// This will get the word separator. ///@return The desired word separator string. - _$jni.JString getWordSeparator() { + _$jni.JString? getWordSeparator() { return _getWordSeparator( reference.pointer, _id_getWordSeparator as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setWordSeparator = _class.instanceMethodId( @@ -431,12 +435,11 @@ class PDFTextStripper extends _$jni.JObject { /// the empty string. ///@param separator The desired page separator string. void setWordSeparator( - _$jni.JString separator, + _$jni.JString? separator, ) { - _setWordSeparator( - reference.pointer, - _id_setWordSeparator as _$jni.JMethodIDPtr, - separator.reference.pointer) + final _separator = separator?.reference ?? _$jni.jNullReference; + _setWordSeparator(reference.pointer, + _id_setWordSeparator as _$jni.JMethodIDPtr, _separator.pointer) .check(); } @@ -578,10 +581,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// Get the bookmark where text extraction should end, inclusive. Default is null. ///@return The ending bookmark. - _$jni.JObject getEndBookmark() { + _$jni.JObject? getEndBookmark() { return _getEndBookmark( reference.pointer, _id_getEndBookmark as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setEndBookmark = _class.instanceMethodId( @@ -605,10 +608,11 @@ class PDFTextStripper extends _$jni.JObject { /// Set the bookmark where the text extraction should stop. ///@param aEndBookmark The ending bookmark. void setEndBookmark( - _$jni.JObject aEndBookmark, + _$jni.JObject? aEndBookmark, ) { + final _aEndBookmark = aEndBookmark?.reference ?? _$jni.jNullReference; _setEndBookmark(reference.pointer, _id_setEndBookmark as _$jni.JMethodIDPtr, - aEndBookmark.reference.pointer) + _aEndBookmark.pointer) .check(); } @@ -634,10 +638,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// Get the bookmark where text extraction should start, inclusive. Default is null. ///@return The starting bookmark. - _$jni.JObject getStartBookmark() { + _$jni.JObject? getStartBookmark() { return _getStartBookmark( reference.pointer, _id_getStartBookmark as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setStartBookmark = _class.instanceMethodId( @@ -661,12 +665,11 @@ class PDFTextStripper extends _$jni.JObject { /// Set the bookmark where text extraction should start, inclusive. ///@param aStartBookmark The starting bookmark. void setStartBookmark( - _$jni.JObject aStartBookmark, + _$jni.JObject? aStartBookmark, ) { - _setStartBookmark( - reference.pointer, - _id_setStartBookmark as _$jni.JMethodIDPtr, - aStartBookmark.reference.pointer) + final _aStartBookmark = aStartBookmark?.reference ?? _$jni.jNullReference; + _setStartBookmark(reference.pointer, + _id_setStartBookmark as _$jni.JMethodIDPtr, _aStartBookmark.pointer) .check(); } @@ -1042,10 +1045,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// Returns the string which will be used at the beginning of a paragraph. ///@return the paragraph start string - _$jni.JString getParagraphStart() { + _$jni.JString? getParagraphStart() { return _getParagraphStart( reference.pointer, _id_getParagraphStart as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setParagraphStart = _class.instanceMethodId( @@ -1069,10 +1072,11 @@ class PDFTextStripper extends _$jni.JObject { /// Sets the string which will be used at the beginning of a paragraph. ///@param s the paragraph start string void setParagraphStart( - _$jni.JString s, + _$jni.JString? s, ) { + final _s = s?.reference ?? _$jni.jNullReference; _setParagraphStart(reference.pointer, - _id_setParagraphStart as _$jni.JMethodIDPtr, s.reference.pointer) + _id_setParagraphStart as _$jni.JMethodIDPtr, _s.pointer) .check(); } @@ -1098,10 +1102,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// Returns the string which will be used at the end of a paragraph. ///@return the paragraph end string - _$jni.JString getParagraphEnd() { + _$jni.JString? getParagraphEnd() { return _getParagraphEnd( reference.pointer, _id_getParagraphEnd as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setParagraphEnd = _class.instanceMethodId( @@ -1125,10 +1129,11 @@ class PDFTextStripper extends _$jni.JObject { /// Sets the string which will be used at the end of a paragraph. ///@param s the paragraph end string void setParagraphEnd( - _$jni.JString s, + _$jni.JString? s, ) { + final _s = s?.reference ?? _$jni.jNullReference; _setParagraphEnd(reference.pointer, - _id_setParagraphEnd as _$jni.JMethodIDPtr, s.reference.pointer) + _id_setParagraphEnd as _$jni.JMethodIDPtr, _s.pointer) .check(); } @@ -1154,10 +1159,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// Returns the string which will be used at the beginning of a page. ///@return the page start string - _$jni.JString getPageStart() { + _$jni.JString? getPageStart() { return _getPageStart( reference.pointer, _id_getPageStart as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setPageStart = _class.instanceMethodId( @@ -1181,10 +1186,11 @@ class PDFTextStripper extends _$jni.JObject { /// Sets the string which will be used at the beginning of a page. ///@param pageStartValue the page start string void setPageStart( - _$jni.JString pageStartValue, + _$jni.JString? pageStartValue, ) { + final _pageStartValue = pageStartValue?.reference ?? _$jni.jNullReference; _setPageStart(reference.pointer, _id_setPageStart as _$jni.JMethodIDPtr, - pageStartValue.reference.pointer) + _pageStartValue.pointer) .check(); } @@ -1210,9 +1216,9 @@ class PDFTextStripper extends _$jni.JObject { /// /// Returns the string which will be used at the end of a page. ///@return the page end string - _$jni.JString getPageEnd() { + _$jni.JString? getPageEnd() { return _getPageEnd(reference.pointer, _id_getPageEnd as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setPageEnd = _class.instanceMethodId( @@ -1236,10 +1242,11 @@ class PDFTextStripper extends _$jni.JObject { /// Sets the string which will be used at the end of a page. ///@param pageEndValue the page end string void setPageEnd( - _$jni.JString pageEndValue, + _$jni.JString? pageEndValue, ) { + final _pageEndValue = pageEndValue?.reference ?? _$jni.jNullReference; _setPageEnd(reference.pointer, _id_setPageEnd as _$jni.JMethodIDPtr, - pageEndValue.reference.pointer) + _pageEndValue.pointer) .check(); } @@ -1265,10 +1272,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// Returns the string which will be used at the beginning of an article. ///@return the article start string - _$jni.JString getArticleStart() { + _$jni.JString? getArticleStart() { return _getArticleStart( reference.pointer, _id_getArticleStart as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setArticleStart = _class.instanceMethodId( @@ -1292,12 +1299,14 @@ class PDFTextStripper extends _$jni.JObject { /// Sets the string which will be used at the beginning of an article. ///@param articleStartValue the article start string void setArticleStart( - _$jni.JString articleStartValue, + _$jni.JString? articleStartValue, ) { + final _articleStartValue = + articleStartValue?.reference ?? _$jni.jNullReference; _setArticleStart( reference.pointer, _id_setArticleStart as _$jni.JMethodIDPtr, - articleStartValue.reference.pointer) + _articleStartValue.pointer) .check(); } @@ -1323,10 +1332,10 @@ class PDFTextStripper extends _$jni.JObject { /// /// Returns the string which will be used at the end of an article. ///@return the article end string - _$jni.JString getArticleEnd() { + _$jni.JString? getArticleEnd() { return _getArticleEnd( reference.pointer, _id_getArticleEnd as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setArticleEnd = _class.instanceMethodId( @@ -1350,14 +1359,53 @@ class PDFTextStripper extends _$jni.JObject { /// Sets the string which will be used at the end of an article. ///@param articleEndValue the article end string void setArticleEnd( - _$jni.JString articleEndValue, + _$jni.JString? articleEndValue, ) { + final _articleEndValue = articleEndValue?.reference ?? _$jni.jNullReference; _setArticleEnd(reference.pointer, _id_setArticleEnd as _$jni.JMethodIDPtr, - articleEndValue.reference.pointer) + _articleEndValue.pointer) .check(); } } +final class $PDFTextStripper$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $PDFTextStripper$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lorg/apache/pdfbox/text/PDFTextStripper;'; + + @_$jni.internal + @_$core.override + PDFTextStripper? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : PDFTextStripper.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($PDFTextStripper$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($PDFTextStripper$NullableType) && + other is $PDFTextStripper$NullableType; + } +} + final class $PDFTextStripper$Type extends _$jni.JObjType { @_$jni.internal const $PDFTextStripper$Type(); @@ -1369,11 +1417,17 @@ final class $PDFTextStripper$Type extends _$jni.JObjType { @_$jni.internal @_$core.override PDFTextStripper fromReference(_$jni.JReference reference) => - PDFTextStripper.fromReference(reference); + PDFTextStripper.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $PDFTextStripper$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmClassVisitor.java b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmClassVisitor.java index 7596c0d3e..010c0679d 100644 --- a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmClassVisitor.java +++ b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmClassVisitor.java @@ -54,7 +54,6 @@ public void visit( current.interfaces = StreamUtil.map(interfaces, i -> TypeUtils.typeUsage(Type.getObjectType(i))); if (signature != null) { - System.err.println(name + ": " + signature); var reader = new SignatureReader(signature); reader.accept(new AsmClassSignatureVisitor(current)); } @@ -65,7 +64,10 @@ public void visit( public void visitInnerClass(String name, String outerName, String innerName, int access) { var binaryName = name.replace('/', '.'); actualAccess.put(binaryName, access); - outerClass.put(binaryName, visiting.peek().binaryName); + if (outerName != null) { + var outerClassBinaryName = outerName.replace('/', '.'); + outerClass.put(binaryName, outerClassBinaryName); + } if (visited.containsKey(binaryName)) { // If the order of visit is outerClass-first, innerClass-second then only // correct the modifiers. diff --git a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmMethodVisitor.java b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmMethodVisitor.java index 494b06e14..9c2679460 100644 --- a/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmMethodVisitor.java +++ b/pkgs/jnigen/java/src/main/java/com/github/dart_lang/jnigen/apisummarizer/disasm/AsmMethodVisitor.java @@ -73,6 +73,7 @@ public AnnotationVisitor visitTypeAnnotation( case TypeReference.THROWS: { // Ignore this as Dart does not have an equivalent to `throws`. + break; } } if (startingType != null) { diff --git a/pkgs/jnigen/lib/src/bindings/dart_generator.dart b/pkgs/jnigen/lib/src/bindings/dart_generator.dart index 413ef67d7..e643ab9a9 100644 --- a/pkgs/jnigen/lib/src/bindings/dart_generator.dart +++ b/pkgs/jnigen/lib/src/bindings/dart_generator.dart @@ -33,7 +33,6 @@ const _methodInvocation = '$_jni.MethodInvocation'; const _protectedExtension = '$_jni.ProtectedJniExtensions'; const _voidPointer = '$_jni.Pointer<$_jni.Void>'; const _internal = '@$_jni.internal'; -const _nullptr = '$_jni.nullptr'; // Prefixes and suffixes. const _typeParamPrefix = '\$'; @@ -366,28 +365,38 @@ class $name$typeParamsDef extends $superName { // Static TypeClass getter. s.writeln( ' /// The type which includes information such as the signature of this class.'); - final typeClassName = node.typeClassName; - if (typeParams.isEmpty) { - s.writeln('static const $staticTypeGetter = $typeClassName();'); - } else { - final staticTypeGetterTypeClassesDef = typeParams - .map( - (typeParam) => '$_jType<$_typeParamPrefix$typeParam> $typeParam,') - .join(_newLine(depth: 2)); - final typeClassesCall = - typeParams.map((typeParam) => '$typeParam,').join(_newLine(depth: 3)); - s.write(''' - static $typeClassName$typeParamsCall $staticTypeGetter$typeParamsDef( + void generateTypeClassGetter({required bool isNullable}) { + final typeClassName = + isNullable ? node.nullableTypeClassName : node.typeClassName; + final typeClassGetterName = + isNullable ? 'nullableType' : staticTypeGetter; + if (typeParams.isEmpty) { + s.writeln('static const $typeClassGetterName = ' + '$typeClassName$typeParamsCall();'); + } else { + final staticTypeGetterTypeClassesDef = typeParams + .map((typeParam) => + '$_jType<$_typeParamPrefix$typeParam> $typeParam,') + .join(_newLine(depth: 2)); + final typeClassesCall = typeParams + .map((typeParam) => '$typeParam,') + .join(_newLine(depth: 3)); + s.write(''' + static $typeClassName$typeParamsCall $typeClassGetterName$typeParamsDef( $staticTypeGetterTypeClassesDef ) { - return $typeClassName( + return $typeClassName$typeParamsCall( $typeClassesCall ); } '''); + } } + generateTypeClassGetter(isNullable: true); + generateTypeClassGetter(isNullable: false); + // Fields and Methods generateFieldsAndMethods(node, classRef); @@ -516,7 +525,7 @@ class $name$typeParamsDef extends $superName { abstract base mixin class $implClassName$typeParamsDef { factory $implClassName( $abstractFactoryArgs - ) = _$implClassName; + ) = _$implClassName$typeParamsCall; $typeClassGetters @@ -563,19 +572,36 @@ final class _$implClassName$typeParamsDef with $implClassName$typeParamsCall { s.writeln('}'); } // TypeClass definition. - final typeClassesCall = - typeParams.map((typeParam) => '$typeParam,').join(_newLine(depth: 2)); - final signature = node.signature; - final superTypeClass = superClass.accept(_TypeClassGenerator(resolver)); - final hashCodeTypeClasses = typeParams.join(', '); - final equalityTypeClasses = typeParams - .map((typeParam) => ' &&\n $typeParam == other.$typeParam') - .join(); - final hashCode = typeParams.isEmpty - ? '($typeClassName).hashCode' - : 'Object.hash($typeClassName, $hashCodeTypeClasses)'; - s.write(''' -final class $typeClassName$typeParamsDef extends $_jType<$name$typeParamsCall> { + void generateTypeClass({required bool isNullable}) { + final typeClassName = + isNullable ? node.nullableTypeClassName : node.typeClassName; + final typeClassesCall = + typeParams.map((typeParam) => '$typeParam,').join(_newLine(depth: 2)); + final signature = node.signature; + final superType = superClass.accept(_TypeClassGenerator(resolver)).name; + final hashCodeTypeClasses = typeParams.join(', '); + final equalityTypeClasses = typeParams + .map((typeParam) => ' &&\n $typeParam == other.$typeParam') + .join(); + final hashCode = typeParams.isEmpty + ? '($typeClassName).hashCode' + : 'Object.hash($typeClassName, $hashCodeTypeClasses)'; + final nullableType = isNullable + ? 'this' + : (DeclaredType( + binaryName: node.binaryName, + annotations: [Annotation.nullable], + params: node.allTypeParams + .map((typeParam) => TypeUsage( + shorthand: '', kind: Kind.typeVariable, typeJson: {}) + ..type = TypeVar(name: typeParam.name)) + .toList()) + ..classDecl = node) + .accept(_TypeClassGenerator(resolver)) + .name; + final nullable = isNullable ? '?' : ''; + s.write(''' +final class $typeClassName$typeParamsDef extends $_jType<$name$typeParamsCall$nullable> { $typeClassesDef $_internal @@ -589,14 +615,31 @@ final class $typeClassName$typeParamsDef extends $_jType<$name$typeParamsCall> { $_internal $_override - $name$typeParamsCall fromReference($_jReference reference) => $name.fromReference( - $typeClassesCall - reference - ); + $name$typeParamsCall$nullable fromReference($_jReference reference) => + '''); + if (isNullable) { + s.write(''' + reference.isNull ? null : $name.fromReference( + $typeClassesCall + reference, + ); +'''); + } else { + s.write(''' + $name.fromReference( + $typeClassesCall + reference, + ); +'''); + } + s.write(''' + $_internal + $_override + $_jType get superType => $superType; $_internal $_override - $_jType get superType => ${superTypeClass.name}; + $_jType<$name$typeParamsCall?> get nullableType => $nullableType; $_internal $_override @@ -613,6 +656,11 @@ final class $typeClassName$typeParamsDef extends $_jType<$name$typeParamsCall> { } '''); + } + + generateTypeClass(isNullable: true); + generateTypeClass(isNullable: false); + log.finest('Generated bindings for class ${node.binaryName}'); } } @@ -669,7 +717,8 @@ class _TypeGenerator extends TypeVisitor { final innerType = node.elementType; final nullable = includeNullability && node.isNullable ? '?' : ''; if (innerType.kind == Kind.primitive) { - return '$_jArray<$_jni.j${(innerType.type as PrimitiveType).name}>'; + return '$_jArray<$_jni.j${(innerType.type as PrimitiveType).name}>' + '$nullable'; } final typeGenerator = _TypeGenerator( resolver, @@ -731,7 +780,10 @@ class _TypeGenerator extends TypeVisitor { @override String visitTypeVar(TypeVar node) { - final nullable = includeNullability && node.isNullable ? '?' : ''; + // A type-variable gets a question mark only when it is explicitly set as + // nullable in this instance. Otherwise, its nullability is defined at its + // origin type-parameter. + final nullable = includeNullability && node.hasNullable ? '?' : ''; // TODO(https://github.com/dart-lang/native/issues/704): Tighten to // typevar bounds instead. if (typeErasure) { @@ -798,8 +850,9 @@ class _TypeClassGenerator extends TypeVisitor<_TypeClass> { typeErasure: forInterfaceImplementation, )); final ifConst = innerTypeClass.canBeConst && isConst ? 'const ' : ''; + final type = node.isNullable ? 'NullableType' : 'Type'; return _TypeClass( - '$ifConst${_jArray}Type(${innerTypeClass.name})', + '$ifConst$_jArray$type(${innerTypeClass.name})', innerTypeClass.canBeConst, ); } @@ -848,9 +901,12 @@ class _TypeClassGenerator extends TypeVisitor<_TypeClass> { final args = allTypeParams.join(', '); final ifConst = isConst && canBeConst ? 'const ' : ''; + final type = node.isNullable + ? node.classDecl.nullableTypeClassName + : node.classDecl.typeClassName; final prefix = resolver.resolvePrefix(node.classDecl); return _TypeClass( - '$ifConst$prefix${node.classDecl.typeClassName}($args)', + '$ifConst$prefix$type($args)', canBeConst, ); } @@ -961,9 +1017,6 @@ class _ToNativeSuffix extends TypeVisitor { @override String visitNonPrimitiveType(ReferredType node) { - if (node.isNullable) { - return '?.pointer ?? $_nullptr'; - } return '.pointer'; } } @@ -1192,7 +1245,7 @@ ${modifier}final _$name = $_protectedExtension final localReferences = node.params .accept(const _ParamReference()) .where((ref) => ref.isNotEmpty) - .join(_newLine(depth: 2)); + .toList(); if (node.isConstructor) { final className = node.classDecl.finalName; final name = node.finalName; @@ -1211,7 +1264,7 @@ ${modifier}final _$name = $_protectedExtension s.write(''' factory $ctorName($paramsDef$typeClassDef) { $typeInference - $localReferences + ${localReferences.join(_newLine(depth: 2))} return ${node.classDecl.finalName}.fromReference( $typeClassCall $ctorExpr @@ -1244,6 +1297,7 @@ ${modifier}final _$name = $_protectedExtension .encloseIfNotEmpty('<', '>'); if (isSuspendFun(node)) { defArgs.removeLast(); + localReferences.removeLast(); } final params = defArgs.delimited(', '); s.write(' $ifStatic$returnType $name$typeParamsDef($params$typeClassDef)'); @@ -1253,15 +1307,18 @@ ${modifier}final _$name = $_protectedExtension node.asyncReturnType!.accept(_TypeClassGenerator(resolver)).name; s.write('''async { $typeInference - $localReferences final \$p = $_jni.ReceivePort(); - final \$c = $_jObject.fromReference($_protectedExtension.newPortContinuation(\$p)); + final _\$c = $_protectedExtension.newPortContinuation(\$p); + ${localReferences.join(_newLine(depth: 2))} $callExpr; + _\$c.release(); final \$o = $_jGlobalReference($_jPointer.fromAddress(await \$p.first)); - final \$k = $returnTypeClass.jClass.reference.pointer; - if (!$_jni.Jni.env.IsInstanceOf(\$o.pointer, \$k)) { + final \$k = $returnTypeClass.jClass.reference; + if (!$_jni.Jni.env.IsInstanceOf(\$o.pointer, \$k.pointer)) { + \$k.release(); throw 'Failed'; } + \$k.release(); return $returningType.fromReference(\$o); } @@ -1270,7 +1327,7 @@ ${modifier}final _$name = $_protectedExtension final returning = returnType == 'void' ? callExpr : 'return $callExpr'; s.writeln('''{ $typeInference - $localReferences + ${localReferences.join(_newLine(depth: 2))} $returning; } '''); @@ -1354,7 +1411,10 @@ class _ParamReference extends Visitor { if (node.type.kind == Kind.primitive) { return ''; } - return 'final _${node.finalName} = ${node.finalName}?.reference;'; + final nullable = node.isNullable ? '?' : ''; + final orDefault = node.isNullable ? ' ?? $_jni.jNullReference' : ''; + return 'final _${node.finalName} = ' + '${node.finalName}$nullable.reference$orDefault;'; } } @@ -1433,7 +1493,7 @@ class _ParamTypeLocator extends Visitor>> { @override Map> visit(Param node) { - if (node.type.type.isNullable) { + if (node.isNullable) { return {}; } return node.type.accept(_TypeVarLocator(resolver: resolver)).map( diff --git a/pkgs/jnigen/lib/src/bindings/kotlin_processor.dart b/pkgs/jnigen/lib/src/bindings/kotlin_processor.dart index 4980debf9..53de1ed2d 100644 --- a/pkgs/jnigen/lib/src/bindings/kotlin_processor.dart +++ b/pkgs/jnigen/lib/src/bindings/kotlin_processor.dart @@ -53,10 +53,16 @@ class _KotlinMethodProcessor extends Visitor { assert(node.params.isNotEmpty && node.params.last.type.kind == Kind.declared && node.params.last.type.name == kotlinContinutationType); - final continuationType = node.params.last.type.type as DeclaredType; - node.asyncReturnType = continuationType.params.isEmpty + var continuationType = + (node.params.last.type.type as DeclaredType).params.firstOrNull; + if (continuationType != null && + continuationType.kind == Kind.wildcard && + (continuationType.type as Wildcard).superBound != null) { + continuationType = (continuationType.type as Wildcard).superBound!; + } + node.asyncReturnType = continuationType == null ? TypeUsage.object - : continuationType.params.first.clone(); + : continuationType.clone(); } } } diff --git a/pkgs/jnigen/lib/src/bindings/linker.dart b/pkgs/jnigen/lib/src/bindings/linker.dart index 87bc7887b..888cb7aa3 100644 --- a/pkgs/jnigen/lib/src/bindings/linker.dart +++ b/pkgs/jnigen/lib/src/bindings/linker.dart @@ -150,18 +150,10 @@ class _MethodLinker extends Visitor { @override void visit(Method node) { - final usedDoclet = node.descriptor == null; - if (usedDoclet && - !node.classDecl.isStatic && + final hasOuterClassArg = !node.classDecl.isStatic && node.classDecl.isNested && - (node.isConstructor || node.isStatic)) { - // For now the nullity of [node.descriptor] identifies if the doclet - // backend was used and the method would potentially need "unnesting". - // Static methods and constructors of non-static nested classes take an - // instance of their outer class as the first parameter. - // - // This is not accounted for by the **doclet** summarizer, so we - // manually add it as the first parameter. + (node.isConstructor || node.isStatic); + if (hasOuterClassArg) { final outerClassTypeParamCount = node.classDecl.allTypeParams.length - node.classDecl.typeParams.length; final outerClassTypeParams = [ @@ -184,9 +176,21 @@ class _MethodLinker extends Visitor { typeJson: {}, )..type = outerClassType; final param = Param(name: '\$outerClass', type: outerClassTypeUsage); - // Make the list modifiable. - if (node.params.isEmpty) node.params = []; - node.params.insert(0, param); + final usedDoclet = node.descriptor == null; + // For now the nullity of [node.descriptor] identifies if the doclet + // backend was used and the method would potentially need "unnesting". + // Static methods and constructors of non-static nested classes take an + // instance of their outer class as the first parameter. + // + // This is not accounted for by the **doclet** summarizer, so we + // manually add it as the first parameter. + if (usedDoclet) { + // Make the list modifiable. + if (node.params.isEmpty) node.params = []; + node.params.insert(0, param); + } else { + node.params.first = param; + } } for (final typeParam in node.typeParams) { typeVarOrigin[typeParam.name] = typeParam; diff --git a/pkgs/jnigen/lib/src/bindings/printer.dart b/pkgs/jnigen/lib/src/bindings/printer.dart index e2d868c84..903eed428 100644 --- a/pkgs/jnigen/lib/src/bindings/printer.dart +++ b/pkgs/jnigen/lib/src/bindings/printer.dart @@ -19,13 +19,13 @@ class _ClassPrinter extends Visitor { void visit(ClassDecl node) { print(' '); for (final method in node.methods) { - method.accept(_MethodPrinter()); + method.accept(const _MethodPrinter()); } print(' '); print(' '); for (final field in node.fields) { - field.accept(_FieldPrinter()); + field.accept(const _FieldPrinter()); } print(' '); } @@ -39,6 +39,11 @@ class _MethodPrinter extends Visitor { print(' '); node.returnType.accept(_TypePrinter(8)); print(' '); + print(' '); + for (final param in node.params) { + param.accept(const _ParamPrinter()); + } + print(' '); print(' '); } } @@ -53,6 +58,17 @@ class _FieldPrinter extends Visitor { } } +class _ParamPrinter extends Visitor { + const _ParamPrinter(); + + @override + void visit(Param node) { + print(' <${node.finalName}>'); + node.type.type.accept(_TypePrinter(10)); + print(' '); + } +} + class _TypePrinter extends TypeVisitor { int depth; _TypePrinter(this.depth); diff --git a/pkgs/jnigen/lib/src/bindings/renamer.dart b/pkgs/jnigen/lib/src/bindings/renamer.dart index b5a0b34c2..b15d5518d 100644 --- a/pkgs/jnigen/lib/src/bindings/renamer.dart +++ b/pkgs/jnigen/lib/src/bindings/renamer.dart @@ -189,6 +189,7 @@ class _ClassRenamer implements Visitor { ? _renameConflict(classNameCounts, className, _ElementKind.klass) : className; node.typeClassName = '\$${node.finalName}\$Type'; + node.nullableTypeClassName = '\$${node.finalName}\$NullableType'; log.fine('Class ${node.binaryName} is named ${node.finalName}'); final superClass = (node.superclass!.type as DeclaredType).classDecl; diff --git a/pkgs/jnigen/lib/src/config/config_types.dart b/pkgs/jnigen/lib/src/config/config_types.dart index cfe514b00..d16280881 100644 --- a/pkgs/jnigen/lib/src/config/config_types.dart +++ b/pkgs/jnigen/lib/src/config/config_types.dart @@ -401,6 +401,7 @@ class Config { ..path = '$importPath/$filePath' ..finalName = decl['name'] as String ..typeClassName = decl['type_class'] as String + ..nullableTypeClassName = decl['nullable_type_class'] as String ..superCount = decl['super_count'] as int ..allTypeParams = [] // TODO(https://github.com/dart-lang/native/issues/746): include diff --git a/pkgs/jnigen/lib/src/elements/elements.dart b/pkgs/jnigen/lib/src/elements/elements.dart index 0a01e2083..f13e8a7f8 100644 --- a/pkgs/jnigen/lib/src/elements/elements.dart +++ b/pkgs/jnigen/lib/src/elements/elements.dart @@ -132,6 +132,12 @@ class ClassDecl with ClassMember, Annotated implements Element { @JsonKey(includeFromJson: false) late final String typeClassName; + /// Name of the nullable type class. + /// + /// Populated by [Renamer]. + @JsonKey(includeFromJson: false) + late final String nullableTypeClassName; + /// Type parameters including the ones from its outer classes. /// /// For `Foo.Bar.Baz` it is [T, U, V, W]. @@ -436,6 +442,19 @@ class TypeVar extends ReferredType { @override List? annotations; + @override + bool get isNullable { + // A type-var is nullable if it is explicitly set as nullable. + if (origin.isNullable) { + return true; + } + // If origin is non-null, it has to be explicitly set as nullable. + if (!origin.isNullable && !hasNullable) { + return false; + } + return super.isNullable; + } + factory TypeVar.fromJson(Map json) => _$TypeVarFromJson(json); @@ -492,42 +511,47 @@ class ArrayType extends ReferredType { mixin Annotated { abstract List? annotations; + late final bool hasNullable = () { + return annotations?.any((annotation) => [ + // Taken from https://kotlinlang.org/docs/java-interop.html#nullability-annotations + 'org.jetbrains.annotations.Nullable', + 'org.jspecify.nullness.Nullable', + 'com.android.annotations.Nullable', + 'androidx.annotation.Nullable', + 'android.support.annotations.Nullable', + 'edu.umd.cs.findbugs.annotations.Nullable', + 'org.eclipse.jdt.annotation.Nullable', + 'lombok.Nullable', + 'com.github.dart_lang.jnigen.annotations.Nullable', //FIXME: remove + 'io.reactivex.rxjava3.annotations.Nullable', + ].contains(annotation.binaryName)) ?? + false; + }(); + + late final hasNonNull = () { + return annotations?.any((annotation) => + [ + // Taken from https://kotlinlang.org/docs/java-interop.html#nullability-annotations + 'org.jetbrains.annotations.NotNull', + 'org.jspecify.nullness.NonNull', + 'com.android.annotations.NonNull', + 'androidx.annotation.NonNull', + 'android.support.annotations.NonNull', + 'edu.umd.cs.findbugs.annotations.NonNull', + 'org.eclipse.jdt.annotation.NonNull', + 'lombok.NonNull', + 'com.github.dart_lang.jnigen.annotations.NotNull', //FIXME: remove + 'io.reactivex.rxjava3.annotations.NonNull', + ].contains(annotation.binaryName) || + annotation.binaryName == 'javax.annotation.Nonnull' && + annotation.properties['when'] == 'ALWAYS') ?? + false; //FIXME + }(); + late final bool isNullable = () { - if (annotations == null) { - return false; - } - final hasNullable = annotations!.any((annotation) => [ - // Taken from https://kotlinlang.org/docs/java-interop.html#nullability-annotations - 'org.jetbrains.annotations.Nullable', - 'org.jspecify.nullness.Nullable', - 'com.android.annotations.Nullable', - 'androidx.annotation.Nullable', - 'android.support.annotations.Nullable', - 'edu.umd.cs.findbugs.annotations.Nullable', - 'org.eclipse.jdt.annotation.Nullable', - 'lombok.Nullable', - 'com.github.dart_lang.jnigen.annotations.Nullable', //FIXME: remove - 'io.reactivex.rxjava3.annotations.Nullable', - ].contains(annotation.binaryName)); if (hasNullable) { return true; } - final hasNonNull = annotations!.any((annotation) => - [ - // Taken from https://kotlinlang.org/docs/java-interop.html#nullability-annotations - 'org.jetbrains.annotations.NotNull', - 'org.jspecify.nullness.NonNull', - 'com.android.annotations.NonNull', - 'androidx.annotation.NonNull', - 'android.support.annotations.NonNull', - 'edu.umd.cs.findbugs.annotations.NonNull', - 'org.eclipse.jdt.annotation.NonNull', - 'lombok.NonNull', - 'com.github.dart_lang.jnigen.annotations.NotNull', //FIXME: remove - 'io.reactivex.rxjava3.annotations.NonNull', - ].contains(annotation.binaryName) || - annotation.binaryName == 'javax.annotation.Nonnull' && - annotation.properties['when'] == 'ALWAYS'); //FIXME return !hasNonNull; }(); } @@ -624,6 +648,9 @@ class Param with Annotated implements Element { List? annotations; final JavaDocComment? javadoc; + @override + bool get isNullable => type.type.isNullable || super.hasNullable; + // Synthetic methods might not have parameter names. @JsonKey(defaultValue: 'synthetic') final String name; @@ -702,6 +729,13 @@ class TypeParam with Annotated implements Element { @override List? annotations; + @override + bool get isNullable { + // A type param with any non-null bound is non-null. + final hasNonNullBounds = bounds.any((bound) => !bound.type.isNullable); + return super.isNullable && !hasNonNullBounds; + } + /// Can either be a [ClassDecl] or a [Method]. /// /// Populated by [Linker]. @@ -810,6 +844,11 @@ final class ToTypeParam extends TypePathStep { @JsonSerializable(createToJson: false) class Annotation implements Element { + /// Specifies that this type can be null. + static const Annotation nullable = + // Any other valid `Nullable` annotation would work. + Annotation(binaryName: 'androidx.annotation.Nullable'); + /// Specifies that this type cannot be null. static const Annotation nonNull = // Any other valid `NonNull` annotation would work. diff --git a/pkgs/jnigen/lib/src/generate_bindings.dart b/pkgs/jnigen/lib/src/generate_bindings.dart index 99ce04ad9..796516ea0 100644 --- a/pkgs/jnigen/lib/src/generate_bindings.dart +++ b/pkgs/jnigen/lib/src/generate_bindings.dart @@ -40,7 +40,7 @@ Future generateJniBindings(Config config) async { await classes.accept(Linker(config)); classes.accept(const Descriptor()); classes.accept(Renamer(config)); - // classes.accept(Printer()); + // classes.accept(const Printer()); try { await classes.accept(DartGenerator(config)); diff --git a/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart b/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart index 3920a2da5..df2aad4f5 100644 --- a/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart +++ b/pkgs/jnigen/test/jackson_core_test/runtime_test_registrant.dart @@ -17,11 +17,11 @@ void registerTests(String groupName, TestRunnerCallback test) { final json = JString.fromString('[1, true, false, 2, 4]'); JsonFactory factory; factory = JsonFactory(); - final parser = factory.createParser$6(json); + final parser = factory.createParser$6(json)!; final values = []; while (!parser.isClosed()) { final next = parser.nextToken(); - if (next.isNull) continue; + if (next == null) continue; values.add(next.isNumeric()); next.release(); } @@ -34,7 +34,7 @@ void registerTests(String groupName, TestRunnerCallback test) { using((arena) { final factory = JsonFactory()..releasedBy(arena); final erroneous = factory - .createParser$6(''.toJString()..releasedBy(arena)) + .createParser$6(''.toJString()..releasedBy(arena))! ..releasedBy(arena); expect(erroneous.nextToken, throwsA(isA())); }); diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonFactory.dart b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonFactory.dart index 560a32074..fb411a8b7 100644 --- a/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonFactory.dart +++ b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonFactory.dart @@ -72,6 +72,7 @@ class JsonFactory_Feature extends _$jni.JObject { _$jni.JClass.forName(r'com/fasterxml/jackson/core/JsonFactory$Feature'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonFactory_Feature$NullableType(); static const type = $JsonFactory_Feature$Type(); static final _id_values = _class.staticMethodId( r'values', @@ -92,9 +93,10 @@ class JsonFactory_Feature extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonFactory.Feature[] values()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray values() { + static _$jni.JArray? values() { return _values(_class.reference.pointer, _id_values as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType($JsonFactory_Feature$Type())); + .object(const _$jni.JArrayNullableType( + $JsonFactory_Feature$NullableType())); } static final _id_valueOf = _class.staticMethodId( @@ -115,12 +117,13 @@ class JsonFactory_Feature extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonFactory.Feature valueOf(java.lang.String name)` /// The returned object must be released after use, by calling the [release] method. - static JsonFactory_Feature valueOf( - _$jni.JString name, + static JsonFactory_Feature? valueOf( + _$jni.JString? name, ) { + final _name = name?.reference ?? _$jni.jNullReference; return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, - name.reference.pointer) - .object(const $JsonFactory_Feature$Type()); + _name.pointer) + .object(const $JsonFactory_Feature$NullableType()); } static final _id_collectDefaults = _class.staticMethodId( @@ -224,6 +227,45 @@ class JsonFactory_Feature extends _$jni.JObject { } } +final class $JsonFactory_Feature$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $JsonFactory_Feature$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/fasterxml/jackson/core/JsonFactory$Feature;'; + + @_$jni.internal + @_$core.override + JsonFactory_Feature? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : JsonFactory_Feature.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonFactory_Feature$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonFactory_Feature$NullableType) && + other is $JsonFactory_Feature$NullableType; + } +} + final class $JsonFactory_Feature$Type extends _$jni.JObjType { @_$jni.internal @@ -236,11 +278,17 @@ final class $JsonFactory_Feature$Type @_$jni.internal @_$core.override JsonFactory_Feature fromReference(_$jni.JReference reference) => - JsonFactory_Feature.fromReference(reference); + JsonFactory_Feature.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonFactory_Feature$NullableType(); @_$jni.internal @_$core.override @@ -290,6 +338,7 @@ class JsonFactory extends _$jni.JObject { _$jni.JClass.forName(r'com/fasterxml/jackson/core/JsonFactory'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonFactory$NullableType(); static const type = $JsonFactory$Type(); static final _id_FORMAT_NAME_JSON = _class.staticFieldId( r'FORMAT_NAME_JSON', @@ -301,8 +350,8 @@ class JsonFactory extends _$jni.JObject { /// /// Name used to identify JSON format /// (and returned by \#getFormatName() - static _$jni.JString get FORMAT_NAME_JSON => - _id_FORMAT_NAME_JSON.get(_class, const _$jni.JStringType()); + static _$jni.JString? get FORMAT_NAME_JSON => + _id_FORMAT_NAME_JSON.get(_class, const _$jni.JStringNullableType()); static final _id_DEFAULT_ROOT_VALUE_SEPARATOR = _class.staticFieldId( r'DEFAULT_ROOT_VALUE_SEPARATOR', @@ -311,8 +360,9 @@ class JsonFactory extends _$jni.JObject { /// from: `static public final com.fasterxml.jackson.core.SerializableString DEFAULT_ROOT_VALUE_SEPARATOR` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JObject get DEFAULT_ROOT_VALUE_SEPARATOR => - _id_DEFAULT_ROOT_VALUE_SEPARATOR.get(_class, const _$jni.JObjectType()); + static _$jni.JObject? get DEFAULT_ROOT_VALUE_SEPARATOR => + _id_DEFAULT_ROOT_VALUE_SEPARATOR.get( + _class, const _$jni.JObjectNullableType()); /// from: `static public final char DEFAULT_QUOTE_CHAR` /// @@ -369,10 +419,11 @@ class JsonFactory extends _$jni.JObject { /// from: `public void (com.fasterxml.jackson.core.ObjectCodec oc)` /// The returned object must be released after use, by calling the [release] method. factory JsonFactory.new$1( - _$jni.JObject oc, + _$jni.JObject? oc, ) { + final _oc = oc?.reference ?? _$jni.jNullReference; return JsonFactory.fromReference(_new$1(_class.reference.pointer, - _id_new$1 as _$jni.JMethodIDPtr, oc.reference.pointer) + _id_new$1 as _$jni.JMethodIDPtr, _oc.pointer) .reference); } @@ -398,10 +449,11 @@ class JsonFactory extends _$jni.JObject { ///@param b Builder that contains settings to use ///@since 2.10 factory JsonFactory.new$2( - _$jni.JObject b, + _$jni.JObject? b, ) { + final _b = b?.reference ?? _$jni.jNullReference; return JsonFactory.fromReference(_new$2(_class.reference.pointer, - _id_new$2 as _$jni.JMethodIDPtr, b.reference.pointer) + _id_new$2 as _$jni.JMethodIDPtr, _b.pointer) .reference); } @@ -429,9 +481,9 @@ class JsonFactory extends _$jni.JObject { /// with settings of this factory. ///@return Builder instance to use ///@since 2.10 - _$jni.JObject rebuild() { + _$jni.JObject? rebuild() { return _rebuild(reference.pointer, _id_rebuild as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_builder = _class.staticMethodId( @@ -462,9 +514,9 @@ class JsonFactory extends _$jni.JObject { /// NOTE: signature unfortunately does not expose true implementation type; this /// will be fixed in 3.0. ///@return Builder instance to use - static _$jni.JObject builder() { + static _$jni.JObject? builder() { return _builder(_class.reference.pointer, _id_builder as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_copy = _class.instanceMethodId( @@ -499,9 +551,9 @@ class JsonFactory extends _$jni.JObject { /// set codec after making the copy. ///@return Copy of this factory instance ///@since 2.1 - JsonFactory copy() { + JsonFactory? copy() { return _copy(reference.pointer, _id_copy as _$jni.JMethodIDPtr) - .object(const $JsonFactory$Type()); + .object(const $JsonFactory$NullableType()); } static final _id_requiresPropertyOrdering = _class.instanceMethodId( @@ -666,10 +718,10 @@ class JsonFactory extends _$jni.JObject { /// from: `public java.lang.Class getFormatReadFeatureType()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject getFormatReadFeatureType() { + _$jni.JObject? getFormatReadFeatureType() { return _getFormatReadFeatureType(reference.pointer, _id_getFormatReadFeatureType as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getFormatWriteFeatureType = _class.instanceMethodId( @@ -691,10 +743,10 @@ class JsonFactory extends _$jni.JObject { /// from: `public java.lang.Class getFormatWriteFeatureType()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject getFormatWriteFeatureType() { + _$jni.JObject? getFormatWriteFeatureType() { return _getFormatWriteFeatureType(reference.pointer, _id_getFormatWriteFeatureType as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_canUseSchema = _class.instanceMethodId( @@ -725,10 +777,11 @@ class JsonFactory extends _$jni.JObject { ///@return Whether parsers and generators constructed by this factory /// can use specified format schema instance bool canUseSchema( - _$jni.JObject schema, + _$jni.JObject? schema, ) { + final _schema = schema?.reference ?? _$jni.jNullReference; return _canUseSchema(reference.pointer, - _id_canUseSchema as _$jni.JMethodIDPtr, schema.reference.pointer) + _id_canUseSchema as _$jni.JMethodIDPtr, _schema.pointer) .boolean; } @@ -758,10 +811,10 @@ class JsonFactory extends _$jni.JObject { /// Note: sub-classes should override this method; default /// implementation will return null for all sub-classes ///@return Name of the format handled by parsers, generators this factory creates - _$jni.JString getFormatName() { + _$jni.JString? getFormatName() { return _getFormatName( reference.pointer, _id_getFormatName as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_hasFormat = _class.instanceMethodId( @@ -782,12 +835,13 @@ class JsonFactory extends _$jni.JObject { /// from: `public com.fasterxml.jackson.core.format.MatchStrength hasFormat(com.fasterxml.jackson.core.format.InputAccessor acc)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject hasFormat( - _$jni.JObject acc, + _$jni.JObject? hasFormat( + _$jni.JObject? acc, ) { + final _acc = acc?.reference ?? _$jni.jNullReference; return _hasFormat(reference.pointer, _id_hasFormat as _$jni.JMethodIDPtr, - acc.reference.pointer) - .object(const _$jni.JObjectType()); + _acc.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_requiresCustomCodec = _class.instanceMethodId( @@ -843,9 +897,9 @@ class JsonFactory extends _$jni.JObject { /// from: `public com.fasterxml.jackson.core.Version version()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject version() { + _$jni.JObject? version() { return _version(reference.pointer, _id_version as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_configure = _class.instanceMethodId( @@ -874,13 +928,14 @@ class JsonFactory extends _$jni.JObject { ///@param state Whether to enable or disable the feature ///@return This factory instance (to allow call chaining) ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead - JsonFactory configure( - JsonFactory_Feature f, + JsonFactory? configure( + JsonFactory_Feature? f, bool state, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _configure(reference.pointer, _id_configure as _$jni.JMethodIDPtr, - f.reference.pointer, state ? 1 : 0) - .object(const $JsonFactory$Type()); + _f.pointer, state ? 1 : 0) + .object(const $JsonFactory$NullableType()); } static final _id_enable = _class.instanceMethodId( @@ -907,12 +962,13 @@ class JsonFactory extends _$jni.JObject { ///@param f Feature to enable ///@return This factory instance (to allow call chaining) ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead - JsonFactory enable( - JsonFactory_Feature f, + JsonFactory? enable( + JsonFactory_Feature? f, ) { - return _enable(reference.pointer, _id_enable as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _enable( + reference.pointer, _id_enable as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_disable = _class.instanceMethodId( @@ -939,12 +995,13 @@ class JsonFactory extends _$jni.JObject { ///@param f Feature to disable ///@return This factory instance (to allow call chaining) ///@deprecated since 2.10 use JsonFactoryBuilder\#configure(JsonFactory.Feature, boolean) instead - JsonFactory disable( - JsonFactory_Feature f, + JsonFactory? disable( + JsonFactory_Feature? f, ) { - return _disable(reference.pointer, _id_disable as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _disable( + reference.pointer, _id_disable as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_isEnabled = _class.instanceMethodId( @@ -969,10 +1026,11 @@ class JsonFactory extends _$jni.JObject { ///@param f Feature to check ///@return True if the specified feature is enabled bool isEnabled( - JsonFactory_Feature f, + JsonFactory_Feature? f, ) { - return _isEnabled(reference.pointer, _id_isEnabled as _$jni.JMethodIDPtr, - f.reference.pointer) + final _f = f?.reference ?? _$jni.jNullReference; + return _isEnabled( + reference.pointer, _id_isEnabled as _$jni.JMethodIDPtr, _f.pointer) .boolean; } @@ -1098,16 +1156,14 @@ class JsonFactory extends _$jni.JObject { ///@param f Feature to enable/disable ///@param state Whether to enable or disable the feature ///@return This factory instance (to allow call chaining) - JsonFactory configure$1( - jsonparser_.JsonParser_Feature f, + JsonFactory? configure$1( + jsonparser_.JsonParser_Feature? f, bool state, ) { - return _configure$1( - reference.pointer, - _id_configure$1 as _$jni.JMethodIDPtr, - f.reference.pointer, - state ? 1 : 0) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _configure$1(reference.pointer, + _id_configure$1 as _$jni.JMethodIDPtr, _f.pointer, state ? 1 : 0) + .object(const $JsonFactory$NullableType()); } static final _id_enable$1 = _class.instanceMethodId( @@ -1133,12 +1189,13 @@ class JsonFactory extends _$jni.JObject { /// (check JsonParser.Feature for list of features) ///@param f Feature to enable ///@return This factory instance (to allow call chaining) - JsonFactory enable$1( - jsonparser_.JsonParser_Feature f, + JsonFactory? enable$1( + jsonparser_.JsonParser_Feature? f, ) { - return _enable$1(reference.pointer, _id_enable$1 as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _enable$1( + reference.pointer, _id_enable$1 as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_disable$1 = _class.instanceMethodId( @@ -1164,12 +1221,13 @@ class JsonFactory extends _$jni.JObject { /// (check JsonParser.Feature for list of features) ///@param f Feature to disable ///@return This factory instance (to allow call chaining) - JsonFactory disable$1( - jsonparser_.JsonParser_Feature f, + JsonFactory? disable$1( + jsonparser_.JsonParser_Feature? f, ) { - return _disable$1(reference.pointer, _id_disable$1 as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _disable$1( + reference.pointer, _id_disable$1 as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_isEnabled$1 = _class.instanceMethodId( @@ -1194,10 +1252,11 @@ class JsonFactory extends _$jni.JObject { ///@param f Feature to check ///@return True if specified feature is enabled bool isEnabled$1( - jsonparser_.JsonParser_Feature f, + jsonparser_.JsonParser_Feature? f, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _isEnabled$1(reference.pointer, - _id_isEnabled$1 as _$jni.JMethodIDPtr, f.reference.pointer) + _id_isEnabled$1 as _$jni.JMethodIDPtr, _f.pointer) .boolean; } @@ -1224,10 +1283,11 @@ class JsonFactory extends _$jni.JObject { ///@return True if specified feature is enabled ///@since 2.10 bool isEnabled$2( - _$jni.JObject f, + _$jni.JObject? f, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _isEnabled$2(reference.pointer, - _id_isEnabled$2 as _$jni.JMethodIDPtr, f.reference.pointer) + _id_isEnabled$2 as _$jni.JMethodIDPtr, _f.pointer) .boolean; } @@ -1254,10 +1314,10 @@ class JsonFactory extends _$jni.JObject { /// Method for getting currently configured input decorator (if any; /// there is no default decorator). ///@return InputDecorator configured, if any - _$jni.JObject getInputDecorator() { + _$jni.JObject? getInputDecorator() { return _getInputDecorator( reference.pointer, _id_getInputDecorator as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setInputDecorator = _class.instanceMethodId( @@ -1283,12 +1343,13 @@ class JsonFactory extends _$jni.JObject { ///@param d Decorator to configure for this factory, if any ({@code null} if none) ///@return This factory instance (to allow call chaining) ///@deprecated Since 2.10 use JsonFactoryBuilder\#inputDecorator(InputDecorator) instead - JsonFactory setInputDecorator( - _$jni.JObject d, + JsonFactory? setInputDecorator( + _$jni.JObject? d, ) { + final _d = d?.reference ?? _$jni.jNullReference; return _setInputDecorator(reference.pointer, - _id_setInputDecorator as _$jni.JMethodIDPtr, d.reference.pointer) - .object(const $JsonFactory$Type()); + _id_setInputDecorator as _$jni.JMethodIDPtr, _d.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_configure$2 = _class.instanceMethodId( @@ -1316,16 +1377,14 @@ class JsonFactory extends _$jni.JObject { ///@param f Feature to enable/disable ///@param state Whether to enable or disable the feature ///@return This factory instance (to allow call chaining) - JsonFactory configure$2( - _$jni.JObject f, + JsonFactory? configure$2( + _$jni.JObject? f, bool state, ) { - return _configure$2( - reference.pointer, - _id_configure$2 as _$jni.JMethodIDPtr, - f.reference.pointer, - state ? 1 : 0) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _configure$2(reference.pointer, + _id_configure$2 as _$jni.JMethodIDPtr, _f.pointer, state ? 1 : 0) + .object(const $JsonFactory$NullableType()); } static final _id_enable$2 = _class.instanceMethodId( @@ -1351,12 +1410,13 @@ class JsonFactory extends _$jni.JObject { /// (check JsonGenerator.Feature for list of features) ///@param f Feature to enable ///@return This factory instance (to allow call chaining) - JsonFactory enable$2( - _$jni.JObject f, + JsonFactory? enable$2( + _$jni.JObject? f, ) { - return _enable$2(reference.pointer, _id_enable$2 as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _enable$2( + reference.pointer, _id_enable$2 as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_disable$2 = _class.instanceMethodId( @@ -1382,12 +1442,13 @@ class JsonFactory extends _$jni.JObject { /// (check JsonGenerator.Feature for list of features) ///@param f Feature to disable ///@return This factory instance (to allow call chaining) - JsonFactory disable$2( - _$jni.JObject f, + JsonFactory? disable$2( + _$jni.JObject? f, ) { - return _disable$2(reference.pointer, _id_disable$2 as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonFactory$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _disable$2( + reference.pointer, _id_disable$2 as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_isEnabled$3 = _class.instanceMethodId( @@ -1412,10 +1473,11 @@ class JsonFactory extends _$jni.JObject { ///@param f Feature to check ///@return Whether specified feature is enabled bool isEnabled$3( - _$jni.JObject f, + _$jni.JObject? f, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _isEnabled$3(reference.pointer, - _id_isEnabled$3 as _$jni.JMethodIDPtr, f.reference.pointer) + _id_isEnabled$3 as _$jni.JMethodIDPtr, _f.pointer) .boolean; } @@ -1442,10 +1504,11 @@ class JsonFactory extends _$jni.JObject { ///@return Whether specified feature is enabled ///@since 2.10 bool isEnabled$4( - _$jni.JObject f, + _$jni.JObject? f, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _isEnabled$4(reference.pointer, - _id_isEnabled$4 as _$jni.JMethodIDPtr, f.reference.pointer) + _id_isEnabled$4 as _$jni.JMethodIDPtr, _f.pointer) .boolean; } @@ -1472,10 +1535,10 @@ class JsonFactory extends _$jni.JObject { /// Method for accessing custom escapes factory uses for JsonGenerators /// it creates. ///@return Configured {@code CharacterEscapes}, if any; {@code null} if none - _$jni.JObject getCharacterEscapes() { + _$jni.JObject? getCharacterEscapes() { return _getCharacterEscapes( reference.pointer, _id_getCharacterEscapes as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setCharacterEscapes = _class.instanceMethodId( @@ -1501,14 +1564,13 @@ class JsonFactory extends _$jni.JObject { /// it creates. ///@param esc CharaterEscapes to set (or {@code null} for "none") ///@return This factory instance (to allow call chaining) - JsonFactory setCharacterEscapes( - _$jni.JObject esc, + JsonFactory? setCharacterEscapes( + _$jni.JObject? esc, ) { - return _setCharacterEscapes( - reference.pointer, - _id_setCharacterEscapes as _$jni.JMethodIDPtr, - esc.reference.pointer) - .object(const $JsonFactory$Type()); + final _esc = esc?.reference ?? _$jni.jNullReference; + return _setCharacterEscapes(reference.pointer, + _id_setCharacterEscapes as _$jni.JMethodIDPtr, _esc.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_getOutputDecorator = _class.instanceMethodId( @@ -1535,10 +1597,10 @@ class JsonFactory extends _$jni.JObject { /// there is no default decorator). ///@return OutputDecorator configured for generators factory creates, if any; /// {@code null} if none. - _$jni.JObject getOutputDecorator() { + _$jni.JObject? getOutputDecorator() { return _getOutputDecorator( reference.pointer, _id_getOutputDecorator as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setOutputDecorator = _class.instanceMethodId( @@ -1564,12 +1626,13 @@ class JsonFactory extends _$jni.JObject { ///@return This factory instance (to allow call chaining) ///@param d Output decorator to use, if any ///@deprecated Since 2.10 use JsonFactoryBuilder\#outputDecorator(OutputDecorator) instead - JsonFactory setOutputDecorator( - _$jni.JObject d, + JsonFactory? setOutputDecorator( + _$jni.JObject? d, ) { + final _d = d?.reference ?? _$jni.jNullReference; return _setOutputDecorator(reference.pointer, - _id_setOutputDecorator as _$jni.JMethodIDPtr, d.reference.pointer) - .object(const $JsonFactory$Type()); + _id_setOutputDecorator as _$jni.JMethodIDPtr, _d.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_setRootValueSeparator = _class.instanceMethodId( @@ -1596,14 +1659,13 @@ class JsonFactory extends _$jni.JObject { ///@param sep Separator to use, if any; null means that no separator is /// automatically added ///@return This factory instance (to allow call chaining) - JsonFactory setRootValueSeparator( - _$jni.JString sep, + JsonFactory? setRootValueSeparator( + _$jni.JString? sep, ) { - return _setRootValueSeparator( - reference.pointer, - _id_setRootValueSeparator as _$jni.JMethodIDPtr, - sep.reference.pointer) - .object(const $JsonFactory$Type()); + final _sep = sep?.reference ?? _$jni.jNullReference; + return _setRootValueSeparator(reference.pointer, + _id_setRootValueSeparator as _$jni.JMethodIDPtr, _sep.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_getRootValueSeparator = _class.instanceMethodId( @@ -1627,10 +1689,10 @@ class JsonFactory extends _$jni.JObject { /// The returned object must be released after use, by calling the [release] method. /// /// @return Root value separator configured, if any - _$jni.JString getRootValueSeparator() { + _$jni.JString? getRootValueSeparator() { return _getRootValueSeparator( reference.pointer, _id_getRootValueSeparator as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_setCodec = _class.instanceMethodId( @@ -1659,12 +1721,13 @@ class JsonFactory extends _$jni.JObject { /// of JsonParser and JsonGenerator instances. ///@param oc Codec to use ///@return This factory instance (to allow call chaining) - JsonFactory setCodec( - _$jni.JObject oc, + JsonFactory? setCodec( + _$jni.JObject? oc, ) { - return _setCodec(reference.pointer, _id_setCodec as _$jni.JMethodIDPtr, - oc.reference.pointer) - .object(const $JsonFactory$Type()); + final _oc = oc?.reference ?? _$jni.jNullReference; + return _setCodec( + reference.pointer, _id_setCodec as _$jni.JMethodIDPtr, _oc.pointer) + .object(const $JsonFactory$NullableType()); } static final _id_getCodec = _class.instanceMethodId( @@ -1686,9 +1749,9 @@ class JsonFactory extends _$jni.JObject { /// from: `public com.fasterxml.jackson.core.ObjectCodec getCodec()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject getCodec() { + _$jni.JObject? getCodec() { return _getCodec(reference.pointer, _id_getCodec as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_createParser = _class.instanceMethodId( @@ -1726,12 +1789,13 @@ class JsonFactory extends _$jni.JObject { /// the parser, since caller has no access to it. ///@param f File that contains JSON content to parse ///@since 2.1 - jsonparser_.JsonParser createParser( - _$jni.JObject f, + jsonparser_.JsonParser? createParser( + _$jni.JObject? f, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _createParser(reference.pointer, - _id_createParser as _$jni.JMethodIDPtr, f.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser as _$jni.JMethodIDPtr, _f.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$1 = _class.instanceMethodId( @@ -1767,12 +1831,13 @@ class JsonFactory extends _$jni.JObject { /// the parser, since caller has no access to it. ///@param url URL pointing to resource that contains JSON content to parse ///@since 2.1 - jsonparser_.JsonParser createParser$1( - _$jni.JObject url, + jsonparser_.JsonParser? createParser$1( + _$jni.JObject? url, ) { + final _url = url?.reference ?? _$jni.jNullReference; return _createParser$1(reference.pointer, - _id_createParser$1 as _$jni.JMethodIDPtr, url.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser$1 as _$jni.JMethodIDPtr, _url.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$2 = _class.instanceMethodId( @@ -1811,12 +1876,13 @@ class JsonFactory extends _$jni.JObject { /// For other charsets use \#createParser(java.io.Reader). ///@param in InputStream to use for reading JSON content to parse ///@since 2.1 - jsonparser_.JsonParser createParser$2( - _$jni.JObject in$, + jsonparser_.JsonParser? createParser$2( + _$jni.JObject? in$, ) { + final _in$ = in$?.reference ?? _$jni.jNullReference; return _createParser$2(reference.pointer, - _id_createParser$2 as _$jni.JMethodIDPtr, in$.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser$2 as _$jni.JMethodIDPtr, _in$.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$3 = _class.instanceMethodId( @@ -1848,12 +1914,13 @@ class JsonFactory extends _$jni.JObject { /// is enabled. ///@param r Reader to use for reading JSON content to parse ///@since 2.1 - jsonparser_.JsonParser createParser$3( - _$jni.JObject r, + jsonparser_.JsonParser? createParser$3( + _$jni.JObject? r, ) { + final _r = r?.reference ?? _$jni.jNullReference; return _createParser$3(reference.pointer, - _id_createParser$3 as _$jni.JMethodIDPtr, r.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser$3 as _$jni.JMethodIDPtr, _r.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$4 = _class.instanceMethodId( @@ -1878,12 +1945,13 @@ class JsonFactory extends _$jni.JObject { /// Method for constructing parser for parsing /// the contents of given byte array. ///@since 2.1 - jsonparser_.JsonParser createParser$4( - _$jni.JArray<_$jni.jbyte> data, + jsonparser_.JsonParser? createParser$4( + _$jni.JArray<_$jni.jbyte>? data, ) { + final _data = data?.reference ?? _$jni.jNullReference; return _createParser$4(reference.pointer, - _id_createParser$4 as _$jni.JMethodIDPtr, data.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser$4 as _$jni.JMethodIDPtr, _data.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$5 = _class.instanceMethodId( @@ -1915,18 +1983,19 @@ class JsonFactory extends _$jni.JObject { ///@param offset Offset of the first data byte within buffer ///@param len Length of contents to parse within buffer ///@since 2.1 - jsonparser_.JsonParser createParser$5( - _$jni.JArray<_$jni.jbyte> data, + jsonparser_.JsonParser? createParser$5( + _$jni.JArray<_$jni.jbyte>? data, int offset, int len, ) { + final _data = data?.reference ?? _$jni.jNullReference; return _createParser$5( reference.pointer, _id_createParser$5 as _$jni.JMethodIDPtr, - data.reference.pointer, + _data.pointer, offset, len) - .object(const jsonparser_.$JsonParser$Type()); + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$6 = _class.instanceMethodId( @@ -1951,12 +2020,13 @@ class JsonFactory extends _$jni.JObject { /// Method for constructing parser for parsing /// contents of given String. ///@since 2.1 - jsonparser_.JsonParser createParser$6( - _$jni.JString content, + jsonparser_.JsonParser? createParser$6( + _$jni.JString? content, ) { + final _content = content?.reference ?? _$jni.jNullReference; return _createParser$6(reference.pointer, - _id_createParser$6 as _$jni.JMethodIDPtr, content.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser$6 as _$jni.JMethodIDPtr, _content.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$7 = _class.instanceMethodId( @@ -1981,12 +2051,13 @@ class JsonFactory extends _$jni.JObject { /// Method for constructing parser for parsing /// contents of given char array. ///@since 2.4 - jsonparser_.JsonParser createParser$7( - _$jni.JArray<_$jni.jchar> content, + jsonparser_.JsonParser? createParser$7( + _$jni.JArray<_$jni.jchar>? content, ) { + final _content = content?.reference ?? _$jni.jNullReference; return _createParser$7(reference.pointer, - _id_createParser$7 as _$jni.JMethodIDPtr, content.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser$7 as _$jni.JMethodIDPtr, _content.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$8 = _class.instanceMethodId( @@ -2014,18 +2085,19 @@ class JsonFactory extends _$jni.JObject { /// /// Method for constructing parser for parsing contents of given char array. ///@since 2.4 - jsonparser_.JsonParser createParser$8( - _$jni.JArray<_$jni.jchar> content, + jsonparser_.JsonParser? createParser$8( + _$jni.JArray<_$jni.jchar>? content, int offset, int len, ) { + final _content = content?.reference ?? _$jni.jNullReference; return _createParser$8( reference.pointer, _id_createParser$8 as _$jni.JMethodIDPtr, - content.reference.pointer, + _content.pointer, offset, len) - .object(const jsonparser_.$JsonParser$Type()); + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createParser$9 = _class.instanceMethodId( @@ -2053,12 +2125,13 @@ class JsonFactory extends _$jni.JObject { /// If this factory does not support DataInput as source, /// will throw UnsupportedOperationException ///@since 2.8 - jsonparser_.JsonParser createParser$9( - _$jni.JObject in$, + jsonparser_.JsonParser? createParser$9( + _$jni.JObject? in$, ) { + final _in$ = in$?.reference ?? _$jni.jNullReference; return _createParser$9(reference.pointer, - _id_createParser$9 as _$jni.JMethodIDPtr, in$.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createParser$9 as _$jni.JMethodIDPtr, _in$.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createNonBlockingByteArrayParser = _class.instanceMethodId( @@ -2095,10 +2168,10 @@ class JsonFactory extends _$jni.JObject { /// (and US-ASCII since it is proper subset); other encodings are not supported /// at this point. ///@since 2.9 - jsonparser_.JsonParser createNonBlockingByteArrayParser() { + jsonparser_.JsonParser? createNonBlockingByteArrayParser() { return _createNonBlockingByteArrayParser(reference.pointer, _id_createNonBlockingByteArrayParser as _$jni.JMethodIDPtr) - .object(const jsonparser_.$JsonParser$Type()); + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createGenerator = _class.instanceMethodId( @@ -2144,16 +2217,18 @@ class JsonFactory extends _$jni.JObject { ///@param out OutputStream to use for writing JSON content ///@param enc Character encoding to use ///@since 2.1 - _$jni.JObject createGenerator( - _$jni.JObject out, - _$jni.JObject enc, + _$jni.JObject? createGenerator( + _$jni.JObject? out, + _$jni.JObject? enc, ) { + final _out = out?.reference ?? _$jni.jNullReference; + final _enc = enc?.reference ?? _$jni.jNullReference; return _createGenerator( reference.pointer, _id_createGenerator as _$jni.JMethodIDPtr, - out.reference.pointer, - enc.reference.pointer) - .object(const _$jni.JObjectType()); + _out.pointer, + _enc.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createGenerator$1 = _class.instanceMethodId( @@ -2180,12 +2255,13 @@ class JsonFactory extends _$jni.JObject { /// /// Note: there are formats that use fixed encoding (like most binary data formats). ///@since 2.1 - _$jni.JObject createGenerator$1( - _$jni.JObject out, + _$jni.JObject? createGenerator$1( + _$jni.JObject? out, ) { + final _out = out?.reference ?? _$jni.jNullReference; return _createGenerator$1(reference.pointer, - _id_createGenerator$1 as _$jni.JMethodIDPtr, out.reference.pointer) - .object(const _$jni.JObjectType()); + _id_createGenerator$1 as _$jni.JMethodIDPtr, _out.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createGenerator$2 = _class.instanceMethodId( @@ -2218,12 +2294,13 @@ class JsonFactory extends _$jni.JObject { /// Using application needs to close it explicitly. ///@since 2.1 ///@param w Writer to use for writing JSON content - _$jni.JObject createGenerator$2( - _$jni.JObject w, + _$jni.JObject? createGenerator$2( + _$jni.JObject? w, ) { + final _w = w?.reference ?? _$jni.jNullReference; return _createGenerator$2(reference.pointer, - _id_createGenerator$2 as _$jni.JMethodIDPtr, w.reference.pointer) - .object(const _$jni.JObjectType()); + _id_createGenerator$2 as _$jni.JMethodIDPtr, _w.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createGenerator$3 = _class.instanceMethodId( @@ -2263,16 +2340,18 @@ class JsonFactory extends _$jni.JObject { ///@param f File to write contents to ///@param enc Character encoding to use ///@since 2.1 - _$jni.JObject createGenerator$3( - _$jni.JObject f, - _$jni.JObject enc, + _$jni.JObject? createGenerator$3( + _$jni.JObject? f, + _$jni.JObject? enc, ) { + final _f = f?.reference ?? _$jni.jNullReference; + final _enc = enc?.reference ?? _$jni.jNullReference; return _createGenerator$3( reference.pointer, _id_createGenerator$3 as _$jni.JMethodIDPtr, - f.reference.pointer, - enc.reference.pointer) - .object(const _$jni.JObjectType()); + _f.pointer, + _enc.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createGenerator$4 = _class.instanceMethodId( @@ -2303,16 +2382,18 @@ class JsonFactory extends _$jni.JObject { /// Method for constructing generator for writing content using specified /// DataOutput instance. ///@since 2.8 - _$jni.JObject createGenerator$4( - _$jni.JObject out, - _$jni.JObject enc, + _$jni.JObject? createGenerator$4( + _$jni.JObject? out, + _$jni.JObject? enc, ) { + final _out = out?.reference ?? _$jni.jNullReference; + final _enc = enc?.reference ?? _$jni.jNullReference; return _createGenerator$4( reference.pointer, _id_createGenerator$4 as _$jni.JMethodIDPtr, - out.reference.pointer, - enc.reference.pointer) - .object(const _$jni.JObjectType()); + _out.pointer, + _enc.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createGenerator$5 = _class.instanceMethodId( @@ -2339,12 +2420,13 @@ class JsonFactory extends _$jni.JObject { /// /// Note: there are formats that use fixed encoding (like most binary data formats). ///@since 2.8 - _$jni.JObject createGenerator$5( - _$jni.JObject out, + _$jni.JObject? createGenerator$5( + _$jni.JObject? out, ) { + final _out = out?.reference ?? _$jni.jNullReference; return _createGenerator$5(reference.pointer, - _id_createGenerator$5 as _$jni.JMethodIDPtr, out.reference.pointer) - .object(const _$jni.JObjectType()); + _id_createGenerator$5 as _$jni.JMethodIDPtr, _out.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createJsonParser = _class.instanceMethodId( @@ -2384,12 +2466,13 @@ class JsonFactory extends _$jni.JObject { ///@throws IOException if parser initialization fails due to I/O (read) problem ///@throws JsonParseException if parser initialization fails due to content decoding problem ///@deprecated Since 2.2, use \#createParser(File) instead. - jsonparser_.JsonParser createJsonParser( - _$jni.JObject f, + jsonparser_.JsonParser? createJsonParser( + _$jni.JObject? f, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _createJsonParser(reference.pointer, - _id_createJsonParser as _$jni.JMethodIDPtr, f.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createJsonParser as _$jni.JMethodIDPtr, _f.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createJsonParser$1 = _class.instanceMethodId( @@ -2428,12 +2511,13 @@ class JsonFactory extends _$jni.JObject { ///@throws IOException if parser initialization fails due to I/O (read) problem ///@throws JsonParseException if parser initialization fails due to content decoding problem ///@deprecated Since 2.2, use \#createParser(URL) instead. - jsonparser_.JsonParser createJsonParser$1( - _$jni.JObject url, + jsonparser_.JsonParser? createJsonParser$1( + _$jni.JObject? url, ) { + final _url = url?.reference ?? _$jni.jNullReference; return _createJsonParser$1(reference.pointer, - _id_createJsonParser$1 as _$jni.JMethodIDPtr, url.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createJsonParser$1 as _$jni.JMethodIDPtr, _url.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createJsonParser$2 = _class.instanceMethodId( @@ -2475,12 +2559,13 @@ class JsonFactory extends _$jni.JObject { ///@throws IOException if parser initialization fails due to I/O (read) problem ///@throws JsonParseException if parser initialization fails due to content decoding problem ///@deprecated Since 2.2, use \#createParser(InputStream) instead. - jsonparser_.JsonParser createJsonParser$2( - _$jni.JObject in$, + jsonparser_.JsonParser? createJsonParser$2( + _$jni.JObject? in$, ) { + final _in$ = in$?.reference ?? _$jni.jNullReference; return _createJsonParser$2(reference.pointer, - _id_createJsonParser$2 as _$jni.JMethodIDPtr, in$.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createJsonParser$2 as _$jni.JMethodIDPtr, _in$.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createJsonParser$3 = _class.instanceMethodId( @@ -2515,12 +2600,13 @@ class JsonFactory extends _$jni.JObject { ///@throws IOException if parser initialization fails due to I/O (read) problem ///@throws JsonParseException if parser initialization fails due to content decoding problem ///@deprecated Since 2.2, use \#createParser(Reader) instead. - jsonparser_.JsonParser createJsonParser$3( - _$jni.JObject r, + jsonparser_.JsonParser? createJsonParser$3( + _$jni.JObject? r, ) { + final _r = r?.reference ?? _$jni.jNullReference; return _createJsonParser$3(reference.pointer, - _id_createJsonParser$3 as _$jni.JMethodIDPtr, r.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + _id_createJsonParser$3 as _$jni.JMethodIDPtr, _r.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createJsonParser$4 = _class.instanceMethodId( @@ -2548,14 +2634,13 @@ class JsonFactory extends _$jni.JObject { ///@throws IOException if parser initialization fails due to I/O (read) problem ///@throws JsonParseException if parser initialization fails due to content decoding problem ///@deprecated Since 2.2, use \#createParser(byte[]) instead. - jsonparser_.JsonParser createJsonParser$4( - _$jni.JArray<_$jni.jbyte> data, + jsonparser_.JsonParser? createJsonParser$4( + _$jni.JArray<_$jni.jbyte>? data, ) { - return _createJsonParser$4( - reference.pointer, - _id_createJsonParser$4 as _$jni.JMethodIDPtr, - data.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + final _data = data?.reference ?? _$jni.jNullReference; + return _createJsonParser$4(reference.pointer, + _id_createJsonParser$4 as _$jni.JMethodIDPtr, _data.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createJsonParser$5 = _class.instanceMethodId( @@ -2590,18 +2675,19 @@ class JsonFactory extends _$jni.JObject { ///@throws IOException if parser initialization fails due to I/O (read) problem ///@throws JsonParseException if parser initialization fails due to content decoding problem ///@deprecated Since 2.2, use \#createParser(byte[],int,int) instead. - jsonparser_.JsonParser createJsonParser$5( - _$jni.JArray<_$jni.jbyte> data, + jsonparser_.JsonParser? createJsonParser$5( + _$jni.JArray<_$jni.jbyte>? data, int offset, int len, ) { + final _data = data?.reference ?? _$jni.jNullReference; return _createJsonParser$5( reference.pointer, _id_createJsonParser$5 as _$jni.JMethodIDPtr, - data.reference.pointer, + _data.pointer, offset, len) - .object(const jsonparser_.$JsonParser$Type()); + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createJsonParser$6 = _class.instanceMethodId( @@ -2630,14 +2716,13 @@ class JsonFactory extends _$jni.JObject { ///@throws IOException if parser initialization fails due to I/O (read) problem ///@throws JsonParseException if parser initialization fails due to content decoding problem ///@deprecated Since 2.2, use \#createParser(String) instead. - jsonparser_.JsonParser createJsonParser$6( - _$jni.JString content, + jsonparser_.JsonParser? createJsonParser$6( + _$jni.JString? content, ) { - return _createJsonParser$6( - reference.pointer, - _id_createJsonParser$6 as _$jni.JMethodIDPtr, - content.reference.pointer) - .object(const jsonparser_.$JsonParser$Type()); + final _content = content?.reference ?? _$jni.jNullReference; + return _createJsonParser$6(reference.pointer, + _id_createJsonParser$6 as _$jni.JMethodIDPtr, _content.pointer) + .object(const jsonparser_.$JsonParser$NullableType()); } static final _id_createJsonGenerator = _class.instanceMethodId( @@ -2685,16 +2770,18 @@ class JsonFactory extends _$jni.JObject { ///@return Generator constructed ///@throws IOException if parser initialization fails due to I/O (write) problem ///@deprecated Since 2.2, use \#createGenerator(OutputStream, JsonEncoding) instead. - _$jni.JObject createJsonGenerator( - _$jni.JObject out, - _$jni.JObject enc, + _$jni.JObject? createJsonGenerator( + _$jni.JObject? out, + _$jni.JObject? enc, ) { + final _out = out?.reference ?? _$jni.jNullReference; + final _enc = enc?.reference ?? _$jni.jNullReference; return _createJsonGenerator( reference.pointer, _id_createJsonGenerator as _$jni.JMethodIDPtr, - out.reference.pointer, - enc.reference.pointer) - .object(const _$jni.JObjectType()); + _out.pointer, + _enc.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createJsonGenerator$1 = _class.instanceMethodId( @@ -2729,14 +2816,13 @@ class JsonFactory extends _$jni.JObject { ///@return Generator constructed ///@throws IOException if parser initialization fails due to I/O (write) problem ///@deprecated Since 2.2, use \#createGenerator(Writer) instead. - _$jni.JObject createJsonGenerator$1( - _$jni.JObject out, + _$jni.JObject? createJsonGenerator$1( + _$jni.JObject? out, ) { - return _createJsonGenerator$1( - reference.pointer, - _id_createJsonGenerator$1 as _$jni.JMethodIDPtr, - out.reference.pointer) - .object(const _$jni.JObjectType()); + final _out = out?.reference ?? _$jni.jNullReference; + return _createJsonGenerator$1(reference.pointer, + _id_createJsonGenerator$1 as _$jni.JMethodIDPtr, _out.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_createJsonGenerator$2 = _class.instanceMethodId( @@ -2766,14 +2852,13 @@ class JsonFactory extends _$jni.JObject { ///@return Generator constructed ///@throws IOException if parser initialization fails due to I/O (write) problem ///@deprecated Since 2.2, use \#createGenerator(OutputStream) instead. - _$jni.JObject createJsonGenerator$2( - _$jni.JObject out, + _$jni.JObject? createJsonGenerator$2( + _$jni.JObject? out, ) { - return _createJsonGenerator$2( - reference.pointer, - _id_createJsonGenerator$2 as _$jni.JMethodIDPtr, - out.reference.pointer) - .object(const _$jni.JObjectType()); + final _out = out?.reference ?? _$jni.jNullReference; + return _createJsonGenerator$2(reference.pointer, + _id_createJsonGenerator$2 as _$jni.JMethodIDPtr, _out.pointer) + .object(const _$jni.JObjectNullableType()); } static final _id_$_getBufferRecycler = _class.instanceMethodId( @@ -2801,10 +2886,47 @@ class JsonFactory extends _$jni.JObject { /// /// Note: only public to give access for {@code ObjectMapper} ///@return Buffer recycler instance to use - _$jni.JObject $_getBufferRecycler() { + _$jni.JObject? $_getBufferRecycler() { return _$_getBufferRecycler( reference.pointer, _id_$_getBufferRecycler as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); + } +} + +final class $JsonFactory$NullableType extends _$jni.JObjType { + @_$jni.internal + const $JsonFactory$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/fasterxml/jackson/core/JsonFactory;'; + + @_$jni.internal + @_$core.override + JsonFactory? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : JsonFactory.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonFactory$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonFactory$NullableType) && + other is $JsonFactory$NullableType; } } @@ -2819,11 +2941,17 @@ final class $JsonFactory$Type extends _$jni.JObjType { @_$jni.internal @_$core.override JsonFactory fromReference(_$jni.JReference reference) => - JsonFactory.fromReference(reference); + JsonFactory.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonFactory$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonParser.dart b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonParser.dart index 6062e6c3b..89a676174 100644 --- a/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonParser.dart +++ b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonParser.dart @@ -71,6 +71,7 @@ class JsonParser_Feature extends _$jni.JObject { _$jni.JClass.forName(r'com/fasterxml/jackson/core/JsonParser$Feature'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonParser_Feature$NullableType(); static const type = $JsonParser_Feature$Type(); static final _id_values = _class.staticMethodId( r'values', @@ -91,9 +92,10 @@ class JsonParser_Feature extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonParser.Feature[] values()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray values() { + static _$jni.JArray? values() { return _values(_class.reference.pointer, _id_values as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType($JsonParser_Feature$Type())); + .object( + const _$jni.JArrayNullableType($JsonParser_Feature$NullableType())); } static final _id_valueOf = _class.staticMethodId( @@ -114,12 +116,13 @@ class JsonParser_Feature extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonParser.Feature valueOf(java.lang.String name)` /// The returned object must be released after use, by calling the [release] method. - static JsonParser_Feature valueOf( - _$jni.JString name, + static JsonParser_Feature? valueOf( + _$jni.JString? name, ) { + final _name = name?.reference ?? _$jni.jNullReference; return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, - name.reference.pointer) - .object(const $JsonParser_Feature$Type()); + _name.pointer) + .object(const $JsonParser_Feature$NullableType()); } static final _id_collectDefaults = _class.staticMethodId( @@ -223,6 +226,45 @@ class JsonParser_Feature extends _$jni.JObject { } } +final class $JsonParser_Feature$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $JsonParser_Feature$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/fasterxml/jackson/core/JsonParser$Feature;'; + + @_$jni.internal + @_$core.override + JsonParser_Feature? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : JsonParser_Feature.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonParser_Feature$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonParser_Feature$NullableType) && + other is $JsonParser_Feature$NullableType; + } +} + final class $JsonParser_Feature$Type extends _$jni.JObjType { @_$jni.internal @@ -235,11 +277,17 @@ final class $JsonParser_Feature$Type @_$jni.internal @_$core.override JsonParser_Feature fromReference(_$jni.JReference reference) => - JsonParser_Feature.fromReference(reference); + JsonParser_Feature.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonParser_Feature$NullableType(); @_$jni.internal @_$core.override @@ -274,6 +322,7 @@ class JsonParser_NumberType extends _$jni.JObject { _$jni.JClass.forName(r'com/fasterxml/jackson/core/JsonParser$NumberType'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonParser_NumberType$NullableType(); static const type = $JsonParser_NumberType$Type(); static final _id_values = _class.staticMethodId( r'values', @@ -294,9 +343,10 @@ class JsonParser_NumberType extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonParser.NumberType[] values()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray values() { + static _$jni.JArray? values() { return _values(_class.reference.pointer, _id_values as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType($JsonParser_NumberType$Type())); + .object(const _$jni.JArrayNullableType( + $JsonParser_NumberType$NullableType())); } static final _id_valueOf = _class.staticMethodId( @@ -317,12 +367,52 @@ class JsonParser_NumberType extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonParser.NumberType valueOf(java.lang.String name)` /// The returned object must be released after use, by calling the [release] method. - static JsonParser_NumberType valueOf( - _$jni.JString name, + static JsonParser_NumberType? valueOf( + _$jni.JString? name, ) { + final _name = name?.reference ?? _$jni.jNullReference; return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, - name.reference.pointer) - .object(const $JsonParser_NumberType$Type()); + _name.pointer) + .object(const $JsonParser_NumberType$NullableType()); + } +} + +final class $JsonParser_NumberType$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $JsonParser_NumberType$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/fasterxml/jackson/core/JsonParser$NumberType;'; + + @_$jni.internal + @_$core.override + JsonParser_NumberType? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : JsonParser_NumberType.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonParser_NumberType$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonParser_NumberType$NullableType) && + other is $JsonParser_NumberType$NullableType; } } @@ -338,11 +428,17 @@ final class $JsonParser_NumberType$Type @_$jni.internal @_$core.override JsonParser_NumberType fromReference(_$jni.JReference reference) => - JsonParser_NumberType.fromReference(reference); + JsonParser_NumberType.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonParser_NumberType$NullableType(); @_$jni.internal @_$core.override @@ -379,6 +475,7 @@ class JsonParser extends _$jni.JObject { _$jni.JClass.forName(r'com/fasterxml/jackson/core/JsonParser'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonParser$NullableType(); static const type = $JsonParser$Type(); static final _id_getCodec = _class.instanceMethodId( r'getCodec', @@ -404,9 +501,9 @@ class JsonParser extends _$jni.JObject { /// parser, if any. Codec is used by \#readValueAs(Class) /// method (and its variants). ///@return Codec assigned to this parser, if any; {@code null} if none - _$jni.JObject getCodec() { + _$jni.JObject? getCodec() { return _getCodec(reference.pointer, _id_getCodec as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setCodec = _class.instanceMethodId( @@ -432,10 +529,11 @@ class JsonParser extends _$jni.JObject { /// method (and its variants). ///@param oc Codec to assign, if any; {@code null} if none void setCodec( - _$jni.JObject oc, + _$jni.JObject? oc, ) { - _setCodec(reference.pointer, _id_setCodec as _$jni.JMethodIDPtr, - oc.reference.pointer) + final _oc = oc?.reference ?? _$jni.jNullReference; + _setCodec( + reference.pointer, _id_setCodec as _$jni.JMethodIDPtr, _oc.pointer) .check(); } @@ -473,10 +571,10 @@ class JsonParser extends _$jni.JObject { /// In general use of this accessor should be considered as /// "last effort", i.e. only used if no other mechanism is applicable. ///@return Input source this parser was configured with - _$jni.JObject getInputSource() { + _$jni.JObject? getInputSource() { return _getInputSource( reference.pointer, _id_getInputSource as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setRequestPayloadOnError = _class.instanceMethodId( @@ -501,12 +599,13 @@ class JsonParser extends _$jni.JObject { ///@param payload Payload to pass ///@since 2.8 void setRequestPayloadOnError( - _$jni.JObject payload, + _$jni.JObject? payload, ) { + final _payload = payload?.reference ?? _$jni.jNullReference; _setRequestPayloadOnError( reference.pointer, _id_setRequestPayloadOnError as _$jni.JMethodIDPtr, - payload.reference.pointer) + _payload.pointer) .check(); } @@ -540,14 +639,16 @@ class JsonParser extends _$jni.JObject { ///@param charset Character encoding for (lazily) decoding payload ///@since 2.8 void setRequestPayloadOnError$1( - _$jni.JArray<_$jni.jbyte> payload, - _$jni.JString charset, + _$jni.JArray<_$jni.jbyte>? payload, + _$jni.JString? charset, ) { + final _payload = payload?.reference ?? _$jni.jNullReference; + final _charset = charset?.reference ?? _$jni.jNullReference; _setRequestPayloadOnError$1( reference.pointer, _id_setRequestPayloadOnError$1 as _$jni.JMethodIDPtr, - payload.reference.pointer, - charset.reference.pointer) + _payload.pointer, + _charset.pointer) .check(); } @@ -574,12 +675,13 @@ class JsonParser extends _$jni.JObject { ///@param payload Payload to pass ///@since 2.8 void setRequestPayloadOnError$2( - _$jni.JString payload, + _$jni.JString? payload, ) { + final _payload = payload?.reference ?? _$jni.jNullReference; _setRequestPayloadOnError$2( reference.pointer, _id_setRequestPayloadOnError$2 as _$jni.JMethodIDPtr, - payload.reference.pointer) + _payload.pointer) .check(); } @@ -612,10 +714,11 @@ class JsonParser extends _$jni.JObject { ///@param schema Schema to use ///@throws UnsupportedOperationException if parser does not support schema void setSchema( - _$jni.JObject schema, + _$jni.JObject? schema, ) { + final _schema = schema?.reference ?? _$jni.jNullReference; _setSchema(reference.pointer, _id_setSchema as _$jni.JMethodIDPtr, - schema.reference.pointer) + _schema.pointer) .check(); } @@ -643,9 +746,9 @@ class JsonParser extends _$jni.JObject { /// Default implementation returns null. ///@return Schema in use by this parser, if any; {@code null} if none ///@since 2.1 - _$jni.JObject getSchema() { + _$jni.JObject? getSchema() { return _getSchema(reference.pointer, _id_getSchema as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_canUseSchema = _class.instanceMethodId( @@ -671,10 +774,11 @@ class JsonParser extends _$jni.JObject { ///@param schema Schema to check ///@return True if this parser can use given schema; false if not bool canUseSchema( - _$jni.JObject schema, + _$jni.JObject? schema, ) { + final _schema = schema?.reference ?? _$jni.jNullReference; return _canUseSchema(reference.pointer, - _id_canUseSchema as _$jni.JMethodIDPtr, schema.reference.pointer) + _id_canUseSchema as _$jni.JMethodIDPtr, _schema.pointer) .boolean; } @@ -772,10 +876,10 @@ class JsonParser extends _$jni.JObject { /// parsers that use blocking I/O. ///@return Input feeder to use with non-blocking (async) parsing ///@since 2.9 - _$jni.JObject getNonBlockingInputFeeder() { + _$jni.JObject? getNonBlockingInputFeeder() { return _getNonBlockingInputFeeder(reference.pointer, _id_getNonBlockingInputFeeder as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getReadCapabilities = _class.instanceMethodId( @@ -802,10 +906,10 @@ class JsonParser extends _$jni.JObject { /// underlying data format being read (directly or indirectly). ///@return Set of read capabilities for content to read via this parser ///@since 2.12 - _$jni.JObject getReadCapabilities() { + _$jni.JObject? getReadCapabilities() { return _getReadCapabilities( reference.pointer, _id_getReadCapabilities as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_version = _class.instanceMethodId( @@ -832,9 +936,9 @@ class JsonParser extends _$jni.JObject { /// Left for sub-classes to implement. ///@return Version of this generator (derived from version declared for /// {@code jackson-core} jar that contains the class - _$jni.JObject version() { + _$jni.JObject? version() { return _version(reference.pointer, _id_version as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_close = _class.instanceMethodId( @@ -934,10 +1038,10 @@ class JsonParser extends _$jni.JObject { /// Contexts can also be used for simple xpath-like matching of /// input, if so desired. ///@return Stream input context (JsonStreamContext) associated with this parser - _$jni.JObject getParsingContext() { + _$jni.JObject? getParsingContext() { return _getParsingContext( reference.pointer, _id_getParsingContext as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_currentLocation = _class.instanceMethodId( @@ -972,10 +1076,10 @@ class JsonParser extends _$jni.JObject { /// to other library) ///@return Location of the last processed input unit (byte or character) ///@since 2.13 - _$jni.JObject currentLocation() { + _$jni.JObject? currentLocation() { return _currentLocation( reference.pointer, _id_currentLocation as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_currentTokenLocation = _class.instanceMethodId( @@ -1010,10 +1114,10 @@ class JsonParser extends _$jni.JObject { /// to other library) ///@return Starting location of the token parser currently points to ///@since 2.13 (will eventually replace \#getTokenLocation) - _$jni.JObject currentTokenLocation() { + _$jni.JObject? currentTokenLocation() { return _currentTokenLocation( reference.pointer, _id_currentTokenLocation as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getCurrentLocation = _class.instanceMethodId( @@ -1039,10 +1143,10 @@ class JsonParser extends _$jni.JObject { /// Alias for \#currentLocation(), to be deprecated in later /// Jackson 2.x versions (and removed from Jackson 3.0). ///@return Location of the last processed input unit (byte or character) - _$jni.JObject getCurrentLocation() { + _$jni.JObject? getCurrentLocation() { return _getCurrentLocation( reference.pointer, _id_getCurrentLocation as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getTokenLocation = _class.instanceMethodId( @@ -1068,10 +1172,10 @@ class JsonParser extends _$jni.JObject { /// Alias for \#currentTokenLocation(), to be deprecated in later /// Jackson 2.x versions (and removed from Jackson 3.0). ///@return Starting location of the token parser currently points to - _$jni.JObject getTokenLocation() { + _$jni.JObject? getTokenLocation() { return _getTokenLocation( reference.pointer, _id_getTokenLocation as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_currentValue = _class.instanceMethodId( @@ -1105,10 +1209,10 @@ class JsonParser extends _$jni.JObject { /// and gets passed through data-binding. ///@return "Current value" associated with the current input context (state) of this parser ///@since 2.13 (added as replacement for older \#getCurrentValue() - _$jni.JObject currentValue() { + _$jni.JObject? currentValue() { return _currentValue( reference.pointer, _id_currentValue as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_assignCurrentValue = _class.instanceMethodId( @@ -1136,10 +1240,11 @@ class JsonParser extends _$jni.JObject { ///@param v Current value to assign for the current input context of this parser ///@since 2.13 (added as replacement for older \#setCurrentValue void assignCurrentValue( - _$jni.JObject v, + _$jni.JObject? v, ) { + final _v = v?.reference ?? _$jni.jNullReference; _assignCurrentValue(reference.pointer, - _id_assignCurrentValue as _$jni.JMethodIDPtr, v.reference.pointer) + _id_assignCurrentValue as _$jni.JMethodIDPtr, _v.pointer) .check(); } @@ -1166,10 +1271,10 @@ class JsonParser extends _$jni.JObject { /// Alias for \#currentValue(), to be deprecated in later /// Jackson 2.x versions (and removed from Jackson 3.0). ///@return Location of the last processed input unit (byte or character) - _$jni.JObject getCurrentValue() { + _$jni.JObject? getCurrentValue() { return _getCurrentValue( reference.pointer, _id_getCurrentValue as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_setCurrentValue = _class.instanceMethodId( @@ -1194,10 +1299,11 @@ class JsonParser extends _$jni.JObject { /// Jackson 2.x versions (and removed from Jackson 3.0). ///@param v Current value to assign for the current input context of this parser void setCurrentValue( - _$jni.JObject v, + _$jni.JObject? v, ) { + final _v = v?.reference ?? _$jni.jNullReference; _setCurrentValue(reference.pointer, - _id_setCurrentValue as _$jni.JMethodIDPtr, v.reference.pointer) + _id_setCurrentValue as _$jni.JMethodIDPtr, _v.pointer) .check(); } @@ -1231,10 +1337,11 @@ class JsonParser extends _$jni.JObject { /// otherwise number of bytes released (0 if there was nothing to release) ///@throws IOException if write to stream threw exception int releaseBuffered( - _$jni.JObject out, + _$jni.JObject? out, ) { + final _out = out?.reference ?? _$jni.jNullReference; return _releaseBuffered(reference.pointer, - _id_releaseBuffered as _$jni.JMethodIDPtr, out.reference.pointer) + _id_releaseBuffered as _$jni.JMethodIDPtr, _out.pointer) .integer; } @@ -1269,10 +1376,11 @@ class JsonParser extends _$jni.JObject { /// otherwise number of chars released (0 if there was nothing to release) ///@throws IOException if write using Writer threw exception int releaseBuffered$1( - _$jni.JObject w, + _$jni.JObject? w, ) { + final _w = w?.reference ?? _$jni.jNullReference; return _releaseBuffered$1(reference.pointer, - _id_releaseBuffered$1 as _$jni.JMethodIDPtr, w.reference.pointer) + _id_releaseBuffered$1 as _$jni.JMethodIDPtr, _w.pointer) .integer; } @@ -1299,12 +1407,13 @@ class JsonParser extends _$jni.JObject { /// (check Feature for list of features) ///@param f Feature to enable ///@return This parser, to allow call chaining - JsonParser enable( - JsonParser_Feature f, + JsonParser? enable( + JsonParser_Feature? f, ) { - return _enable(reference.pointer, _id_enable as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonParser$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _enable( + reference.pointer, _id_enable as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonParser$NullableType()); } static final _id_disable = _class.instanceMethodId( @@ -1330,12 +1439,13 @@ class JsonParser extends _$jni.JObject { /// (check Feature for list of features) ///@param f Feature to disable ///@return This parser, to allow call chaining - JsonParser disable( - JsonParser_Feature f, + JsonParser? disable( + JsonParser_Feature? f, ) { - return _disable(reference.pointer, _id_disable as _$jni.JMethodIDPtr, - f.reference.pointer) - .object(const $JsonParser$Type()); + final _f = f?.reference ?? _$jni.jNullReference; + return _disable( + reference.pointer, _id_disable as _$jni.JMethodIDPtr, _f.pointer) + .object(const $JsonParser$NullableType()); } static final _id_configure = _class.instanceMethodId( @@ -1363,13 +1473,14 @@ class JsonParser extends _$jni.JObject { ///@param f Feature to enable or disable ///@param state Whether to enable feature ({@code true}) or disable ({@code false}) ///@return This parser, to allow call chaining - JsonParser configure( - JsonParser_Feature f, + JsonParser? configure( + JsonParser_Feature? f, bool state, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _configure(reference.pointer, _id_configure as _$jni.JMethodIDPtr, - f.reference.pointer, state ? 1 : 0) - .object(const $JsonParser$Type()); + _f.pointer, state ? 1 : 0) + .object(const $JsonParser$NullableType()); } static final _id_isEnabled = _class.instanceMethodId( @@ -1394,10 +1505,11 @@ class JsonParser extends _$jni.JObject { ///@param f Feature to check ///@return {@code True} if feature is enabled; {@code false} otherwise bool isEnabled( - JsonParser_Feature f, + JsonParser_Feature? f, ) { - return _isEnabled(reference.pointer, _id_isEnabled as _$jni.JMethodIDPtr, - f.reference.pointer) + final _f = f?.reference ?? _$jni.jNullReference; + return _isEnabled( + reference.pointer, _id_isEnabled as _$jni.JMethodIDPtr, _f.pointer) .boolean; } @@ -1424,10 +1536,11 @@ class JsonParser extends _$jni.JObject { ///@return {@code True} if feature is enabled; {@code false} otherwise ///@since 2.10 bool isEnabled$1( - _$jni.JObject f, + _$jni.JObject? f, ) { + final _f = f?.reference ?? _$jni.jNullReference; return _isEnabled$1(reference.pointer, - _id_isEnabled$1 as _$jni.JMethodIDPtr, f.reference.pointer) + _id_isEnabled$1 as _$jni.JMethodIDPtr, _f.pointer) .boolean; } @@ -1482,12 +1595,12 @@ class JsonParser extends _$jni.JObject { ///@return This parser, to allow call chaining ///@since 2.3 ///@deprecated Since 2.7, use \#overrideStdFeatures(int, int) instead - JsonParser setFeatureMask( + JsonParser? setFeatureMask( int mask, ) { return _setFeatureMask( reference.pointer, _id_setFeatureMask as _$jni.JMethodIDPtr, mask) - .object(const $JsonParser$Type()); + .object(const $JsonParser$NullableType()); } static final _id_overrideStdFeatures = _class.instanceMethodId( @@ -1521,13 +1634,13 @@ class JsonParser extends _$jni.JObject { ///@param mask Bit mask of features to change ///@return This parser, to allow call chaining ///@since 2.6 - JsonParser overrideStdFeatures( + JsonParser? overrideStdFeatures( int values, int mask, ) { return _overrideStdFeatures(reference.pointer, _id_overrideStdFeatures as _$jni.JMethodIDPtr, values, mask) - .object(const $JsonParser$Type()); + .object(const $JsonParser$NullableType()); } static final _id_getFormatFeatures = _class.instanceMethodId( @@ -1588,13 +1701,13 @@ class JsonParser extends _$jni.JObject { ///@param mask Bit mask of features to change ///@return This parser, to allow call chaining ///@since 2.6 - JsonParser overrideFormatFeatures( + JsonParser? overrideFormatFeatures( int values, int mask, ) { return _overrideFormatFeatures(reference.pointer, _id_overrideFormatFeatures as _$jni.JMethodIDPtr, values, mask) - .object(const $JsonParser$Type()); + .object(const $JsonParser$NullableType()); } static final _id_nextToken = _class.instanceMethodId( @@ -1625,9 +1738,9 @@ class JsonParser extends _$jni.JObject { /// to indicate end-of-input ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - jsontoken_.JsonToken nextToken() { + jsontoken_.JsonToken? nextToken() { return _nextToken(reference.pointer, _id_nextToken as _$jni.JMethodIDPtr) - .object(const jsontoken_.$JsonToken$Type()); + .object(const jsontoken_.$JsonToken$NullableType()); } static final _id_nextValue = _class.instanceMethodId( @@ -1666,9 +1779,9 @@ class JsonParser extends _$jni.JObject { /// available yet) ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - jsontoken_.JsonToken nextValue() { + jsontoken_.JsonToken? nextValue() { return _nextValue(reference.pointer, _id_nextValue as _$jni.JMethodIDPtr) - .object(const jsontoken_.$JsonToken$Type()); + .object(const jsontoken_.$JsonToken$NullableType()); } static final _id_nextFieldName = _class.instanceMethodId( @@ -1705,10 +1818,11 @@ class JsonParser extends _$jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems bool nextFieldName( - _$jni.JObject str, + _$jni.JObject? str, ) { + final _str = str?.reference ?? _$jni.jNullReference; return _nextFieldName(reference.pointer, - _id_nextFieldName as _$jni.JMethodIDPtr, str.reference.pointer) + _id_nextFieldName as _$jni.JMethodIDPtr, _str.pointer) .boolean; } @@ -1740,10 +1854,10 @@ class JsonParser extends _$jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems ///@since 2.5 - _$jni.JString nextFieldName$1() { + _$jni.JString? nextFieldName$1() { return _nextFieldName$1( reference.pointer, _id_nextFieldName$1 as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_nextTextValue = _class.instanceMethodId( @@ -1779,10 +1893,10 @@ class JsonParser extends _$jni.JObject { /// to; or {@code null} if next token is of some other type ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JString nextTextValue() { + _$jni.JString? nextTextValue() { return _nextTextValue( reference.pointer, _id_nextTextValue as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_nextIntValue = _class.instanceMethodId( @@ -1905,10 +2019,10 @@ class JsonParser extends _$jni.JObject { /// token parser advanced to; or {@code null} if next token is of some other type ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JBoolean nextBooleanValue() { + _$jni.JBoolean? nextBooleanValue() { return _nextBooleanValue( reference.pointer, _id_nextBooleanValue as _$jni.JMethodIDPtr) - .object(const _$jni.JBooleanType()); + .object(const _$jni.JBooleanNullableType()); } static final _id_skipChildren = _class.instanceMethodId( @@ -1946,10 +2060,10 @@ class JsonParser extends _$jni.JObject { ///@return This parser, to allow call chaining ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - JsonParser skipChildren() { + JsonParser? skipChildren() { return _skipChildren( reference.pointer, _id_skipChildren as _$jni.JMethodIDPtr) - .object(const $JsonParser$Type()); + .object(const $JsonParser$NullableType()); } static final _id_finishToken = _class.instanceMethodId( @@ -2018,10 +2132,10 @@ class JsonParser extends _$jni.JObject { /// after end-of-input has been encountered, as well as /// if the current token has been explicitly cleared. ///@since 2.8 - jsontoken_.JsonToken currentToken() { + jsontoken_.JsonToken? currentToken() { return _currentToken( reference.pointer, _id_currentToken as _$jni.JMethodIDPtr) - .object(const jsontoken_.$JsonToken$Type()); + .object(const jsontoken_.$JsonToken$NullableType()); } static final _id_currentTokenId = _class.instanceMethodId( @@ -2082,10 +2196,10 @@ class JsonParser extends _$jni.JObject { /// Jackson 2.13 (will be removed from 3.0). ///@return Type of the token this parser currently points to, /// if any: null before any tokens have been read, and - jsontoken_.JsonToken getCurrentToken() { + jsontoken_.JsonToken? getCurrentToken() { return _getCurrentToken( reference.pointer, _id_getCurrentToken as _$jni.JMethodIDPtr) - .object(const jsontoken_.$JsonToken$Type()); + .object(const jsontoken_.$JsonToken$NullableType()); } static final _id_getCurrentTokenId = _class.instanceMethodId( @@ -2218,10 +2332,11 @@ class JsonParser extends _$jni.JObject { ///@return {@code True} if the parser current points to specified token ///@since 2.6 bool hasToken( - jsontoken_.JsonToken t, + jsontoken_.JsonToken? t, ) { - return _hasToken(reference.pointer, _id_hasToken as _$jni.JMethodIDPtr, - t.reference.pointer) + final _t = t?.reference ?? _$jni.jNullReference; + return _hasToken( + reference.pointer, _id_hasToken as _$jni.JMethodIDPtr, _t.pointer) .boolean; } @@ -2428,10 +2543,10 @@ class JsonParser extends _$jni.JObject { /// Will return null if no tokens have been cleared, /// or if parser has been closed. ///@return Last cleared token, if any; {@code null} otherwise - jsontoken_.JsonToken getLastClearedToken() { + jsontoken_.JsonToken? getLastClearedToken() { return _getLastClearedToken( reference.pointer, _id_getLastClearedToken as _$jni.JMethodIDPtr) - .object(const jsontoken_.$JsonToken$Type()); + .object(const jsontoken_.$JsonToken$NullableType()); } static final _id_overrideCurrentName = _class.instanceMethodId( @@ -2461,12 +2576,11 @@ class JsonParser extends _$jni.JObject { /// resort, as it is a work-around for regular operation. ///@param name Name to use as the current name; may be null. void overrideCurrentName( - _$jni.JString name, + _$jni.JString? name, ) { - _overrideCurrentName( - reference.pointer, - _id_overrideCurrentName as _$jni.JMethodIDPtr, - name.reference.pointer) + final _name = name?.reference ?? _$jni.jNullReference; + _overrideCurrentName(reference.pointer, + _id_overrideCurrentName as _$jni.JMethodIDPtr, _name.pointer) .check(); } @@ -2494,10 +2608,10 @@ class JsonParser extends _$jni.JObject { ///@return Name of the current field in the parsing context ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JString getCurrentName() { + _$jni.JString? getCurrentName() { return _getCurrentName( reference.pointer, _id_getCurrentName as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_currentName = _class.instanceMethodId( @@ -2529,10 +2643,10 @@ class JsonParser extends _$jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems ///@since 2.10 - _$jni.JString currentName() { + _$jni.JString? currentName() { return _currentName( reference.pointer, _id_currentName as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getText = _class.instanceMethodId( @@ -2563,9 +2677,9 @@ class JsonParser extends _$jni.JObject { /// by \#nextToken() or other iteration methods) ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JString getText() { + _$jni.JString? getText() { return _getText(reference.pointer, _id_getText as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getText$1 = _class.instanceMethodId( @@ -2602,10 +2716,11 @@ class JsonParser extends _$jni.JObject { /// JsonParseException for decoding problems ///@since 2.8 int getText$1( - _$jni.JObject writer, + _$jni.JObject? writer, ) { + final _writer = writer?.reference ?? _$jni.jNullReference; return _getText$1(reference.pointer, _id_getText$1 as _$jni.JMethodIDPtr, - writer.reference.pointer) + _writer.pointer) .integer; } @@ -2656,10 +2771,10 @@ class JsonParser extends _$jni.JObject { /// at offset 0, and not necessarily until the end of buffer) ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JArray<_$jni.jchar> getTextCharacters() { + _$jni.JArray<_$jni.jchar>? getTextCharacters() { return _getTextCharacters( reference.pointer, _id_getTextCharacters as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType(_$jni.jcharType())); + .object(const _$jni.JArrayNullableType(_$jni.jcharType())); } static final _id_getTextLength = _class.instanceMethodId( @@ -2795,10 +2910,10 @@ class JsonParser extends _$jni.JObject { /// the current token is not numeric, or if decoding of the value fails /// (invalid format for numbers); plain IOException if underlying /// content read fails (possible if values are extracted lazily) - _$jni.JNumber getNumberValue() { + _$jni.JNumber? getNumberValue() { return _getNumberValue( reference.pointer, _id_getNumberValue as _$jni.JMethodIDPtr) - .object(const _$jni.JNumberType()); + .object(const _$jni.JNumberNullableType()); } static final _id_getNumberValueExact = _class.instanceMethodId( @@ -2835,10 +2950,10 @@ class JsonParser extends _$jni.JObject { /// (invalid format for numbers); plain IOException if underlying /// content read fails (possible if values are extracted lazily) ///@since 2.12 - _$jni.JNumber getNumberValueExact() { + _$jni.JNumber? getNumberValueExact() { return _getNumberValueExact( reference.pointer, _id_getNumberValueExact as _$jni.JMethodIDPtr) - .object(const _$jni.JNumberType()); + .object(const _$jni.JNumberNullableType()); } static final _id_getNumberType = _class.instanceMethodId( @@ -2868,10 +2983,10 @@ class JsonParser extends _$jni.JObject { ///@return Type of current number, if parser points to numeric token; {@code null} otherwise ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - JsonParser_NumberType getNumberType() { + JsonParser_NumberType? getNumberType() { return _getNumberType( reference.pointer, _id_getNumberType as _$jni.JMethodIDPtr) - .object(const $JsonParser_NumberType$Type()); + .object(const $JsonParser_NumberType$NullableType()); } static final _id_getByteValue = _class.instanceMethodId( @@ -3071,10 +3186,10 @@ class JsonParser extends _$jni.JObject { /// otherwise exception thrown ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JObject getBigIntegerValue() { + _$jni.JObject? getBigIntegerValue() { return _getBigIntegerValue( reference.pointer, _id_getBigIntegerValue as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getFloatValue = _class.instanceMethodId( @@ -3185,10 +3300,10 @@ class JsonParser extends _$jni.JObject { /// otherwise exception thrown ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JObject getDecimalValue() { + _$jni.JObject? getDecimalValue() { return _getDecimalValue( reference.pointer, _id_getDecimalValue as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getBooleanValue = _class.instanceMethodId( @@ -3261,10 +3376,10 @@ class JsonParser extends _$jni.JObject { /// for the current token, if any; {@code null otherwise} ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JObject getEmbeddedObject() { + _$jni.JObject? getEmbeddedObject() { return _getEmbeddedObject( reference.pointer, _id_getEmbeddedObject as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getBinaryValue = _class.instanceMethodId( @@ -3306,12 +3421,13 @@ class JsonParser extends _$jni.JObject { ///@return Decoded binary data ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JArray<_$jni.jbyte> getBinaryValue( - _$jni.JObject bv, + _$jni.JArray<_$jni.jbyte>? getBinaryValue( + _$jni.JObject? bv, ) { + final _bv = bv?.reference ?? _$jni.jNullReference; return _getBinaryValue(reference.pointer, - _id_getBinaryValue as _$jni.JMethodIDPtr, bv.reference.pointer) - .object(const _$jni.JArrayType(_$jni.jbyteType())); + _id_getBinaryValue as _$jni.JMethodIDPtr, _bv.pointer) + .object(const _$jni.JArrayNullableType(_$jni.jbyteType())); } static final _id_getBinaryValue$1 = _class.instanceMethodId( @@ -3340,10 +3456,10 @@ class JsonParser extends _$jni.JObject { ///@return Decoded binary data ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems - _$jni.JArray<_$jni.jbyte> getBinaryValue$1() { + _$jni.JArray<_$jni.jbyte>? getBinaryValue$1() { return _getBinaryValue$1( reference.pointer, _id_getBinaryValue$1 as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType(_$jni.jbyteType())); + .object(const _$jni.JArrayNullableType(_$jni.jbyteType())); } static final _id_readBinaryValue = _class.instanceMethodId( @@ -3376,10 +3492,11 @@ class JsonParser extends _$jni.JObject { /// JsonParseException for decoding problems ///@since 2.1 int readBinaryValue( - _$jni.JObject out, + _$jni.JObject? out, ) { + final _out = out?.reference ?? _$jni.jNullReference; return _readBinaryValue(reference.pointer, - _id_readBinaryValue as _$jni.JMethodIDPtr, out.reference.pointer) + _id_readBinaryValue as _$jni.JMethodIDPtr, _out.pointer) .integer; } @@ -3416,14 +3533,16 @@ class JsonParser extends _$jni.JObject { /// JsonParseException for decoding problems ///@since 2.1 int readBinaryValue$1( - _$jni.JObject bv, - _$jni.JObject out, + _$jni.JObject? bv, + _$jni.JObject? out, ) { + final _bv = bv?.reference ?? _$jni.jNullReference; + final _out = out?.reference ?? _$jni.jNullReference; return _readBinaryValue$1( reference.pointer, _id_readBinaryValue$1 as _$jni.JMethodIDPtr, - bv.reference.pointer, - out.reference.pointer) + _bv.pointer, + _out.pointer) .integer; } @@ -3764,10 +3883,10 @@ class JsonParser extends _$jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems ///@since 2.1 - _$jni.JString getValueAsString() { + _$jni.JString? getValueAsString() { return _getValueAsString( reference.pointer, _id_getValueAsString as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getValueAsString$1 = _class.instanceMethodId( @@ -3801,12 +3920,13 @@ class JsonParser extends _$jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems ///@since 2.1 - _$jni.JString getValueAsString$1( - _$jni.JString def, + _$jni.JString? getValueAsString$1( + _$jni.JString? def, ) { + final _def = def?.reference ?? _$jni.jNullReference; return _getValueAsString$1(reference.pointer, - _id_getValueAsString$1 as _$jni.JMethodIDPtr, def.reference.pointer) - .object(const _$jni.JStringType()); + _id_getValueAsString$1 as _$jni.JMethodIDPtr, _def.pointer) + .object(const _$jni.JStringNullableType()); } static final _id_canReadObjectId = _class.instanceMethodId( @@ -3914,10 +4034,10 @@ class JsonParser extends _$jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems ///@since 2.3 - _$jni.JObject getObjectId() { + _$jni.JObject? getObjectId() { return _getObjectId( reference.pointer, _id_getObjectId as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_getTypeId = _class.instanceMethodId( @@ -3953,9 +4073,9 @@ class JsonParser extends _$jni.JObject { ///@throws IOException for low-level read issues, or /// JsonParseException for decoding problems ///@since 2.3 - _$jni.JObject getTypeId() { + _$jni.JObject? getTypeId() { return _getTypeId(reference.pointer, _id_getTypeId as _$jni.JMethodIDPtr) - .object(const _$jni.JObjectType()); + .object(const _$jni.JObjectNullableType()); } static final _id_readValueAs = _class.instanceMethodId( @@ -4002,12 +4122,13 @@ class JsonParser extends _$jni.JObject { ///@return Java value read from content ///@throws IOException if there is either an underlying I/O problem or decoding /// issue at format layer - $T readValueAs<$T extends _$jni.JObject>( - _$jni.JObject valueType, { + $T readValueAs<$T extends _$jni.JObject?>( + _$jni.JObject? valueType, { required _$jni.JObjType<$T> T, }) { + final _valueType = valueType?.reference ?? _$jni.jNullReference; return _readValueAs(reference.pointer, - _id_readValueAs as _$jni.JMethodIDPtr, valueType.reference.pointer) + _id_readValueAs as _$jni.JMethodIDPtr, _valueType.pointer) .object(T); } @@ -4052,14 +4173,13 @@ class JsonParser extends _$jni.JObject { ///@return Java value read from content ///@throws IOException if there is either an underlying I/O problem or decoding /// issue at format layer - $T readValueAs$1<$T extends _$jni.JObject>( - _$jni.JObject valueTypeRef, { + $T readValueAs$1<$T extends _$jni.JObject?>( + _$jni.JObject? valueTypeRef, { required _$jni.JObjType<$T> T, }) { - return _readValueAs$1( - reference.pointer, - _id_readValueAs$1 as _$jni.JMethodIDPtr, - valueTypeRef.reference.pointer) + final _valueTypeRef = valueTypeRef?.reference ?? _$jni.jNullReference; + return _readValueAs$1(reference.pointer, + _id_readValueAs$1 as _$jni.JMethodIDPtr, _valueTypeRef.pointer) .object(T); } @@ -4090,13 +4210,14 @@ class JsonParser extends _$jni.JObject { ///@return Iterator for reading multiple Java values from content ///@throws IOException if there is either an underlying I/O problem or decoding /// issue at format layer - _$jni.JIterator<$T> readValuesAs<$T extends _$jni.JObject>( - _$jni.JObject valueType, { + _$jni.JIterator<$T>? readValuesAs<$T extends _$jni.JObject?>( + _$jni.JObject? valueType, { required _$jni.JObjType<$T> T, }) { + final _valueType = valueType?.reference ?? _$jni.jNullReference; return _readValuesAs(reference.pointer, - _id_readValuesAs as _$jni.JMethodIDPtr, valueType.reference.pointer) - .object(_$jni.JIteratorType(T)); + _id_readValuesAs as _$jni.JMethodIDPtr, _valueType.pointer) + .object(_$jni.JIteratorNullableType(T)); } static final _id_readValuesAs$1 = _class.instanceMethodId( @@ -4126,15 +4247,14 @@ class JsonParser extends _$jni.JObject { ///@return Iterator for reading multiple Java values from content ///@throws IOException if there is either an underlying I/O problem or decoding /// issue at format layer - _$jni.JIterator<$T> readValuesAs$1<$T extends _$jni.JObject>( - _$jni.JObject valueTypeRef, { + _$jni.JIterator<$T>? readValuesAs$1<$T extends _$jni.JObject?>( + _$jni.JObject? valueTypeRef, { required _$jni.JObjType<$T> T, }) { - return _readValuesAs$1( - reference.pointer, - _id_readValuesAs$1 as _$jni.JMethodIDPtr, - valueTypeRef.reference.pointer) - .object(_$jni.JIteratorType(T)); + final _valueTypeRef = valueTypeRef?.reference ?? _$jni.jNullReference; + return _readValuesAs$1(reference.pointer, + _id_readValuesAs$1 as _$jni.JMethodIDPtr, _valueTypeRef.pointer) + .object(_$jni.JIteratorNullableType(T)); } static final _id_readValueAsTree = _class.instanceMethodId( @@ -4166,7 +4286,7 @@ class JsonParser extends _$jni.JObject { ///@return root of the document, or null if empty or whitespace. ///@throws IOException if there is either an underlying I/O problem or decoding /// issue at format layer - $T readValueAsTree<$T extends _$jni.JObject>({ + $T readValueAsTree<$T extends _$jni.JObject?>({ required _$jni.JObjType<$T> T, }) { return _readValueAsTree( @@ -4175,6 +4295,43 @@ class JsonParser extends _$jni.JObject { } } +final class $JsonParser$NullableType extends _$jni.JObjType { + @_$jni.internal + const $JsonParser$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/fasterxml/jackson/core/JsonParser;'; + + @_$jni.internal + @_$core.override + JsonParser? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : JsonParser.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonParser$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonParser$NullableType) && + other is $JsonParser$NullableType; + } +} + final class $JsonParser$Type extends _$jni.JObjType { @_$jni.internal const $JsonParser$Type(); @@ -4186,11 +4343,17 @@ final class $JsonParser$Type extends _$jni.JObjType { @_$jni.internal @_$core.override JsonParser fromReference(_$jni.JReference reference) => - JsonParser.fromReference(reference); + JsonParser.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonParser$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonToken.dart b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonToken.dart index 9a62b8eb7..bf4af714e 100644 --- a/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonToken.dart +++ b/pkgs/jnigen/test/jackson_core_test/third_party/bindings/com/fasterxml/jackson/core/JsonToken.dart @@ -70,6 +70,7 @@ class JsonToken extends _$jni.JObject { _$jni.JClass.forName(r'com/fasterxml/jackson/core/JsonToken'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonToken$NullableType(); static const type = $JsonToken$Type(); static final _id_values = _class.staticMethodId( r'values', @@ -90,9 +91,9 @@ class JsonToken extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonToken[] values()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray values() { + static _$jni.JArray? values() { return _values(_class.reference.pointer, _id_values as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType($JsonToken$Type())); + .object(const _$jni.JArrayNullableType($JsonToken$NullableType())); } static final _id_valueOf = _class.staticMethodId( @@ -113,12 +114,13 @@ class JsonToken extends _$jni.JObject { /// from: `static public com.fasterxml.jackson.core.JsonToken valueOf(java.lang.String name)` /// The returned object must be released after use, by calling the [release] method. - static JsonToken valueOf( - _$jni.JString name, + static JsonToken? valueOf( + _$jni.JString? name, ) { + final _name = name?.reference ?? _$jni.jNullReference; return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, - name.reference.pointer) - .object(const $JsonToken$Type()); + _name.pointer) + .object(const $JsonToken$NullableType()); } static final _id_id = _class.instanceMethodId( @@ -162,9 +164,9 @@ class JsonToken extends _$jni.JObject { /// from: `public final java.lang.String asString()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JString asString() { + _$jni.JString? asString() { return _asString(reference.pointer, _id_asString as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_asCharArray = _class.instanceMethodId( @@ -186,10 +188,10 @@ class JsonToken extends _$jni.JObject { /// from: `public final char[] asCharArray()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.jchar> asCharArray() { + _$jni.JArray<_$jni.jchar>? asCharArray() { return _asCharArray( reference.pointer, _id_asCharArray as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType(_$jni.jcharType())); + .object(const _$jni.JArrayNullableType(_$jni.jcharType())); } static final _id_asByteArray = _class.instanceMethodId( @@ -211,10 +213,10 @@ class JsonToken extends _$jni.JObject { /// from: `public final byte[] asByteArray()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.jbyte> asByteArray() { + _$jni.JArray<_$jni.jbyte>? asByteArray() { return _asByteArray( reference.pointer, _id_asByteArray as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType(_$jni.jbyteType())); + .object(const _$jni.JArrayNullableType(_$jni.jbyteType())); } static final _id_isNumeric = _class.instanceMethodId( @@ -365,6 +367,43 @@ class JsonToken extends _$jni.JObject { } } +final class $JsonToken$NullableType extends _$jni.JObjType { + @_$jni.internal + const $JsonToken$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/fasterxml/jackson/core/JsonToken;'; + + @_$jni.internal + @_$core.override + JsonToken? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : JsonToken.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonToken$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonToken$NullableType) && + other is $JsonToken$NullableType; + } +} + final class $JsonToken$Type extends _$jni.JObjType { @_$jni.internal const $JsonToken$Type(); @@ -376,11 +415,17 @@ final class $JsonToken$Type extends _$jni.JObjType { @_$jni.internal @_$core.override JsonToken fromReference(_$jni.JReference reference) => - JsonToken.fromReference(reference); + JsonToken.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonToken$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/test/kotlin_test/bindings/kotlin.dart b/pkgs/jnigen/test/kotlin_test/bindings/kotlin.dart index 9209bad65..515bbcba2 100644 --- a/pkgs/jnigen/test/kotlin_test/bindings/kotlin.dart +++ b/pkgs/jnigen/test/kotlin_test/bindings/kotlin.dart @@ -39,7 +39,7 @@ import 'package:jni/_internal.dart' as _$jni; import 'package:jni/jni.dart' as _$jni; /// from: `com.github.dart_lang.jnigen.Measure` -class Measure<$T extends _$jni.JObject> extends _$jni.JObject { +class Measure<$T extends _$jni.JObject?> extends _$jni.JObject { @_$jni.internal @_$core.override final _$jni.JObjType> $type; @@ -58,10 +58,18 @@ class Measure<$T extends _$jni.JObject> extends _$jni.JObject { _$jni.JClass.forName(r'com/github/dart_lang/jnigen/Measure'); /// The type which includes information such as the signature of this class. - static $Measure$Type<$T> type<$T extends _$jni.JObject>( + static $Measure$NullableType<$T> nullableType<$T extends _$jni.JObject?>( _$jni.JObjType<$T> T, ) { - return $Measure$Type( + return $Measure$NullableType<$T>( + T, + ); + } + + static $Measure$Type<$T> type<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $Measure$Type<$T>( T, ); } @@ -133,15 +141,59 @@ class Measure<$T extends _$jni.JObject> extends _$jni.JObject { double convertValue( $T measureUnit, ) { - return _convertValue( - reference.pointer, - _id_convertValue as _$jni.JMethodIDPtr, - measureUnit.reference.pointer) + final _measureUnit = measureUnit?.reference ?? _$jni.jNullReference; + return _convertValue(reference.pointer, + _id_convertValue as _$jni.JMethodIDPtr, _measureUnit.pointer) .float; } } -final class $Measure$Type<$T extends _$jni.JObject> +final class $Measure$NullableType<$T extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $Measure$NullableType( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/Measure;'; + + @_$jni.internal + @_$core.override + Measure<$T>? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Measure.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($Measure$NullableType, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Measure$NullableType<$T>) && + other is $Measure$NullableType<$T> && + T == other.T; + } +} + +final class $Measure$Type<$T extends _$jni.JObject?> extends _$jni.JObjType> { @_$jni.internal final _$jni.JObjType<$T> T; @@ -158,11 +210,17 @@ final class $Measure$Type<$T extends _$jni.JObject> @_$jni.internal @_$core.override Measure<$T> fromReference(_$jni.JReference reference) => - Measure.fromReference(T, reference); + Measure.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType?> get nullableType => $Measure$NullableType(T); @_$jni.internal @_$core.override @@ -195,6 +253,7 @@ class MeasureUnit extends _$jni.JObject { _$jni.JClass.forName(r'com/github/dart_lang/jnigen/MeasureUnit'); /// The type which includes information such as the signature of this class. + static const nullableType = $MeasureUnit$NullableType(); static const type = $MeasureUnit$Type(); static final _id_getSign = _class.instanceMethodId( r'getSign', @@ -215,9 +274,9 @@ class MeasureUnit extends _$jni.JObject { /// from: `public abstract java.lang.String getSign()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JString getSign() { + _$jni.JString? getSign() { return _getSign(reference.pointer, _id_getSign as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getCoefficient = _class.instanceMethodId( @@ -329,25 +388,25 @@ class MeasureUnit extends _$jni.JObject { abstract base mixin class $MeasureUnit { factory $MeasureUnit({ - required _$jni.JString Function() getSign, + required _$jni.JString? Function() getSign, required double Function() getCoefficient, }) = _$MeasureUnit; - _$jni.JString getSign(); + _$jni.JString? getSign(); double getCoefficient(); } final class _$MeasureUnit with $MeasureUnit { _$MeasureUnit({ - required _$jni.JString Function() getSign, + required _$jni.JString? Function() getSign, required double Function() getCoefficient, }) : _getSign = getSign, _getCoefficient = getCoefficient; - final _$jni.JString Function() _getSign; + final _$jni.JString? Function() _getSign; final double Function() _getCoefficient; - _$jni.JString getSign() { + _$jni.JString? getSign() { return _getSign(); } @@ -356,6 +415,43 @@ final class _$MeasureUnit with $MeasureUnit { } } +final class $MeasureUnit$NullableType extends _$jni.JObjType { + @_$jni.internal + const $MeasureUnit$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/MeasureUnit;'; + + @_$jni.internal + @_$core.override + MeasureUnit? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : MeasureUnit.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MeasureUnit$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MeasureUnit$NullableType) && + other is $MeasureUnit$NullableType; + } +} + final class $MeasureUnit$Type extends _$jni.JObjType { @_$jni.internal const $MeasureUnit$Type(); @@ -367,11 +463,17 @@ final class $MeasureUnit$Type extends _$jni.JObjType { @_$jni.internal @_$core.override MeasureUnit fromReference(_$jni.JReference reference) => - MeasureUnit.fromReference(reference); + MeasureUnit.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $MeasureUnit$NullableType(); @_$jni.internal @_$core.override @@ -388,7 +490,7 @@ final class $MeasureUnit$Type extends _$jni.JObjType { } /// from: `com.github.dart_lang.jnigen.Speed` -class Speed extends Measure { +class Speed extends Measure { @_$jni.internal @_$core.override final _$jni.JObjType $type; @@ -397,12 +499,13 @@ class Speed extends Measure { Speed.fromReference( _$jni.JReference reference, ) : $type = type, - super.fromReference(const $SpeedUnit$Type(), reference); + super.fromReference(const $SpeedUnit$NullableType(), reference); static final _class = _$jni.JClass.forName(r'com/github/dart_lang/jnigen/Speed'); /// The type which includes information such as the signature of this class. + static const nullableType = $Speed$NullableType(); static const type = $Speed$Type(); static final _id_new$ = _class.constructorId( r'(FLcom/github/dart_lang/jnigen/SpeedUnit;)V', @@ -426,10 +529,11 @@ class Speed extends Measure { /// The returned object must be released after use, by calling the [release] method. factory Speed( double f, - SpeedUnit speedUnit, + SpeedUnit? speedUnit, ) { + final _speedUnit = speedUnit?.reference ?? _$jni.jNullReference; return Speed.fromReference(_new$(_class.reference.pointer, - _id_new$ as _$jni.JMethodIDPtr, f, speedUnit.reference.pointer) + _id_new$ as _$jni.JMethodIDPtr, f, _speedUnit.pointer) .reference); } @@ -475,9 +579,9 @@ class Speed extends Measure { /// from: `public com.github.dart_lang.jnigen.SpeedUnit getUnit()` /// The returned object must be released after use, by calling the [release] method. - SpeedUnit getUnit$1() { + SpeedUnit? getUnit$1() { return _getUnit$1(reference.pointer, _id_getUnit$1 as _$jni.JMethodIDPtr) - .object(const $SpeedUnit$Type()); + .object(const $SpeedUnit$NullableType()); } static final _id_toString$1 = _class.instanceMethodId( @@ -499,9 +603,9 @@ class Speed extends Measure { /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JString toString$1() { + _$jni.JString? toString$1() { return _toString$1(reference.pointer, _id_toString$1 as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_component1 = _class.instanceMethodId( @@ -546,9 +650,9 @@ class Speed extends Measure { /// from: `public final com.github.dart_lang.jnigen.SpeedUnit component2()` /// The returned object must be released after use, by calling the [release] method. - SpeedUnit component2() { + SpeedUnit? component2() { return _component2(reference.pointer, _id_component2 as _$jni.JMethodIDPtr) - .object(const $SpeedUnit$Type()); + .object(const $SpeedUnit$NullableType()); } static final _id_copy = _class.instanceMethodId( @@ -572,13 +676,14 @@ class Speed extends Measure { /// from: `public final com.github.dart_lang.jnigen.Speed copy(float f, com.github.dart_lang.jnigen.SpeedUnit speedUnit)` /// The returned object must be released after use, by calling the [release] method. - Speed copy( + Speed? copy( double f, - SpeedUnit speedUnit, + SpeedUnit? speedUnit, ) { + final _speedUnit = speedUnit?.reference ?? _$jni.jNullReference; return _copy(reference.pointer, _id_copy as _$jni.JMethodIDPtr, f, - speedUnit.reference.pointer) - .object(const $Speed$Type()); + _speedUnit.pointer) + .object(const $Speed$NullableType()); } static final _id_hashCode$1 = _class.instanceMethodId( @@ -622,14 +727,53 @@ class Speed extends Measure { /// from: `public boolean equals(java.lang.Object object)` bool equals( - _$jni.JObject object, + _$jni.JObject? object, ) { + final _object = object?.reference ?? _$jni.jNullReference; return _equals(reference.pointer, _id_equals as _$jni.JMethodIDPtr, - object.reference.pointer) + _object.pointer) .boolean; } } +final class $Speed$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Speed$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/Speed;'; + + @_$jni.internal + @_$core.override + Speed? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Speed.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $Measure$NullableType($SpeedUnit$NullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => ($Speed$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Speed$NullableType) && + other is $Speed$NullableType; + } +} + final class $Speed$Type extends _$jni.JObjType { @_$jni.internal const $Speed$Type(); @@ -640,12 +784,17 @@ final class $Speed$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - Speed fromReference(_$jni.JReference reference) => - Speed.fromReference(reference); + Speed fromReference(_$jni.JReference reference) => Speed.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $Measure$NullableType($SpeedUnit$NullableType()); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const $Measure$Type($SpeedUnit$Type()); + _$jni.JObjType get nullableType => const $Speed$NullableType(); @_$jni.internal @_$core.override @@ -676,6 +825,7 @@ class SpeedUnit extends _$jni.JObject { _$jni.JClass.forName(r'com/github/dart_lang/jnigen/SpeedUnit'); /// The type which includes information such as the signature of this class. + static const nullableType = $SpeedUnit$NullableType(); static const type = $SpeedUnit$Type(); static final _id_KmPerHour = _class.staticFieldId( r'KmPerHour', @@ -684,8 +834,8 @@ class SpeedUnit extends _$jni.JObject { /// from: `static public final com.github.dart_lang.jnigen.SpeedUnit KmPerHour` /// The returned object must be released after use, by calling the [release] method. - static SpeedUnit get KmPerHour => - _id_KmPerHour.get(_class, const $SpeedUnit$Type()); + static SpeedUnit? get KmPerHour => + _id_KmPerHour.get(_class, const $SpeedUnit$NullableType()); static final _id_MetrePerSec = _class.staticFieldId( r'MetrePerSec', @@ -694,8 +844,8 @@ class SpeedUnit extends _$jni.JObject { /// from: `static public final com.github.dart_lang.jnigen.SpeedUnit MetrePerSec` /// The returned object must be released after use, by calling the [release] method. - static SpeedUnit get MetrePerSec => - _id_MetrePerSec.get(_class, const $SpeedUnit$Type()); + static SpeedUnit? get MetrePerSec => + _id_MetrePerSec.get(_class, const $SpeedUnit$NullableType()); static final _id_getSign = _class.instanceMethodId( r'getSign', @@ -716,9 +866,9 @@ class SpeedUnit extends _$jni.JObject { /// from: `public java.lang.String getSign()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JString getSign() { + _$jni.JString? getSign() { return _getSign(reference.pointer, _id_getSign as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); + .object(const _$jni.JStringNullableType()); } static final _id_getCoefficient = _class.instanceMethodId( @@ -764,9 +914,9 @@ class SpeedUnit extends _$jni.JObject { /// from: `static public com.github.dart_lang.jnigen.SpeedUnit[] values()` /// The returned object must be released after use, by calling the [release] method. - static _$jni.JArray values() { + static _$jni.JArray? values() { return _values(_class.reference.pointer, _id_values as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType($SpeedUnit$Type())); + .object(const _$jni.JArrayNullableType($SpeedUnit$NullableType())); } static final _id_valueOf = _class.staticMethodId( @@ -787,12 +937,50 @@ class SpeedUnit extends _$jni.JObject { /// from: `static public com.github.dart_lang.jnigen.SpeedUnit valueOf(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - static SpeedUnit valueOf( - _$jni.JString string, + static SpeedUnit? valueOf( + _$jni.JString? string, ) { + final _string = string?.reference ?? _$jni.jNullReference; return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, - string.reference.pointer) - .object(const $SpeedUnit$Type()); + _string.pointer) + .object(const $SpeedUnit$NullableType()); + } +} + +final class $SpeedUnit$NullableType extends _$jni.JObjType { + @_$jni.internal + const $SpeedUnit$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/SpeedUnit;'; + + @_$jni.internal + @_$core.override + SpeedUnit? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : SpeedUnit.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($SpeedUnit$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($SpeedUnit$NullableType) && + other is $SpeedUnit$NullableType; } } @@ -807,11 +995,17 @@ final class $SpeedUnit$Type extends _$jni.JObjType { @_$jni.internal @_$core.override SpeedUnit fromReference(_$jni.JReference reference) => - SpeedUnit.fromReference(reference); + SpeedUnit.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $SpeedUnit$NullableType(); @_$jni.internal @_$core.override @@ -842,6 +1036,7 @@ class SuspendFun extends _$jni.JObject { _$jni.JClass.forName(r'com/github/dart_lang/jnigen/SuspendFun'); /// The type which includes information such as the signature of this class. + static const nullableType = $SuspendFun$NullableType(); static const type = $SuspendFun$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -885,20 +1080,23 @@ class SuspendFun extends _$jni.JObject { /// from: `public final java.lang.Object sayHello(kotlin.coroutines.Continuation continuation)` /// The returned object must be released after use, by calling the [release] method. - _$core.Future<_$jni.JString> sayHello() async { + _$core.Future<_$jni.JString?> sayHello() async { final $p = _$jni.ReceivePort(); - final $c = _$jni.JObject.fromReference( - _$jni.ProtectedJniExtensions.newPortContinuation($p)); - _sayHello(reference.pointer, _id_sayHello as _$jni.JMethodIDPtr, - $c.reference.pointer) - .object(const _$jni.JObjectType()); + final _$c = _$jni.ProtectedJniExtensions.newPortContinuation($p); + + _sayHello( + reference.pointer, _id_sayHello as _$jni.JMethodIDPtr, _$c.pointer) + .object(const _$jni.JObjectNullableType()); + _$c.release(); final $o = _$jni.JGlobalReference(_$jni.JObjectPtr.fromAddress(await $p.first)); - final $k = const _$jni.JStringType().jClass.reference.pointer; - if (!_$jni.Jni.env.IsInstanceOf($o.pointer, $k)) { + final $k = const _$jni.JStringNullableType().jClass.reference; + if (!_$jni.Jni.env.IsInstanceOf($o.pointer, $k.pointer)) { + $k.release(); throw 'Failed'; } - return const _$jni.JStringType().fromReference($o); + $k.release(); + return const _$jni.JStringNullableType().fromReference($o); } static final _id_sayHello$1 = _class.instanceMethodId( @@ -925,22 +1123,62 @@ class SuspendFun extends _$jni.JObject { /// from: `public final java.lang.Object sayHello(java.lang.String string, kotlin.coroutines.Continuation continuation)` /// The returned object must be released after use, by calling the [release] method. - _$core.Future<_$jni.JString> sayHello$1( - _$jni.JString string, + _$core.Future<_$jni.JString?> sayHello$1( + _$jni.JString? string, ) async { final $p = _$jni.ReceivePort(); - final $c = _$jni.JObject.fromReference( - _$jni.ProtectedJniExtensions.newPortContinuation($p)); + final _$c = _$jni.ProtectedJniExtensions.newPortContinuation($p); + final _string = string?.reference ?? _$jni.jNullReference; _sayHello$1(reference.pointer, _id_sayHello$1 as _$jni.JMethodIDPtr, - string.reference.pointer, $c.reference.pointer) - .object(const _$jni.JObjectType()); + _string.pointer, _$c.pointer) + .object(const _$jni.JObjectNullableType()); + _$c.release(); final $o = _$jni.JGlobalReference(_$jni.JObjectPtr.fromAddress(await $p.first)); - final $k = const _$jni.JStringType().jClass.reference.pointer; - if (!_$jni.Jni.env.IsInstanceOf($o.pointer, $k)) { + final $k = const _$jni.JStringNullableType().jClass.reference; + if (!_$jni.Jni.env.IsInstanceOf($o.pointer, $k.pointer)) { + $k.release(); throw 'Failed'; } - return const _$jni.JStringType().fromReference($o); + $k.release(); + return const _$jni.JStringNullableType().fromReference($o); + } +} + +final class $SuspendFun$NullableType extends _$jni.JObjType { + @_$jni.internal + const $SuspendFun$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/SuspendFun;'; + + @_$jni.internal + @_$core.override + SuspendFun? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : SuspendFun.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($SuspendFun$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($SuspendFun$NullableType) && + other is $SuspendFun$NullableType; } } @@ -955,11 +1193,17 @@ final class $SuspendFun$Type extends _$jni.JObjType { @_$jni.internal @_$core.override SuspendFun fromReference(_$jni.JReference reference) => - SuspendFun.fromReference(reference); + SuspendFun.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $SuspendFun$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart b/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart index 6003f7791..1dca0b082 100644 --- a/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart +++ b/pkgs/jnigen/test/kotlin_test/runtime_test_registrant.dart @@ -13,11 +13,11 @@ void registerTests(String groupName, TestRunnerCallback test) { test('Suspend functions', () async { await using((arena) async { final suspendFun = SuspendFun()..releasedBy(arena); - final hello = await suspendFun.sayHello(); + final hello = (await suspendFun.sayHello())!; expect(hello.toDartString(releaseOriginal: true), 'Hello!'); const name = 'Bob'; final helloBob = - await suspendFun.sayHello$1(name.toJString()..releasedBy(arena)); + (await suspendFun.sayHello$1(name.toJString()..releasedBy(arena)))!; expect(helloBob.toDartString(releaseOriginal: true), 'Hello $name!'); }); }); diff --git a/pkgs/jnigen/test/simple_package_test/bindings/simple_package.dart b/pkgs/jnigen/test/simple_package_test/bindings/simple_package.dart index a3b14088f..9000c361d 100644 --- a/pkgs/jnigen/test/simple_package_test/bindings/simple_package.dart +++ b/pkgs/jnigen/test/simple_package_test/bindings/simple_package.dart @@ -38,846 +38,9029 @@ import 'dart:core' as _$core; import 'package:jni/_internal.dart' as _$jni; import 'package:jni/jni.dart' as _$jni; -/// from: `com.github.dart_lang.jnigen.annotations.Annotated$Nested` -class Annotated_Nested<$T extends _$jni.JObject?, $U extends _$jni.JObject?, - $W extends _$jni.JObject, $V extends _$jni.JObject?> extends _$jni.JObject { +/// from: `com.github.dart_lang.jnigen.simple_package.Color` +class Color extends _$jni.JObject { @_$jni.internal @_$core.override - final _$jni.JObjType> $type; - - @_$jni.internal - final _$jni.JObjType<$T> T; - - @_$jni.internal - final _$jni.JObjType<$U> U; - - @_$jni.internal - final _$jni.JObjType<$W> W; + final _$jni.JObjType $type; @_$jni.internal - final _$jni.JObjType<$V> V; - - @_$jni.internal - Annotated_Nested.fromReference( - this.T, - this.U, - this.W, - this.V, + Color.fromReference( _$jni.JReference reference, - ) : $type = type(T, U, W, V), + ) : $type = type, super.fromReference(reference); - static final _class = _$jni.JClass.forName( - r'com/github/dart_lang/jnigen/annotations/Annotated$Nested'); + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/simple_package/Color'); /// The type which includes information such as the signature of this class. - static $Annotated_Nested$Type<$T, $U, $W, $V> type< - $T extends _$jni.JObject?, - $U extends _$jni.JObject?, - $W extends _$jni.JObject, - $V extends _$jni.JObject?>( - _$jni.JObjType<$T> T, - _$jni.JObjType<$U> U, - _$jni.JObjType<$W> W, - _$jni.JObjType<$V> V, - ) { - return $Annotated_Nested$Type( - T, - U, - W, - V, - ); - } + static const nullableType = $Color$NullableType(); + static const type = $Color$Type(); + static final _id_RED = _class.staticFieldId( + r'RED', + r'Lcom/github/dart_lang/jnigen/simple_package/Color;', + ); - static final _id_v = _class.instanceFieldId( - r'v', - r'Ljava/lang/Object;', + /// from: `static public final com.github.dart_lang.jnigen.simple_package.Color RED` + /// The returned object must be released after use, by calling the [release] method. + static Color? get RED => _id_RED.get(_class, const $Color$NullableType()); + + static final _id_BLUE = _class.staticFieldId( + r'BLUE', + r'Lcom/github/dart_lang/jnigen/simple_package/Color;', ); - /// from: `public V v` + /// from: `static public final com.github.dart_lang.jnigen.simple_package.Color BLUE` /// The returned object must be released after use, by calling the [release] method. - $V? get v => _id_v.get(this, V); + static Color? get BLUE => _id_BLUE.get(_class, const $Color$NullableType()); - /// from: `public V v` + static final _id_BLACK = _class.staticFieldId( + r'BLACK', + r'Lcom/github/dart_lang/jnigen/simple_package/Color;', + ); + + /// from: `static public final com.github.dart_lang.jnigen.simple_package.Color BLACK` /// The returned object must be released after use, by calling the [release] method. - set v($V? value) => _id_v.set(this, V, value); + static Color? get BLACK => _id_BLACK.get(_class, const $Color$NullableType()); - static final _id_u = _class.instanceFieldId( - r'u', - r'Ljava/lang/Object;', + static final _id_GREEN = _class.staticFieldId( + r'GREEN', + r'Lcom/github/dart_lang/jnigen/simple_package/Color;', ); - /// from: `public U u` + /// from: `static public final com.github.dart_lang.jnigen.simple_package.Color GREEN` /// The returned object must be released after use, by calling the [release] method. - $U get u => _id_u.get(this, U); + static Color? get GREEN => _id_GREEN.get(_class, const $Color$NullableType()); - /// from: `public U u` + static final _id_YELLOW = _class.staticFieldId( + r'YELLOW', + r'Lcom/github/dart_lang/jnigen/simple_package/Color;', + ); + + /// from: `static public final com.github.dart_lang.jnigen.simple_package.Color YELLOW` /// The returned object must be released after use, by calling the [release] method. - set u($U value) => _id_u.set(this, U, value); + static Color? get YELLOW => + _id_YELLOW.get(_class, const $Color$NullableType()); - static final _id_new$ = _class.constructorId( - r'(Lcom/github/dart_lang/jnigen/annotations/Annotated;Ljava/lang/Object;)V', + static final _id_LIME = _class.staticFieldId( + r'LIME', + r'Lcom/github/dart_lang/jnigen/simple_package/Color;', ); - static final _new$ = _$jni.ProtectedJniExtensions.lookup< + /// from: `static public final com.github.dart_lang.jnigen.simple_package.Color LIME` + /// The returned object must be released after use, by calling the [release] method. + static Color? get LIME => _id_LIME.get(_class, const $Color$NullableType()); + + static final _id_values = _class.staticMethodId( + r'values', + r'()[Lcom/github/dart_lang/jnigen/simple_package/Color;', + ); + + static final _values = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs< - ( - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void> - )>)>>('globalEnv_NewObject') + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') .asFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>)>(); + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: `public void (com.github.dart_lang.jnigen.annotations.Annotated annotated, V object)` + /// from: `static public com.github.dart_lang.jnigen.simple_package.Color[] values()` /// The returned object must be released after use, by calling the [release] method. - factory Annotated_Nested( - Annotated<_$jni.JObject, _$jni.JObject, _$jni.JObject>? annotated, - $V? object, { - required _$jni.JObjType<$T> T, - required _$jni.JObjType<$U> U, - required _$jni.JObjType<$W> W, - required _$jni.JObjType<$V> V, - }) { - final _annotated = annotated?.reference; - final _object = object?.reference; - return Annotated_Nested.fromReference( - T, - U, - W, - V, - _new$( - _class.reference.pointer, - _id_new$ as _$jni.JMethodIDPtr, - _annotated?.pointer ?? _$jni.nullptr, - _object?.pointer ?? _$jni.nullptr) - .reference); + static _$jni.JArray? values() { + return _values(_class.reference.pointer, _id_values as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayNullableType($Color$NullableType())); } -} -final class $Annotated_Nested$Type< - $T extends _$jni.JObject?, - $U extends _$jni.JObject?, - $W extends _$jni.JObject, - $V extends _$jni.JObject?> - extends _$jni.JObjType> { - @_$jni.internal - final _$jni.JObjType<$T> T; + static final _id_valueOf = _class.staticMethodId( + r'valueOf', + r'(Ljava/lang/String;)Lcom/github/dart_lang/jnigen/simple_package/Color;', + ); - @_$jni.internal - final _$jni.JObjType<$U> U; + static final _valueOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - @_$jni.internal - final _$jni.JObjType<$W> W; + /// from: `static public com.github.dart_lang.jnigen.simple_package.Color valueOf(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static Color? valueOf( + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, + _string.pointer) + .object(const $Color$NullableType()); + } +} +final class $Color$NullableType extends _$jni.JObjType { @_$jni.internal - final _$jni.JObjType<$V> V; + const $Color$NullableType(); @_$jni.internal - const $Annotated_Nested$Type( - this.T, - this.U, - this.W, - this.V, - ); + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/simple_package/Color;'; @_$jni.internal @_$core.override - String get signature => - r'Lcom/github/dart_lang/jnigen/annotations/Annotated$Nested;'; - + Color? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Color.fromReference( + reference, + ); @_$jni.internal @_$core.override - Annotated_Nested<$T, $U, $W, $V> fromReference(_$jni.JReference reference) => - Annotated_Nested.fromReference(T, U, W, V, reference); + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => this; @_$jni.internal @_$core.override final superCount = 1; @_$core.override - int get hashCode => Object.hash($Annotated_Nested$Type, T, U, W, V); + int get hashCode => ($Color$NullableType).hashCode; @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Annotated_Nested$Type<$T, $U, $W, $V>) && - other is $Annotated_Nested$Type<$T, $U, $W, $V> && - T == other.T && - U == other.U && - W == other.W && - V == other.V; + return other.runtimeType == ($Color$NullableType) && + other is $Color$NullableType; } } -/// from: `com.github.dart_lang.jnigen.annotations.Annotated` -class Annotated<$T extends _$jni.JObject?, $U extends _$jni.JObject?, - $W extends _$jni.JObject> extends _$jni.JObject { +final class $Color$Type extends _$jni.JObjType { @_$jni.internal - @_$core.override - final _$jni.JObjType> $type; + const $Color$Type(); @_$jni.internal - final _$jni.JObjType<$T> T; + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/simple_package/Color;'; @_$jni.internal - final _$jni.JObjType<$U> U; + @_$core.override + Color fromReference(_$jni.JReference reference) => Color.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal - final _$jni.JObjType<$W> W; + @_$core.override + _$jni.JObjType get nullableType => const $Color$NullableType(); @_$jni.internal - Annotated.fromReference( - this.T, - this.U, - this.W, - _$jni.JReference reference, - ) : $type = type(T, U, W), - super.fromReference(reference); + @_$core.override + final superCount = 1; - static final _class = _$jni.JClass.forName( - r'com/github/dart_lang/jnigen/annotations/Annotated'); + @_$core.override + int get hashCode => ($Color$Type).hashCode; - /// The type which includes information such as the signature of this class. - static $Annotated$Type<$T, $U, $W> type<$T extends _$jni.JObject?, - $U extends _$jni.JObject?, $W extends _$jni.JObject>( - _$jni.JObjType<$T> T, - _$jni.JObjType<$U> U, - _$jni.JObjType<$W> W, - ) { - return $Annotated$Type( - T, - U, - W, - ); + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Color$Type) && other is $Color$Type; } +} - static final _id_t = _class.instanceFieldId( - r't', - r'Ljava/lang/Object;', - ); - - /// from: `public T t` - /// The returned object must be released after use, by calling the [release] method. - $T? get t => _id_t.get(this, T); - - /// from: `public T t` - /// The returned object must be released after use, by calling the [release] method. - set t($T? value) => _id_t.set(this, T, value); - - static final _id_u = _class.instanceFieldId( - r'u', - r'Ljava/lang/Object;', - ); +/// from: `com.github.dart_lang.jnigen.simple_package.Example$Nested$NestedTwice` +class Example_Nested_NestedTwice extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; - /// from: `public U u` - /// The returned object must be released after use, by calling the [release] method. - $U? get u => _id_u.get(this, U); + @_$jni.internal + Example_Nested_NestedTwice.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - /// from: `public U u` - /// The returned object must be released after use, by calling the [release] method. - set u($U? value) => _id_u.set(this, U, value); + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/simple_package/Example$Nested$NestedTwice'); - static final _id_w = _class.instanceFieldId( - r'w', - r'Ljava/lang/Object;', + /// The type which includes information such as the signature of this class. + static const nullableType = $Example_Nested_NestedTwice$NullableType(); + static const type = $Example_Nested_NestedTwice$Type(); + static final _id_ZERO = _class.staticFieldId( + r'ZERO', + r'I', ); - /// from: `public W w` - /// The returned object must be released after use, by calling the [release] method. - $W? get w => _id_w.get(this, W); + /// from: `static public int ZERO` + static int get ZERO => _id_ZERO.get(_class, const _$jni.jintType()); - /// from: `public W w` - /// The returned object must be released after use, by calling the [release] method. - set w($W? value) => _id_w.set(this, W, value); + /// from: `static public int ZERO` + static set ZERO(int value) => + _id_ZERO.set(_class, const _$jni.jintType(), value); static final _id_new$ = _class.constructorId( - r'(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V', + r'()V', ); static final _new$ = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs< - ( - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void> - )>)>>('globalEnv_NewObject') + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') .asFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>)>(); + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: `public void (T object, U object1, W object2)` + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. - factory Annotated( - $T? object, - $U? object1, - $W? object2, { - required _$jni.JObjType<$T> T, - required _$jni.JObjType<$U> U, - required _$jni.JObjType<$W> W, - }) { - final _object = object?.reference; - final _object1 = object1?.reference; - final _object2 = object2?.reference; - return Annotated.fromReference( - T, - U, - W, - _new$( - _class.reference.pointer, - _id_new$ as _$jni.JMethodIDPtr, - _object?.pointer ?? _$jni.nullptr, - _object1?.pointer ?? _$jni.nullptr, - _object2?.pointer ?? _$jni.nullptr) + factory Example_Nested_NestedTwice() { + return Example_Nested_NestedTwice.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } +} - static final _id_hello = _class.instanceMethodId( - r'hello', - r'()Ljava/lang/String;', - ); - - static final _hello = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>(); - - /// from: `public java.lang.String hello()` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JString hello() { - return _hello(reference.pointer, _id_hello as _$jni.JMethodIDPtr) - .object(const _$jni.JStringType()); - } +final class $Example_Nested_NestedTwice$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $Example_Nested_NestedTwice$NullableType(); - static final _id_nullableHello = _class.instanceMethodId( - r'nullableHello', - r'(Z)Ljava/lang/String;', - ); + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example$Nested$NestedTwice;'; - static final _nullableHello = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + @_$jni.internal + @_$core.override + Example_Nested_NestedTwice? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : Example_Nested_NestedTwice.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); - /// from: `public java.lang.String nullableHello(boolean z)` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JString? nullableHello( - bool z, - ) { - return _nullableHello(reference.pointer, - _id_nullableHello as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const _$jni.JStringType()); - } + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; - static final _id_echo = _class.instanceMethodId( - r'echo', - r'(Ljava/lang/String;)Ljava/lang/String;', - ); + @_$jni.internal + @_$core.override + final superCount = 1; - static final _echo = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + @_$core.override + int get hashCode => ($Example_Nested_NestedTwice$NullableType).hashCode; - /// from: `public java.lang.String echo(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JString echo( - _$jni.JString string, - ) { - final _string = string?.reference; - return _echo( - reference.pointer, _id_echo as _$jni.JMethodIDPtr, _string.pointer) - .object(const _$jni.JStringType()); + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example_Nested_NestedTwice$NullableType) && + other is $Example_Nested_NestedTwice$NullableType; } +} - static final _id_nullableEcho = _class.instanceMethodId( - r'nullableEcho', - r'(Ljava/lang/String;)Ljava/lang/String;', - ); - - static final _nullableEcho = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - - /// from: `public java.lang.String nullableEcho(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JString? nullableEcho( - _$jni.JString? string, - ) { - final _string = string?.reference; - return _nullableEcho( - reference.pointer, - _id_nullableEcho as _$jni.JMethodIDPtr, - _string?.pointer ?? _$jni.nullptr) - .object(const _$jni.JStringType()); - } +final class $Example_Nested_NestedTwice$Type + extends _$jni.JObjType { + @_$jni.internal + const $Example_Nested_NestedTwice$Type(); - static final _id_array = _class.instanceMethodId( - r'array', - r'()[Ljava/lang/String;', - ); + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example$Nested$NestedTwice;'; - static final _array = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>(); + @_$jni.internal + @_$core.override + Example_Nested_NestedTwice fromReference(_$jni.JReference reference) => + Example_Nested_NestedTwice.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); - /// from: `public java.lang.String[] array()` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.JString> array() { - return _array(reference.pointer, _id_array as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType(_$jni.JStringType())); - } + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $Example_Nested_NestedTwice$NullableType(); - static final _id_arrayOfNullable = _class.instanceMethodId( - r'arrayOfNullable', - r'()[Ljava/lang/String;', - ); + @_$jni.internal + @_$core.override + final superCount = 1; - static final _arrayOfNullable = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>(); + @_$core.override + int get hashCode => ($Example_Nested_NestedTwice$Type).hashCode; - /// from: `public java.lang.String[] arrayOfNullable()` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.JString?> arrayOfNullable() { - return _arrayOfNullable( - reference.pointer, _id_arrayOfNullable as _$jni.JMethodIDPtr) - .object(const _$jni.JArrayType(_$jni.JStringType())); + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example_Nested_NestedTwice$Type) && + other is $Example_Nested_NestedTwice$Type; } +} - static final _id_nullableArray = _class.instanceMethodId( - r'nullableArray', - r'(Z)[Ljava/lang/String;', - ); +/// from: `com.github.dart_lang.jnigen.simple_package.Example$Nested` +class Example_Nested extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; - static final _nullableArray = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + @_$jni.internal + Example_Nested.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - /// from: `public java.lang.String[] nullableArray(boolean z)` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.JString>? nullableArray( - bool z, - ) { - return _nullableArray(reference.pointer, - _id_nullableArray as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const _$jni.JArrayType(_$jni.JStringType())); - } + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/simple_package/Example$Nested'); - static final _id_nullableArrayOfNullable = _class.instanceMethodId( - r'nullableArrayOfNullable', - r'(Z)[Ljava/lang/String;', + /// The type which includes information such as the signature of this class. + static const nullableType = $Example_Nested$NullableType(); + static const type = $Example_Nested$Type(); + static final _id_new$ = _class.constructorId( + r'(Z)V', ); - static final _nullableArrayOfNullable = _$jni.ProtectedJniExtensions.lookup< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_NewObject') .asFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: `public java.lang.String[] nullableArrayOfNullable(boolean z)` + /// from: `public void (boolean z)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JArray<_$jni.JString?>? nullableArrayOfNullable( + factory Example_Nested( bool z, ) { - return _nullableArrayOfNullable(reference.pointer, - _id_nullableArrayOfNullable as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const _$jni.JArrayType(_$jni.JStringType())); + return Example_Nested.fromReference(_new$( + _class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, z ? 1 : 0) + .reference); } - static final _id_list = _class.instanceMethodId( - r'list', - r'()Ljava/util/List;', + static final _id_usesAnonymousInnerClass = _class.instanceMethodId( + r'usesAnonymousInnerClass', + r'()V', ); - static final _list = _$jni.ProtectedJniExtensions.lookup< + static final _usesAnonymousInnerClass = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< - _$jni.JniResult Function( + _$jni.JThrowablePtr Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + )>>('globalEnv_CallVoidMethod') .asFunction< - _$jni.JniResult Function( + _$jni.JThrowablePtr Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, )>(); - /// from: `public java.util.List list()` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JString> list() { - return _list(reference.pointer, _id_list as _$jni.JMethodIDPtr) - .object(const _$jni.JListType(_$jni.JStringType())); + /// from: `public void usesAnonymousInnerClass()` + void usesAnonymousInnerClass() { + _usesAnonymousInnerClass(reference.pointer, + _id_usesAnonymousInnerClass as _$jni.JMethodIDPtr) + .check(); } - static final _id_listOfNullable = _class.instanceMethodId( - r'listOfNullable', - r'()Ljava/util/List;', + static final _id_getValue = _class.instanceMethodId( + r'getValue', + r'()Z', ); - static final _listOfNullable = _$jni.ProtectedJniExtensions.lookup< + static final _getValue = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + )>>('globalEnv_CallBooleanMethod') .asFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, )>(); - /// from: `public java.util.List listOfNullable()` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JString?> listOfNullable() { - return _listOfNullable( - reference.pointer, _id_listOfNullable as _$jni.JMethodIDPtr) - .object(const _$jni.JListType(_$jni.JStringType())); + /// from: `public boolean getValue()` + bool getValue() { + return _getValue(reference.pointer, _id_getValue as _$jni.JMethodIDPtr) + .boolean; } - static final _id_nullableList = _class.instanceMethodId( - r'nullableList', - r'(Z)Ljava/util/List;', + static final _id_setValue = _class.instanceMethodId( + r'setValue', + r'(Z)V', ); - static final _nullableList = _$jni.ProtectedJniExtensions.lookup< + static final _setValue = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< - _$jni.JniResult Function( + _$jni.JThrowablePtr Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< - _$jni.JniResult Function( + _$jni.JThrowablePtr Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: `public java.util.List nullableList(boolean z)` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JString>? nullableList( + /// from: `public void setValue(boolean z)` + void setValue( bool z, ) { - return _nullableList(reference.pointer, - _id_nullableList as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const _$jni.JListType(_$jni.JStringType())); + _setValue(reference.pointer, _id_setValue as _$jni.JMethodIDPtr, z ? 1 : 0) + .check(); } +} - static final _id_nullableListOfNullable = _class.instanceMethodId( - r'nullableListOfNullable', - r'(Z)Ljava/util/List;', - ); +final class $Example_Nested$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $Example_Nested$NullableType(); - static final _nullableListOfNullable = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;'; - /// from: `public java.util.List nullableListOfNullable(boolean z)` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JString?>? nullableListOfNullable( - bool z, - ) { - return _nullableListOfNullable(reference.pointer, - _id_nullableListOfNullable as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const _$jni.JListType(_$jni.JStringType())); - } + @_$jni.internal + @_$core.override + Example_Nested? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Example_Nested.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); - static final _id_classGenericEcho = _class.instanceMethodId( - r'classGenericEcho', - r'(Ljava/lang/Object;)Ljava/lang/Object;', - ); + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; - static final _classGenericEcho = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + @_$jni.internal + @_$core.override + final superCount = 1; - /// from: `public T classGenericEcho(T object)` - /// The returned object must be released after use, by calling the [release] method. - $T classGenericEcho( - $T object, - ) { - final _object = object?.reference; - return _classGenericEcho(reference.pointer, - _id_classGenericEcho as _$jni.JMethodIDPtr, _object.pointer) - .object(T); + @_$core.override + int get hashCode => ($Example_Nested$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example_Nested$NullableType) && + other is $Example_Nested$NullableType; } +} - static final _id_nullableClassGenericEcho = _class.instanceMethodId( - r'nullableClassGenericEcho', - r'(Ljava/lang/Object;)Ljava/lang/Object;', - ); +final class $Example_Nested$Type extends _$jni.JObjType { + @_$jni.internal + const $Example_Nested$Type(); - static final _nullableClassGenericEcho = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;'; - /// from: `public T nullableClassGenericEcho(T object)` - /// The returned object must be released after use, by calling the [release] method. - $T? nullableClassGenericEcho( - $T? object, - ) { - final _object = object?.reference; - return _nullableClassGenericEcho( - reference.pointer, - _id_nullableClassGenericEcho as _$jni.JMethodIDPtr, - _object?.pointer ?? _$jni.nullptr) - .object(T); - } + @_$jni.internal + @_$core.override + Example_Nested fromReference(_$jni.JReference reference) => + Example_Nested.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); - static final _id_methodGenericEcho = _class.instanceMethodId( - r'methodGenericEcho', - r'(Ljava/lang/Object;)Ljava/lang/Object;', - ); + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $Example_Nested$NullableType(); - static final _methodGenericEcho = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + @_$jni.internal + @_$core.override + final superCount = 1; - /// from: `public V methodGenericEcho(V object)` - /// The returned object must be released after use, by calling the [release] method. - $V methodGenericEcho<$V extends _$jni.JObject?>( - $V object, { - _$jni.JObjType<$V>? V, - }) { - T ??= _$jni.lowestCommonSuperType([ - (lt.$type as _$jni.JListType<_$core.dynamic>).E, - t.$type, - ]) as _$jni.JObjType<$T>; - _methodWithSeveralParams( - reference.pointer, - _id_methodGenericEcho2 as _$jni.JMethodIDPtr, - _object?.pointer ?? _$jni.nullptr) - .object(V); + @_$core.override + int get hashCode => ($Example_Nested$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example_Nested$Type) && + other is $Example_Nested$Type; } +} - static final _id_methodGenericEcho3 = _class.instanceMethodId( - r'methodGenericEcho3', - r'(Ljava/lang/Object;)Ljava/lang/Object;', - ); +/// from: `com.github.dart_lang.jnigen.simple_package.Example$NonStaticNested` +class Example_NonStaticNested extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; - static final _methodGenericEcho3 = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + @_$jni.internal + Example_NonStaticNested.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - /// from: `public V methodGenericEcho3(V object)` - /// The returned object must be released after use, by calling the [release] method. - $V? methodGenericEcho3<$V extends _$jni.JObject?>( - $V? object, { - required _$jni.JObjType<$V> V, - }) { - final _object = object?.reference; - return _methodGenericEcho3( - reference.pointer, - _id_methodGenericEcho3 as _$jni.JMethodIDPtr, - _object?.pointer ?? _$jni.nullptr) - .object(V); - } + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/simple_package/Example$NonStaticNested'); - static final _id_nullableReturnMethodGenericEcho = _class.instanceMethodId( - r'nullableReturnMethodGenericEcho', - r'(Ljava/lang/Object;Z)Ljava/lang/Object;', + /// The type which includes information such as the signature of this class. + static const nullableType = $Example_NonStaticNested$NullableType(); + static const type = $Example_NonStaticNested$Type(); + static final _id_ok = _class.instanceFieldId( + r'ok', + r'Z', ); - static final _nullableReturnMethodGenericEcho = - _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs< - ( - _$jni.Pointer<_$jni.Void>, - _$jni.Int32 - )>)>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); + /// from: `public boolean ok` + bool get ok => _id_ok.get(this, const _$jni.jbooleanType()); - /// from: `public V nullableReturnMethodGenericEcho(V object, boolean z)` - /// The returned object must be released after use, by calling the [release] method. - $V? nullableReturnMethodGenericEcho<$V extends _$jni.JObject?>( - $V object, - bool z, { - _$jni.JObjType<$V>? V, - }) { - V ??= _$jni.lowestCommonSuperType([ - object.$type, - ]) as _$jni.JObjType<$V>; - final _object = object?.reference; - return _nullableReturnMethodGenericEcho( - reference.pointer, - _id_nullableReturnMethodGenericEcho as _$jni.JMethodIDPtr, - _object.pointer, - z ? 1 : 0) - .object(V); - } + /// from: `public boolean ok` + set ok(bool value) => _id_ok.set(this, const _$jni.jbooleanType(), value); - static final _id_nullableMethodGenericEcho = _class.instanceMethodId( - r'nullableMethodGenericEcho', - r'(Ljava/lang/Object;)Ljava/lang/Object;', + static final _id_new$ = _class.constructorId( + r'(Lcom/github/dart_lang/jnigen/simple_package/Example;)V', ); - static final _nullableMethodGenericEcho = _$jni.ProtectedJniExtensions.lookup< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') + 'globalEnv_NewObject') .asFunction< _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: `public V nullableMethodGenericEcho(V object)` + /// from: `public void (com.github.dart_lang.jnigen.simple_package.Example $outerClass)` /// The returned object must be released after use, by calling the [release] method. - $V? nullableMethodGenericEcho<$V extends _$jni.JObject?>( - $V? object, { - required _$jni.JObjType<$V> V, - }) { - final _object = object?.reference; - return _nullableMethodGenericEcho( - reference.pointer, - _id_nullableMethodGenericEcho as _$jni.JMethodIDPtr, - _object?.pointer ?? _$jni.nullptr) - .object(V); + factory Example_NonStaticNested( + Example $outerClass, + ) { + final _$outerClass = $outerClass.reference; + return Example_NonStaticNested.fromReference(_new$(_class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, _$outerClass.pointer) + .reference); } +} - static final _id_nullableArgMethodGenericEcho = _class.instanceMethodId( - r'nullableArgMethodGenericEcho', - r'(Ljava/lang/Object;)Ljava/lang/Object;', - ); +final class $Example_NonStaticNested$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $Example_NonStaticNested$NullableType(); - static final _nullableArgMethodGenericEcho = - _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example$NonStaticNested;'; - /// from: `public V nullableArgMethodGenericEcho(V object)` - /// The returned object must be released after use, by calling the [release] method. - $V nullableArgMethodGenericEcho<$V extends _$jni.JObject?>( - $V? object, { - required _$jni.JObjType<$V> V, - }) { - final _object = object?.reference; - return _nullableArgMethodGenericEcho( - reference.pointer, - _id_nullableArgMethodGenericEcho as _$jni.JMethodIDPtr, - _object?.pointer ?? _$jni.nullptr) - .object(V); + @_$jni.internal + @_$core.override + Example_NonStaticNested? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : Example_NonStaticNested.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Example_NonStaticNested$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example_NonStaticNested$NullableType) && + other is $Example_NonStaticNested$NullableType; } +} - static final _id_classGenericList = _class.instanceMethodId( - r'classGenericList', - r'()Ljava/util/List;', +final class $Example_NonStaticNested$Type + extends _$jni.JObjType { + @_$jni.internal + const $Example_NonStaticNested$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example$NonStaticNested;'; + + @_$jni.internal + @_$core.override + Example_NonStaticNested fromReference(_$jni.JReference reference) => + Example_NonStaticNested.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $Example_NonStaticNested$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Example_NonStaticNested$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example_NonStaticNested$Type) && + other is $Example_NonStaticNested$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.simple_package.Example` +class Example extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + Example.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/simple_package/Example'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Example$NullableType(); + static const type = $Example$Type(); + + /// from: `static public final int ON` + static const ON = 1; + + /// from: `static public final int OFF` + static const OFF = 0; + + /// from: `static public final double PI` + static const PI = 3.14159; + + /// from: `static public final char SEMICOLON` + static const SEMICOLON = 59; + static final _id_SEMICOLON_STRING = _class.staticFieldId( + r'SEMICOLON_STRING', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String SEMICOLON_STRING` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JString? get SEMICOLON_STRING => + _id_SEMICOLON_STRING.get(_class, const _$jni.JStringNullableType()); + + static final _id_unusedRandom = _class.staticFieldId( + r'unusedRandom', + r'Ljava/util/Random;', + ); + + /// from: `static public final java.util.Random unusedRandom` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JObject? get unusedRandom => + _id_unusedRandom.get(_class, const _$jni.JObjectNullableType()); + + static final _id_getAmount = _class.staticMethodId( + r'getAmount', + r'()I', + ); + + static final _getAmount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public int getAmount()` + static int getAmount() { + return _getAmount( + _class.reference.pointer, _id_getAmount as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_getPi = _class.staticMethodId( + r'getPi', + r'()D', + ); + + static final _getPi = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticDoubleMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public double getPi()` + static double getPi() { + return _getPi(_class.reference.pointer, _id_getPi as _$jni.JMethodIDPtr) + .doubleFloat; + } + + static final _id_getAsterisk = _class.staticMethodId( + r'getAsterisk', + r'()C', + ); + + static final _getAsterisk = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticCharMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public char getAsterisk()` + static int getAsterisk() { + return _getAsterisk( + _class.reference.pointer, _id_getAsterisk as _$jni.JMethodIDPtr) + .char; + } + + static final _id_getName = _class.staticMethodId( + r'getName', + r'()Ljava/lang/String;', + ); + + static final _getName = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public java.lang.String getName()` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JString? getName() { + return _getName(_class.reference.pointer, _id_getName as _$jni.JMethodIDPtr) + .object(const _$jni.JStringNullableType()); + } + + static final _id_getNestedInstance = _class.staticMethodId( + r'getNestedInstance', + r'()Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;', + ); + + static final _getNestedInstance = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public com.github.dart_lang.jnigen.simple_package.Example$Nested getNestedInstance()` + /// The returned object must be released after use, by calling the [release] method. + static Example_Nested? getNestedInstance() { + return _getNestedInstance(_class.reference.pointer, + _id_getNestedInstance as _$jni.JMethodIDPtr) + .object(const $Example_Nested$NullableType()); + } + + static final _id_setAmount = _class.staticMethodId( + r'setAmount', + r'(I)V', + ); + + static final _setAmount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int32,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + + /// from: `static public void setAmount(int i)` + static void setAmount( + int i, + ) { + _setAmount(_class.reference.pointer, _id_setAmount as _$jni.JMethodIDPtr, i) + .check(); + } + + static final _id_setName = _class.staticMethodId( + r'setName', + r'(Ljava/lang/String;)V', + ); + + static final _setName = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public void setName(java.lang.String string)` + static void setName( + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + _setName(_class.reference.pointer, _id_setName as _$jni.JMethodIDPtr, + _string.pointer) + .check(); + } + + static final _id_setNestedInstance = _class.staticMethodId( + r'setNestedInstance', + r'(Lcom/github/dart_lang/jnigen/simple_package/Example$Nested;)V', + ); + + static final _setNestedInstance = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public void setNestedInstance(com.github.dart_lang.jnigen.simple_package.Example$Nested nested)` + static void setNestedInstance( + Example_Nested? nested, + ) { + final _nested = nested?.reference ?? _$jni.jNullReference; + _setNestedInstance(_class.reference.pointer, + _id_setNestedInstance as _$jni.JMethodIDPtr, _nested.pointer) + .check(); + } + + static final _id_max4 = _class.staticMethodId( + r'max4', + r'(IIII)I', + ); + + static final _max4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_CallStaticIntMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, int, int)>(); + + /// from: `static public int max4(int i, int i1, int i2, int i3)` + static int max4( + int i, + int i1, + int i2, + int i3, + ) { + return _max4(_class.reference.pointer, _id_max4 as _$jni.JMethodIDPtr, i, + i1, i2, i3) + .integer; + } + + static final _id_max8 = _class.staticMethodId( + r'max8', + r'(IIIIIIII)I', + ); + + static final _max8 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_CallStaticIntMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, int, int, int, int, int, int)>(); + + /// from: `static public int max8(int i, int i1, int i2, int i3, int i4, int i5, int i6, int i7)` + static int max8( + int i, + int i1, + int i2, + int i3, + int i4, + int i5, + int i6, + int i7, + ) { + return _max8(_class.reference.pointer, _id_max8 as _$jni.JMethodIDPtr, i, + i1, i2, i3, i4, i5, i6, i7) + .integer; + } + + static final _id_getNumber = _class.instanceMethodId( + r'getNumber', + r'()I', + ); + + static final _getNumber = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int getNumber()` + int getNumber() { + return _getNumber(reference.pointer, _id_getNumber as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_setNumber = _class.instanceMethodId( + r'setNumber', + r'(I)V', + ); + + static final _setNumber = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + + /// from: `public void setNumber(int i)` + void setNumber( + int i, + ) { + _setNumber(reference.pointer, _id_setNumber as _$jni.JMethodIDPtr, i) + .check(); + } + + static final _id_getIsUp = _class.instanceMethodId( + r'getIsUp', + r'()Z', + ); + + static final _getIsUp = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public boolean getIsUp()` + bool getIsUp() { + return _getIsUp(reference.pointer, _id_getIsUp as _$jni.JMethodIDPtr) + .boolean; + } + + static final _id_setUp = _class.instanceMethodId( + r'setUp', + r'(Z)V', + ); + + static final _setUp = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + + /// from: `public void setUp(boolean z)` + void setUp( + bool z, + ) { + _setUp(reference.pointer, _id_setUp as _$jni.JMethodIDPtr, z ? 1 : 0) + .check(); + } + + static final _id_getCodename = _class.instanceMethodId( + r'getCodename', + r'()Ljava/lang/String;', + ); + + static final _getCodename = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getCodename()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JString? getCodename() { + return _getCodename( + reference.pointer, _id_getCodename as _$jni.JMethodIDPtr) + .object(const _$jni.JStringNullableType()); + } + + static final _id_setCodename = _class.instanceMethodId( + r'setCodename', + r'(Ljava/lang/String;)V', + ); + + static final _setCodename = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void setCodename(java.lang.String string)` + void setCodename( + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + _setCodename(reference.pointer, _id_setCodename as _$jni.JMethodIDPtr, + _string.pointer) + .check(); + } + + static final _id_getRandom = _class.instanceMethodId( + r'getRandom', + r'()Ljava/util/Random;', + ); + + static final _getRandom = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public java.util.Random getRandom()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject? getRandom() { + return _getRandom(reference.pointer, _id_getRandom as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectNullableType()); + } + + static final _id_setRandom = _class.instanceMethodId( + r'setRandom', + r'(Ljava/util/Random;)V', + ); + + static final _setRandom = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void setRandom(java.util.Random random)` + void setRandom( + _$jni.JObject? random, + ) { + final _random = random?.reference ?? _$jni.jNullReference; + _setRandom(reference.pointer, _id_setRandom as _$jni.JMethodIDPtr, + _random.pointer) + .check(); + } + + static final _id_getRandomLong = _class.instanceMethodId( + r'getRandomLong', + r'()J', + ); + + static final _getRandomLong = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public long getRandomLong()` + int getRandomLong() { + return _getRandomLong( + reference.pointer, _id_getRandomLong as _$jni.JMethodIDPtr) + .long; + } + + static final _id_add4Longs = _class.instanceMethodId( + r'add4Longs', + r'(JJJJ)J', + ); + + static final _add4Longs = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int64, + _$jni.Int64, + _$jni.Int64, + _$jni.Int64 + )>)>>('globalEnv_CallLongMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, int, int)>(); + + /// from: `public long add4Longs(long j, long j1, long j2, long j3)` + int add4Longs( + int j, + int j1, + int j2, + int j3, + ) { + return _add4Longs(reference.pointer, _id_add4Longs as _$jni.JMethodIDPtr, j, + j1, j2, j3) + .long; + } + + static final _id_add8Longs = _class.instanceMethodId( + r'add8Longs', + r'(JJJJJJJJ)J', + ); + + static final _add8Longs = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int64, + _$jni.Int64, + _$jni.Int64, + _$jni.Int64, + _$jni.Int64, + _$jni.Int64, + _$jni.Int64, + _$jni.Int64 + )>)>>('globalEnv_CallLongMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, int, int, int, int, int, int)>(); + + /// from: `public long add8Longs(long j, long j1, long j2, long j3, long j4, long j5, long j6, long j7)` + int add8Longs( + int j, + int j1, + int j2, + int j3, + int j4, + int j5, + int j6, + int j7, + ) { + return _add8Longs(reference.pointer, _id_add8Longs as _$jni.JMethodIDPtr, j, + j1, j2, j3, j4, j5, j6, j7) + .long; + } + + static final _id_getRandomNumericString = _class.instanceMethodId( + r'getRandomNumericString', + r'(Ljava/util/Random;)Ljava/lang/String;', + ); + + static final _getRandomNumericString = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public java.lang.String getRandomNumericString(java.util.Random random)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JString? getRandomNumericString( + _$jni.JObject? random, + ) { + final _random = random?.reference ?? _$jni.jNullReference; + return _getRandomNumericString(reference.pointer, + _id_getRandomNumericString as _$jni.JMethodIDPtr, _random.pointer) + .object(const _$jni.JStringNullableType()); + } + + static final _id_finalMethod = _class.instanceMethodId( + r'finalMethod', + r'()V', + ); + + static final _finalMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public final void finalMethod()` + void finalMethod() { + _finalMethod(reference.pointer, _id_finalMethod as _$jni.JMethodIDPtr) + .check(); + } + + 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.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public java.util.List getList()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<_$jni.JString?>? getList() { + return _getList(reference.pointer, _id_getList as _$jni.JMethodIDPtr) + .object(const _$jni.JListNullableType(_$jni.JStringNullableType())); + } + + static final _id_joinStrings = _class.instanceMethodId( + r'joinStrings', + r'(Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _joinStrings = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public java.lang.String joinStrings(java.util.List list, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JString? joinStrings( + _$jni.JList<_$jni.JString?>? list, + _$jni.JString? string, + ) { + final _list = list?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; + return _joinStrings( + reference.pointer, + _id_joinStrings as _$jni.JMethodIDPtr, + _list.pointer, + _string.pointer) + .object(const _$jni.JStringNullableType()); + } + + static final _id_methodWithSeveralParams = _class.instanceMethodId( + r'methodWithSeveralParams', + r'(CLjava/lang/String;[ILjava/lang/CharSequence;Ljava/util/List;Ljava/util/Map;)V', + ); + + static final _methodWithSeveralParams = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int32, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + int, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void methodWithSeveralParams(char c, java.lang.String string, java.lang.Object[] is, T charSequence, java.util.List list, java.util.Map map)` + void methodWithSeveralParams<$T extends _$jni.JObject?>( + int c, + _$jni.JString? string, + _$jni.JArray<_$jni.jint>? is$, + $T charSequence, + _$jni.JList<$T>? list, + _$jni.JMap<_$jni.JString?, _$jni.JObject>? map, { + required _$jni.JObjType<$T> T, + }) { + final _string = string?.reference ?? _$jni.jNullReference; + final _is$ = is$?.reference ?? _$jni.jNullReference; + final _charSequence = charSequence?.reference ?? _$jni.jNullReference; + final _list = list?.reference ?? _$jni.jNullReference; + final _map = map?.reference ?? _$jni.jNullReference; + _methodWithSeveralParams( + reference.pointer, + _id_methodWithSeveralParams as _$jni.JMethodIDPtr, + c, + _string.pointer, + _is$.pointer, + _charSequence.pointer, + _list.pointer, + _map.pointer) + .check(); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Example() { + return Example.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(I)V', + ); + + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + + /// from: `public void (int i)` + /// The returned object must be released after use, by calling the [release] method. + factory Example.new$1( + int i, + ) { + return Example.fromReference( + _new$1(_class.reference.pointer, _id_new$1 as _$jni.JMethodIDPtr, i) + .reference); + } + + static final _id_new$2 = _class.constructorId( + r'(IZ)V', + ); + + static final _new$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32, _$jni.Int32)>)>>( + 'globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int, int)>(); + + /// from: `public void (int i, boolean z)` + /// The returned object must be released after use, by calling the [release] method. + factory Example.new$2( + int i, + bool z, + ) { + return Example.fromReference(_new$2(_class.reference.pointer, + _id_new$2 as _$jni.JMethodIDPtr, i, z ? 1 : 0) + .reference); + } + + static final _id_new$3 = _class.constructorId( + r'(IZLjava/lang/String;)V', + ); + + static final _new$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int32, + _$jni.Int32, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (int i, boolean z, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + factory Example.new$3( + int i, + bool z, + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + return Example.fromReference(_new$3(_class.reference.pointer, + _id_new$3 as _$jni.JMethodIDPtr, i, z ? 1 : 0, _string.pointer) + .reference); + } + + static final _id_new$4 = _class.constructorId( + r'(IIIIIIII)V', + ); + + static final _new$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, int, int, int, int, int, int)>(); + + /// from: `public void (int i, int i1, int i2, int i3, int i4, int i5, int i6, int i7)` + /// The returned object must be released after use, by calling the [release] method. + factory Example.new$4( + int i, + int i1, + int i2, + int i3, + int i4, + int i5, + int i6, + int i7, + ) { + return Example.fromReference(_new$4(_class.reference.pointer, + _id_new$4 as _$jni.JMethodIDPtr, i, i1, i2, i3, i4, i5, i6, i7) + .reference); + } + + static final _id_whichExample = _class.instanceMethodId( + r'whichExample', + r'()I', + ); + + static final _whichExample = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int whichExample()` + int whichExample() { + return _whichExample( + reference.pointer, _id_whichExample as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_addInts = _class.staticMethodId( + r'addInts', + r'(II)I', + ); + + static final _addInts = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32, _$jni.Int32)>)>>( + 'globalEnv_CallStaticIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int, int)>(); + + /// from: `static public int addInts(int i, int i1)` + static int addInts( + int i, + int i1, + ) { + return _addInts( + _class.reference.pointer, _id_addInts as _$jni.JMethodIDPtr, i, i1) + .integer; + } + + static final _id_getArr = _class.staticMethodId( + r'getArr', + r'()[I', + ); + + static final _getArr = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public int[] getArr()` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JArray<_$jni.jint>? getArr() { + return _getArr(_class.reference.pointer, _id_getArr as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayNullableType(_$jni.jintType())); + } + + static final _id_addAll = _class.staticMethodId( + r'addAll', + r'([I)I', + ); + + static final _addAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticIntMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public int addAll(int[] is)` + static int addAll( + _$jni.JArray<_$jni.jint>? is$, + ) { + final _is$ = is$?.reference ?? _$jni.jNullReference; + return _addAll(_class.reference.pointer, _id_addAll as _$jni.JMethodIDPtr, + _is$.pointer) + .integer; + } + + static final _id_getSelf = _class.instanceMethodId( + r'getSelf', + r'()Lcom/github/dart_lang/jnigen/simple_package/Example;', + ); + + static final _getSelf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public com.github.dart_lang.jnigen.simple_package.Example getSelf()` + /// The returned object must be released after use, by calling the [release] method. + Example? getSelf() { + return _getSelf(reference.pointer, _id_getSelf as _$jni.JMethodIDPtr) + .object(const $Example$NullableType()); + } + + static final _id_throwException = _class.staticMethodId( + r'throwException', + r'()V', + ); + + static final _throwException = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public void throwException()` + static void throwException() { + _throwException( + _class.reference.pointer, _id_throwException as _$jni.JMethodIDPtr) + .check(); + } + + static final _id_overloaded = _class.instanceMethodId( + r'overloaded', + r'()V', + ); + + static final _overloaded = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void overloaded()` + void overloaded() { + _overloaded(reference.pointer, _id_overloaded as _$jni.JMethodIDPtr) + .check(); + } + + static final _id_overloaded$1 = _class.instanceMethodId( + r'overloaded', + r'(ILjava/lang/String;)V', + ); + + static final _overloaded$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int32, _$jni.Pointer<_$jni.Void>)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void overloaded(int i, java.lang.String string)` + void overloaded$1( + int i, + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + _overloaded$1(reference.pointer, _id_overloaded$1 as _$jni.JMethodIDPtr, i, + _string.pointer) + .check(); + } + + static final _id_overloaded$2 = _class.instanceMethodId( + r'overloaded', + r'(I)V', + ); + + static final _overloaded$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + + /// from: `public void overloaded(int i)` + void overloaded$2( + int i, + ) { + _overloaded$2(reference.pointer, _id_overloaded$2 as _$jni.JMethodIDPtr, i) + .check(); + } + + static final _id_overloaded$3 = _class.instanceMethodId( + r'overloaded', + r'(Ljava/util/List;Ljava/lang/String;)V', + ); + + static final _overloaded$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void overloaded(java.util.List list, java.lang.String string)` + void overloaded$3( + _$jni.JList<_$jni.JInteger?>? list, + _$jni.JString? string, + ) { + final _list = list?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; + _overloaded$3(reference.pointer, _id_overloaded$3 as _$jni.JMethodIDPtr, + _list.pointer, _string.pointer) + .check(); + } + + static final _id_overloaded$4 = _class.instanceMethodId( + r'overloaded', + r'(Ljava/util/List;)V', + ); + + static final _overloaded$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void overloaded(java.util.List list)` + void overloaded$4( + _$jni.JList<_$jni.JInteger?>? list, + ) { + final _list = list?.reference ?? _$jni.jNullReference; + _overloaded$4(reference.pointer, _id_overloaded$4 as _$jni.JMethodIDPtr, + _list.pointer) + .check(); + } +} + +final class $Example$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Example$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example;'; + + @_$jni.internal + @_$core.override + Example? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Example.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Example$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example$NullableType) && + other is $Example$NullableType; + } +} + +final class $Example$Type extends _$jni.JObjType { + @_$jni.internal + const $Example$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Example;'; + + @_$jni.internal + @_$core.override + Example fromReference(_$jni.JReference reference) => Example.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => const $Example$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Example$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example$Type) && other is $Example$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.simple_package.Exceptions` +class Exceptions extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + Exceptions.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/simple_package/Exceptions'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Exceptions$NullableType(); + static const type = $Exceptions$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Exceptions() { + return Exceptions.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(F)V', + ); + + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Double,)>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, double)>(); + + /// from: `public void (float f)` + /// The returned object must be released after use, by calling the [release] method. + factory Exceptions.new$1( + double f, + ) { + return Exceptions.fromReference( + _new$1(_class.reference.pointer, _id_new$1 as _$jni.JMethodIDPtr, f) + .reference); + } + + static final _id_new$2 = _class.constructorId( + r'(IIIIII)V', + ); + + static final _new$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, int, int, int, int)>(); + + /// from: `public void (int i, int i1, int i2, int i3, int i4, int i5)` + /// The returned object must be released after use, by calling the [release] method. + factory Exceptions.new$2( + int i, + int i1, + int i2, + int i3, + int i4, + int i5, + ) { + return Exceptions.fromReference(_new$2(_class.reference.pointer, + _id_new$2 as _$jni.JMethodIDPtr, i, i1, i2, i3, i4, i5) + .reference); + } + + static final _id_staticObjectMethod = _class.staticMethodId( + r'staticObjectMethod', + r'()Ljava/lang/Object;', + ); + + static final _staticObjectMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public java.lang.Object staticObjectMethod()` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JObject? staticObjectMethod() { + return _staticObjectMethod(_class.reference.pointer, + _id_staticObjectMethod as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectNullableType()); + } + + static final _id_staticIntMethod = _class.staticMethodId( + r'staticIntMethod', + r'()I', + ); + + static final _staticIntMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public int staticIntMethod()` + static int staticIntMethod() { + return _staticIntMethod( + _class.reference.pointer, _id_staticIntMethod as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_staticObjectArrayMethod = _class.staticMethodId( + r'staticObjectArrayMethod', + r'()[Ljava/lang/Object;', + ); + + static final _staticObjectArrayMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public java.lang.Object[] staticObjectArrayMethod()` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JArray<_$jni.JObject?>? staticObjectArrayMethod() { + return _staticObjectArrayMethod(_class.reference.pointer, + _id_staticObjectArrayMethod as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayNullableType(_$jni.JObjectNullableType())); + } + + static final _id_staticIntArrayMethod = _class.staticMethodId( + r'staticIntArrayMethod', + r'()[I', + ); + + static final _staticIntArrayMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public int[] staticIntArrayMethod()` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JArray<_$jni.jint>? staticIntArrayMethod() { + return _staticIntArrayMethod(_class.reference.pointer, + _id_staticIntArrayMethod as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayNullableType(_$jni.jintType())); + } + + static final _id_objectMethod = _class.instanceMethodId( + r'objectMethod', + r'()Ljava/lang/Object;', + ); + + static final _objectMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public java.lang.Object objectMethod()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject? objectMethod() { + return _objectMethod( + reference.pointer, _id_objectMethod as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectNullableType()); + } + + static final _id_intMethod = _class.instanceMethodId( + r'intMethod', + r'()I', + ); + + static final _intMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int intMethod()` + int intMethod() { + return _intMethod(reference.pointer, _id_intMethod as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_objectArrayMethod = _class.instanceMethodId( + r'objectArrayMethod', + r'()[Ljava/lang/Object;', + ); + + static final _objectArrayMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public java.lang.Object[] objectArrayMethod()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JArray<_$jni.JObject?>? objectArrayMethod() { + return _objectArrayMethod( + reference.pointer, _id_objectArrayMethod as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayNullableType(_$jni.JObjectNullableType())); + } + + static final _id_intArrayMethod = _class.instanceMethodId( + r'intArrayMethod', + r'()[I', + ); + + static final _intArrayMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int[] intArrayMethod()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JArray<_$jni.jint>? intArrayMethod() { + return _intArrayMethod( + reference.pointer, _id_intArrayMethod as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayNullableType(_$jni.jintType())); + } + + static final _id_throwNullPointerException = _class.instanceMethodId( + r'throwNullPointerException', + r'()I', + ); + + static final _throwNullPointerException = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int throwNullPointerException()` + int throwNullPointerException() { + return _throwNullPointerException(reference.pointer, + _id_throwNullPointerException as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_throwFileNotFoundException = _class.instanceMethodId( + r'throwFileNotFoundException', + r'()Ljava/io/InputStream;', + ); + + static final _throwFileNotFoundException = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public java.io.InputStream throwFileNotFoundException()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject? throwFileNotFoundException() { + return _throwFileNotFoundException(reference.pointer, + _id_throwFileNotFoundException as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectNullableType()); + } + + static final _id_throwClassCastException = _class.instanceMethodId( + r'throwClassCastException', + r'()Ljava/io/FileInputStream;', + ); + + static final _throwClassCastException = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public java.io.FileInputStream throwClassCastException()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject? throwClassCastException() { + return _throwClassCastException(reference.pointer, + _id_throwClassCastException as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectNullableType()); + } + + static final _id_throwArrayIndexException = _class.instanceMethodId( + r'throwArrayIndexException', + r'()I', + ); + + static final _throwArrayIndexException = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int throwArrayIndexException()` + int throwArrayIndexException() { + return _throwArrayIndexException(reference.pointer, + _id_throwArrayIndexException as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_throwArithmeticException = _class.instanceMethodId( + r'throwArithmeticException', + r'()I', + ); + + static final _throwArithmeticException = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int throwArithmeticException()` + int throwArithmeticException() { + return _throwArithmeticException(reference.pointer, + _id_throwArithmeticException as _$jni.JMethodIDPtr) + .integer; + } + + static final _id_throwLoremIpsum = _class.staticMethodId( + r'throwLoremIpsum', + r'()V', + ); + + static final _throwLoremIpsum = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public void throwLoremIpsum()` + static void throwLoremIpsum() { + _throwLoremIpsum( + _class.reference.pointer, _id_throwLoremIpsum as _$jni.JMethodIDPtr) + .check(); + } +} + +final class $Exceptions$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Exceptions$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Exceptions;'; + + @_$jni.internal + @_$core.override + Exceptions? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Exceptions.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Exceptions$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Exceptions$NullableType) && + other is $Exceptions$NullableType; + } +} + +final class $Exceptions$Type extends _$jni.JObjType { + @_$jni.internal + const $Exceptions$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Exceptions;'; + + @_$jni.internal + @_$core.override + Exceptions fromReference(_$jni.JReference reference) => + Exceptions.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $Exceptions$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Exceptions$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Exceptions$Type) && other is $Exceptions$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.simple_package.Fields$Nested` +class Fields_Nested extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + Fields_Nested.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/simple_package/Fields$Nested'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Fields_Nested$NullableType(); + static const type = $Fields_Nested$Type(); + static final _id_hundred = _class.instanceFieldId( + r'hundred', + r'J', + ); + + /// from: `public long hundred` + int get hundred => _id_hundred.get(this, const _$jni.jlongType()); + + /// from: `public long hundred` + set hundred(int value) => + _id_hundred.set(this, const _$jni.jlongType(), value); + + static final _id_BEST_GOD = _class.staticFieldId( + r'BEST_GOD', + r'Ljava/lang/String;', + ); + + /// from: `static public java.lang.String BEST_GOD` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JString? get BEST_GOD => + _id_BEST_GOD.get(_class, const _$jni.JStringNullableType()); + + /// from: `static public java.lang.String BEST_GOD` + /// The returned object must be released after use, by calling the [release] method. + static set BEST_GOD(_$jni.JString? value) => + _id_BEST_GOD.set(_class, const _$jni.JStringNullableType(), value); + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Fields_Nested() { + return Fields_Nested.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $Fields_Nested$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Fields_Nested$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Fields$Nested;'; + + @_$jni.internal + @_$core.override + Fields_Nested? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Fields_Nested.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Fields_Nested$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Fields_Nested$NullableType) && + other is $Fields_Nested$NullableType; + } +} + +final class $Fields_Nested$Type extends _$jni.JObjType { + @_$jni.internal + const $Fields_Nested$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Fields$Nested;'; + + @_$jni.internal + @_$core.override + Fields_Nested fromReference(_$jni.JReference reference) => + Fields_Nested.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $Fields_Nested$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Fields_Nested$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Fields_Nested$Type) && + other is $Fields_Nested$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.simple_package.Fields` +class Fields extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + Fields.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/simple_package/Fields'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Fields$NullableType(); + static const type = $Fields$Type(); + static final _id_amount = _class.staticFieldId( + r'amount', + r'I', + ); + + /// from: `static public int amount` + static int get amount => _id_amount.get(_class, const _$jni.jintType()); + + /// from: `static public int amount` + static set amount(int value) => + _id_amount.set(_class, const _$jni.jintType(), value); + + static final _id_pi = _class.staticFieldId( + r'pi', + r'D', + ); + + /// from: `static public double pi` + static double get pi => _id_pi.get(_class, const _$jni.jdoubleType()); + + /// from: `static public double pi` + static set pi(double value) => + _id_pi.set(_class, const _$jni.jdoubleType(), value); + + static final _id_asterisk = _class.staticFieldId( + r'asterisk', + r'C', + ); + + /// from: `static public char asterisk` + static int get asterisk => _id_asterisk.get(_class, const _$jni.jcharType()); + + /// from: `static public char asterisk` + static set asterisk(int value) => + _id_asterisk.set(_class, const _$jni.jcharType(), value); + + static final _id_name = _class.staticFieldId( + r'name', + r'Ljava/lang/String;', + ); + + /// from: `static public java.lang.String name` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JString? get name => + _id_name.get(_class, const _$jni.JStringNullableType()); + + /// from: `static public java.lang.String name` + /// The returned object must be released after use, by calling the [release] method. + static set name(_$jni.JString? value) => + _id_name.set(_class, const _$jni.JStringNullableType(), value); + + static final _id_i = _class.instanceFieldId( + r'i', + r'Ljava/lang/Integer;', + ); + + /// from: `public java.lang.Integer i` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JInteger? get i => _id_i.get(this, const _$jni.JIntegerNullableType()); + + /// from: `public java.lang.Integer i` + /// The returned object must be released after use, by calling the [release] method. + set i(_$jni.JInteger? value) => + _id_i.set(this, const _$jni.JIntegerNullableType(), value); + + static final _id_trillion = _class.instanceFieldId( + r'trillion', + r'J', + ); + + /// from: `public long trillion` + int get trillion => _id_trillion.get(this, const _$jni.jlongType()); + + /// from: `public long trillion` + set trillion(int value) => + _id_trillion.set(this, const _$jni.jlongType(), value); + + static final _id_isAchillesDead = _class.instanceFieldId( + r'isAchillesDead', + r'Z', + ); + + /// from: `public boolean isAchillesDead` + bool get isAchillesDead => + _id_isAchillesDead.get(this, const _$jni.jbooleanType()); + + /// from: `public boolean isAchillesDead` + set isAchillesDead(bool value) => + _id_isAchillesDead.set(this, const _$jni.jbooleanType(), value); + + static final _id_bestFighterInGreece = _class.instanceFieldId( + r'bestFighterInGreece', + r'Ljava/lang/String;', + ); + + /// from: `public java.lang.String bestFighterInGreece` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JString? get bestFighterInGreece => + _id_bestFighterInGreece.get(this, const _$jni.JStringNullableType()); + + /// from: `public java.lang.String bestFighterInGreece` + /// The returned object must be released after use, by calling the [release] method. + set bestFighterInGreece(_$jni.JString? value) => _id_bestFighterInGreece.set( + this, const _$jni.JStringNullableType(), value); + + static final _id_random = _class.instanceFieldId( + r'random', + r'Ljava/util/Random;', + ); + + /// from: `public java.util.Random random` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject? get random => + _id_random.get(this, const _$jni.JObjectNullableType()); + + /// from: `public java.util.Random random` + /// The returned object must be released after use, by calling the [release] method. + set random(_$jni.JObject? value) => + _id_random.set(this, const _$jni.JObjectNullableType(), value); + + static final _id_euroSymbol = _class.staticFieldId( + r'euroSymbol', + r'C', + ); + + /// from: `static public char euroSymbol` + static int get euroSymbol => + _id_euroSymbol.get(_class, const _$jni.jcharType()); + + /// from: `static public char euroSymbol` + static set euroSymbol(int value) => + _id_euroSymbol.set(_class, const _$jni.jcharType(), value); + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Fields() { + return Fields.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $Fields$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Fields$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Fields;'; + + @_$jni.internal + @_$core.override + Fields? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Fields.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Fields$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Fields$NullableType) && + other is $Fields$NullableType; + } +} + +final class $Fields$Type extends _$jni.JObjType { + @_$jni.internal + const $Fields$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/simple_package/Fields;'; + + @_$jni.internal + @_$core.override + Fields fromReference(_$jni.JReference reference) => Fields.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => const $Fields$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Fields$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Fields$Type) && other is $Fields$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.pkg2.C2` +class C2 extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + C2.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/pkg2/C2'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $C2$NullableType(); + static const type = $C2$Type(); + static final _id_CONSTANT = _class.staticFieldId( + r'CONSTANT', + r'I', + ); + + /// from: `static public int CONSTANT` + static int get CONSTANT => _id_CONSTANT.get(_class, const _$jni.jintType()); + + /// from: `static public int CONSTANT` + static set CONSTANT(int value) => + _id_CONSTANT.set(_class, const _$jni.jintType(), value); + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory C2() { + return C2.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $C2$NullableType extends _$jni.JObjType { + @_$jni.internal + const $C2$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/pkg2/C2;'; + + @_$jni.internal + @_$core.override + C2? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : C2.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($C2$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($C2$NullableType) && other is $C2$NullableType; + } +} + +final class $C2$Type extends _$jni.JObjType { + @_$jni.internal + const $C2$Type(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/pkg2/C2;'; + + @_$jni.internal + @_$core.override + C2 fromReference(_$jni.JReference reference) => C2.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => const $C2$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($C2$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($C2$Type) && other is $C2$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.pkg2.Example` +class Example$1 extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + Example$1.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/pkg2/Example'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Example$1$NullableType(); + static const type = $Example$1$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Example$1() { + return Example$1.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } + + static final _id_whichExample = _class.instanceMethodId( + r'whichExample', + r'()I', + ); + + static final _whichExample = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int whichExample()` + int whichExample() { + return _whichExample( + reference.pointer, _id_whichExample as _$jni.JMethodIDPtr) + .integer; + } +} + +final class $Example$1$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Example$1$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/pkg2/Example;'; + + @_$jni.internal + @_$core.override + Example$1? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Example$1.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Example$1$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example$1$NullableType) && + other is $Example$1$NullableType; + } +} + +final class $Example$1$Type extends _$jni.JObjType { + @_$jni.internal + const $Example$1$Type(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/pkg2/Example;'; + + @_$jni.internal + @_$core.override + Example$1 fromReference(_$jni.JReference reference) => + Example$1.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $Example$1$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Example$1$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Example$1$Type) && other is $Example$1$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.GenericTypeParams` +class GenericTypeParams<$S extends _$jni.JObject?, $K extends _$jni.JObject?> + extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + GenericTypeParams.fromReference( + this.S, + this.K, + _$jni.JReference reference, + ) : $type = type(S, K), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/GenericTypeParams'); + + /// The type which includes information such as the signature of this class. + static $GenericTypeParams$NullableType<$S, $K> + nullableType<$S extends _$jni.JObject?, $K extends _$jni.JObject?>( + _$jni.JObjType<$S> S, + _$jni.JObjType<$K> K, + ) { + return $GenericTypeParams$NullableType<$S, $K>( + S, + K, + ); + } + + static $GenericTypeParams$Type<$S, $K> + type<$S extends _$jni.JObject?, $K extends _$jni.JObject?>( + _$jni.JObjType<$S> S, + _$jni.JObjType<$K> K, + ) { + return $GenericTypeParams$Type<$S, $K>( + S, + K, + ); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory GenericTypeParams({ + required _$jni.JObjType<$S> S, + required _$jni.JObjType<$K> K, + }) { + return GenericTypeParams.fromReference( + S, + K, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $GenericTypeParams$NullableType<$S extends _$jni.JObject?, + $K extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + const $GenericTypeParams$NullableType( + this.S, + this.K, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GenericTypeParams;'; + + @_$jni.internal + @_$core.override + GenericTypeParams<$S, $K>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : GenericTypeParams.fromReference( + S, + K, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GenericTypeParams$NullableType, S, K); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GenericTypeParams$NullableType<$S, $K>) && + other is $GenericTypeParams$NullableType<$S, $K> && + S == other.S && + K == other.K; + } +} + +final class $GenericTypeParams$Type<$S extends _$jni.JObject?, + $K extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + const $GenericTypeParams$Type( + this.S, + this.K, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GenericTypeParams;'; + + @_$jni.internal + @_$core.override + GenericTypeParams<$S, $K> fromReference(_$jni.JReference reference) => + GenericTypeParams.fromReference( + S, + K, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GenericTypeParams$NullableType(S, K); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GenericTypeParams$Type, S, K); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GenericTypeParams$Type<$S, $K>) && + other is $GenericTypeParams$Type<$S, $K> && + S == other.S && + K == other.K; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.GrandParent$Parent$Child` +class GrandParent_Parent_Child< + $T extends _$jni.JObject?, + $S extends _$jni.JObject?, + $U extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + GrandParent_Parent_Child.fromReference( + this.T, + this.S, + this.U, + _$jni.JReference reference, + ) : $type = type(T, S, U), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/GrandParent$Parent$Child'); + + /// The type which includes information such as the signature of this class. + static $GrandParent_Parent_Child$NullableType<$T, $S, $U> nullableType< + $T extends _$jni.JObject?, + $S extends _$jni.JObject?, + $U extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$S> S, + _$jni.JObjType<$U> U, + ) { + return $GrandParent_Parent_Child$NullableType<$T, $S, $U>( + T, + S, + U, + ); + } + + static $GrandParent_Parent_Child$Type<$T, $S, $U> type< + $T extends _$jni.JObject?, + $S extends _$jni.JObject?, + $U extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$S> S, + _$jni.JObjType<$U> U, + ) { + return $GrandParent_Parent_Child$Type<$T, $S, $U>( + T, + S, + U, + ); + } + + static final _id_grandParentValue = _class.instanceFieldId( + r'grandParentValue', + r'Ljava/lang/Object;', + ); + + /// from: `public T grandParentValue` + /// The returned object must be released after use, by calling the [release] method. + $T get grandParentValue => _id_grandParentValue.get(this, T); + + /// from: `public T grandParentValue` + /// The returned object must be released after use, by calling the [release] method. + set grandParentValue($T value) => _id_grandParentValue.set(this, T, value); + + static final _id_parentValue = _class.instanceFieldId( + r'parentValue', + r'Ljava/lang/Object;', + ); + + /// from: `public S parentValue` + /// The returned object must be released after use, by calling the [release] method. + $S get parentValue => _id_parentValue.get(this, S); + + /// from: `public S parentValue` + /// The returned object must be released after use, by calling the [release] method. + set parentValue($S value) => _id_parentValue.set(this, S, value); + + static final _id_value = _class.instanceFieldId( + r'value', + r'Ljava/lang/Object;', + ); + + /// from: `public U value` + /// The returned object must be released after use, by calling the [release] method. + $U get value => _id_value.get(this, U); + + /// from: `public U value` + /// The returned object must be released after use, by calling the [release] method. + set value($U value) => _id_value.set(this, U, value); + + static final _id_new$ = _class.constructorId( + r'(Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;Ljava/lang/Object;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (com.github.dart_lang.jnigen.generics.GrandParent$Parent $outerClass, U object)` + /// The returned object must be released after use, by calling the [release] method. + factory GrandParent_Parent_Child( + GrandParent_Parent<$T, $S> $outerClass, + $U object, { + _$jni.JObjType<$T>? T, + _$jni.JObjType<$S>? S, + required _$jni.JObjType<$U> U, + }) { + T ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type + as $GrandParent_Parent$Type<_$core.dynamic, _$core.dynamic>) + .T, + ]) as _$jni.JObjType<$T>; + S ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type + as $GrandParent_Parent$Type<_$core.dynamic, _$core.dynamic>) + .S, + ]) as _$jni.JObjType<$S>; + final _$outerClass = $outerClass.reference; + final _object = object?.reference ?? _$jni.jNullReference; + return GrandParent_Parent_Child.fromReference( + T, + S, + U, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _$outerClass.pointer, _object.pointer) + .reference); + } +} + +final class $GrandParent_Parent_Child$NullableType<$T extends _$jni.JObject?, + $S extends _$jni.JObject?, $U extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + const $GrandParent_Parent_Child$NullableType( + this.T, + this.S, + this.U, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent$Child;'; + + @_$jni.internal + @_$core.override + GrandParent_Parent_Child<$T, $S, $U>? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : GrandParent_Parent_Child.fromReference( + T, + S, + U, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => + Object.hash($GrandParent_Parent_Child$NullableType, T, S, U); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($GrandParent_Parent_Child$NullableType<$T, $S, $U>) && + other is $GrandParent_Parent_Child$NullableType<$T, $S, $U> && + T == other.T && + S == other.S && + U == other.U; + } +} + +final class $GrandParent_Parent_Child$Type<$T extends _$jni.JObject?, + $S extends _$jni.JObject?, $U extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + const $GrandParent_Parent_Child$Type( + this.T, + this.S, + this.U, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent$Child;'; + + @_$jni.internal + @_$core.override + GrandParent_Parent_Child<$T, $S, $U> fromReference( + _$jni.JReference reference) => + GrandParent_Parent_Child.fromReference( + T, + S, + U, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GrandParent_Parent_Child$NullableType(T, S, U); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent_Parent_Child$Type, T, S, U); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GrandParent_Parent_Child$Type<$T, $S, $U>) && + other is $GrandParent_Parent_Child$Type<$T, $S, $U> && + T == other.T && + S == other.S && + U == other.U; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.GrandParent$Parent` +class GrandParent_Parent<$T extends _$jni.JObject?, $S extends _$jni.JObject?> + extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + GrandParent_Parent.fromReference( + this.T, + this.S, + _$jni.JReference reference, + ) : $type = type(T, S), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/GrandParent$Parent'); + + /// The type which includes information such as the signature of this class. + static $GrandParent_Parent$NullableType<$T, $S> + nullableType<$T extends _$jni.JObject?, $S extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$S> S, + ) { + return $GrandParent_Parent$NullableType<$T, $S>( + T, + S, + ); + } + + static $GrandParent_Parent$Type<$T, $S> + type<$T extends _$jni.JObject?, $S extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$S> S, + ) { + return $GrandParent_Parent$Type<$T, $S>( + T, + S, + ); + } + + static final _id_parentValue = _class.instanceFieldId( + r'parentValue', + r'Ljava/lang/Object;', + ); + + /// from: `public T parentValue` + /// The returned object must be released after use, by calling the [release] method. + $T get parentValue => _id_parentValue.get(this, T); + + /// from: `public T parentValue` + /// The returned object must be released after use, by calling the [release] method. + set parentValue($T value) => _id_parentValue.set(this, T, value); + + static final _id_value = _class.instanceFieldId( + r'value', + r'Ljava/lang/Object;', + ); + + /// from: `public S value` + /// The returned object must be released after use, by calling the [release] method. + $S get value => _id_value.get(this, S); + + /// from: `public S value` + /// The returned object must be released after use, by calling the [release] method. + set value($S value) => _id_value.set(this, S, value); + + static final _id_new$ = _class.constructorId( + r'(Lcom/github/dart_lang/jnigen/generics/GrandParent;Ljava/lang/Object;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (com.github.dart_lang.jnigen.generics.GrandParent $outerClass, S object)` + /// The returned object must be released after use, by calling the [release] method. + factory GrandParent_Parent( + GrandParent<$T> $outerClass, + $S object, { + _$jni.JObjType<$T>? T, + required _$jni.JObjType<$S> S, + }) { + T ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type as $GrandParent$Type<_$core.dynamic>).T, + ]) as _$jni.JObjType<$T>; + final _$outerClass = $outerClass.reference; + final _object = object?.reference ?? _$jni.jNullReference; + return GrandParent_Parent.fromReference( + T, + S, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _$outerClass.pointer, _object.pointer) + .reference); + } +} + +final class $GrandParent_Parent$NullableType<$T extends _$jni.JObject?, + $S extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + const $GrandParent_Parent$NullableType( + this.T, + this.S, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;'; + + @_$jni.internal + @_$core.override + GrandParent_Parent<$T, $S>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : GrandParent_Parent.fromReference( + T, + S, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent_Parent$NullableType, T, S); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GrandParent_Parent$NullableType<$T, $S>) && + other is $GrandParent_Parent$NullableType<$T, $S> && + T == other.T && + S == other.S; + } +} + +final class $GrandParent_Parent$Type<$T extends _$jni.JObject?, + $S extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + const $GrandParent_Parent$Type( + this.T, + this.S, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;'; + + @_$jni.internal + @_$core.override + GrandParent_Parent<$T, $S> fromReference(_$jni.JReference reference) => + GrandParent_Parent.fromReference( + T, + S, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GrandParent_Parent$NullableType(T, S); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent_Parent$Type, T, S); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GrandParent_Parent$Type<$T, $S>) && + other is $GrandParent_Parent$Type<$T, $S> && + T == other.T && + S == other.S; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.GrandParent$StaticParent$Child` +class GrandParent_StaticParent_Child<$S extends _$jni.JObject?, + $U extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + GrandParent_StaticParent_Child.fromReference( + this.S, + this.U, + _$jni.JReference reference, + ) : $type = type(S, U), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child'); + + /// The type which includes information such as the signature of this class. + static $GrandParent_StaticParent_Child$NullableType<$S, $U> + nullableType<$S extends _$jni.JObject?, $U extends _$jni.JObject?>( + _$jni.JObjType<$S> S, + _$jni.JObjType<$U> U, + ) { + return $GrandParent_StaticParent_Child$NullableType<$S, $U>( + S, + U, + ); + } + + static $GrandParent_StaticParent_Child$Type<$S, $U> + type<$S extends _$jni.JObject?, $U extends _$jni.JObject?>( + _$jni.JObjType<$S> S, + _$jni.JObjType<$U> U, + ) { + return $GrandParent_StaticParent_Child$Type<$S, $U>( + S, + U, + ); + } + + static final _id_parentValue = _class.instanceFieldId( + r'parentValue', + r'Ljava/lang/Object;', + ); + + /// from: `public S parentValue` + /// The returned object must be released after use, by calling the [release] method. + $S get parentValue => _id_parentValue.get(this, S); + + /// from: `public S parentValue` + /// The returned object must be released after use, by calling the [release] method. + set parentValue($S value) => _id_parentValue.set(this, S, value); + + static final _id_value = _class.instanceFieldId( + r'value', + r'Ljava/lang/Object;', + ); + + /// from: `public U value` + /// The returned object must be released after use, by calling the [release] method. + $U get value => _id_value.get(this, U); + + /// from: `public U value` + /// The returned object must be released after use, by calling the [release] method. + set value($U value) => _id_value.set(this, U, value); + + static final _id_new$ = _class.constructorId( + r'(Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;Ljava/lang/Object;Ljava/lang/Object;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (com.github.dart_lang.jnigen.generics.GrandParent$StaticParent $outerClass, S object, U object1)` + /// The returned object must be released after use, by calling the [release] method. + factory GrandParent_StaticParent_Child( + GrandParent_StaticParent<$S> $outerClass, + $S object, + $U object1, { + _$jni.JObjType<$S>? S, + required _$jni.JObjType<$U> U, + }) { + S ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type as $GrandParent_StaticParent$Type<_$core.dynamic>).S, + ]) as _$jni.JObjType<$S>; + final _$outerClass = $outerClass.reference; + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; + return GrandParent_StaticParent_Child.fromReference( + S, + U, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _$outerClass.pointer, _object.pointer, _object1.pointer) + .reference); + } +} + +final class $GrandParent_StaticParent_Child$NullableType< + $S extends _$jni.JObject?, $U extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + const $GrandParent_StaticParent_Child$NullableType( + this.S, + this.U, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child;'; + + @_$jni.internal + @_$core.override + GrandParent_StaticParent_Child<$S, $U>? fromReference( + _$jni.JReference reference) => + reference.isNull + ? null + : GrandParent_StaticParent_Child.fromReference( + S, + U, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => + Object.hash($GrandParent_StaticParent_Child$NullableType, S, U); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($GrandParent_StaticParent_Child$NullableType<$S, $U>) && + other is $GrandParent_StaticParent_Child$NullableType<$S, $U> && + S == other.S && + U == other.U; + } +} + +final class $GrandParent_StaticParent_Child$Type<$S extends _$jni.JObject?, + $U extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + const $GrandParent_StaticParent_Child$Type( + this.S, + this.U, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child;'; + + @_$jni.internal + @_$core.override + GrandParent_StaticParent_Child<$S, $U> fromReference( + _$jni.JReference reference) => + GrandParent_StaticParent_Child.fromReference( + S, + U, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GrandParent_StaticParent_Child$NullableType(S, U); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent_StaticParent_Child$Type, S, U); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($GrandParent_StaticParent_Child$Type<$S, $U>) && + other is $GrandParent_StaticParent_Child$Type<$S, $U> && + S == other.S && + U == other.U; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.GrandParent$StaticParent` +class GrandParent_StaticParent<$S extends _$jni.JObject?> + extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + GrandParent_StaticParent.fromReference( + this.S, + _$jni.JReference reference, + ) : $type = type(S), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/GrandParent$StaticParent'); + + /// The type which includes information such as the signature of this class. + static $GrandParent_StaticParent$NullableType<$S> + nullableType<$S extends _$jni.JObject?>( + _$jni.JObjType<$S> S, + ) { + return $GrandParent_StaticParent$NullableType<$S>( + S, + ); + } + + static $GrandParent_StaticParent$Type<$S> type<$S extends _$jni.JObject?>( + _$jni.JObjType<$S> S, + ) { + return $GrandParent_StaticParent$Type<$S>( + S, + ); + } + + static final _id_value = _class.instanceFieldId( + r'value', + r'Ljava/lang/Object;', + ); + + /// from: `public S value` + /// The returned object must be released after use, by calling the [release] method. + $S get value => _id_value.get(this, S); + + /// from: `public S value` + /// The returned object must be released after use, by calling the [release] method. + set value($S value) => _id_value.set(this, S, value); + + 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.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (S object)` + /// The returned object must be released after use, by calling the [release] method. + factory GrandParent_StaticParent( + $S object, { + required _$jni.JObjType<$S> S, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return GrandParent_StaticParent.fromReference( + S, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _object.pointer) + .reference); + } +} + +final class $GrandParent_StaticParent$NullableType<$S extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + const $GrandParent_StaticParent$NullableType( + this.S, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;'; + + @_$jni.internal + @_$core.override + GrandParent_StaticParent<$S>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : GrandParent_StaticParent.fromReference( + S, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent_StaticParent$NullableType, S); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GrandParent_StaticParent$NullableType<$S>) && + other is $GrandParent_StaticParent$NullableType<$S> && + S == other.S; + } +} + +final class $GrandParent_StaticParent$Type<$S extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$S> S; + + @_$jni.internal + const $GrandParent_StaticParent$Type( + this.S, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;'; + + @_$jni.internal + @_$core.override + GrandParent_StaticParent<$S> fromReference(_$jni.JReference reference) => + GrandParent_StaticParent.fromReference( + S, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GrandParent_StaticParent$NullableType(S); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent_StaticParent$Type, S); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GrandParent_StaticParent$Type<$S>) && + other is $GrandParent_StaticParent$Type<$S> && + S == other.S; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.GrandParent` +class GrandParent<$T extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + GrandParent.fromReference( + this.T, + _$jni.JReference reference, + ) : $type = type(T), + super.fromReference(reference); + + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/generics/GrandParent'); + + /// The type which includes information such as the signature of this class. + static $GrandParent$NullableType<$T> nullableType<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $GrandParent$NullableType<$T>( + T, + ); + } + + static $GrandParent$Type<$T> type<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $GrandParent$Type<$T>( + T, + ); + } + + static final _id_value = _class.instanceFieldId( + r'value', + r'Ljava/lang/Object;', + ); + + /// from: `public T value` + /// The returned object must be released after use, by calling the [release] method. + $T get value => _id_value.get(this, T); + + /// from: `public T value` + /// The returned object must be released after use, by calling the [release] method. + set value($T value) => _id_value.set(this, T, value); + + 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.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (T object)` + /// The returned object must be released after use, by calling the [release] method. + factory GrandParent( + $T object, { + required _$jni.JObjType<$T> T, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return GrandParent.fromReference( + T, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _object.pointer) + .reference); + } + + static final _id_stringParent = _class.instanceMethodId( + r'stringParent', + r'()Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;', + ); + + static final _stringParent = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public com.github.dart_lang.jnigen.generics.GrandParent.Parent stringParent()` + /// The returned object must be released after use, by calling the [release] method. + GrandParent_Parent<$T, _$jni.JString?>? stringParent() { + return _stringParent( + reference.pointer, _id_stringParent as _$jni.JMethodIDPtr) + .object($GrandParent_Parent$NullableType( + T, const _$jni.JStringNullableType())); + } + + static final _id_varParent = _class.instanceMethodId( + r'varParent', + r'(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;', + ); + + static final _varParent = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public com.github.dart_lang.jnigen.generics.GrandParent.Parent varParent(S object)` + /// The returned object must be released after use, by calling the [release] method. + GrandParent_Parent<$T, $S>? varParent<$S extends _$jni.JObject?>( + $S object, { + required _$jni.JObjType<$S> S, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _varParent(reference.pointer, _id_varParent as _$jni.JMethodIDPtr, + _object.pointer) + .object($GrandParent_Parent$NullableType(T, S)); + } + + static final _id_stringStaticParent = _class.staticMethodId( + r'stringStaticParent', + r'()Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;', + ); + + static final _stringStaticParent = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public com.github.dart_lang.jnigen.generics.GrandParent$StaticParent stringStaticParent()` + /// The returned object must be released after use, by calling the [release] method. + static GrandParent_StaticParent<_$jni.JString?>? stringStaticParent() { + return _stringStaticParent(_class.reference.pointer, + _id_stringStaticParent as _$jni.JMethodIDPtr) + .object(const $GrandParent_StaticParent$NullableType( + _$jni.JStringNullableType())); + } + + static final _id_varStaticParent = _class.staticMethodId( + r'varStaticParent', + r'(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;', + ); + + static final _varStaticParent = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public com.github.dart_lang.jnigen.generics.GrandParent$StaticParent varStaticParent(S object)` + /// The returned object must be released after use, by calling the [release] method. + static GrandParent_StaticParent<$S>? + varStaticParent<$S extends _$jni.JObject?>( + $S object, { + required _$jni.JObjType<$S> S, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _varStaticParent(_class.reference.pointer, + _id_varStaticParent as _$jni.JMethodIDPtr, _object.pointer) + .object($GrandParent_StaticParent$NullableType(S)); + } + + static final _id_staticParentWithSameType = _class.instanceMethodId( + r'staticParentWithSameType', + r'()Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;', + ); + + static final _staticParentWithSameType = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public com.github.dart_lang.jnigen.generics.GrandParent$StaticParent staticParentWithSameType()` + /// The returned object must be released after use, by calling the [release] method. + GrandParent_StaticParent<$T>? staticParentWithSameType() { + return _staticParentWithSameType(reference.pointer, + _id_staticParentWithSameType as _$jni.JMethodIDPtr) + .object($GrandParent_StaticParent$NullableType(T)); + } +} + +final class $GrandParent$NullableType<$T extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $GrandParent$NullableType( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/GrandParent;'; + + @_$jni.internal + @_$core.override + GrandParent<$T>? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : GrandParent.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent$NullableType, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GrandParent$NullableType<$T>) && + other is $GrandParent$NullableType<$T> && + T == other.T; + } +} + +final class $GrandParent$Type<$T extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $GrandParent$Type( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/GrandParent;'; + + @_$jni.internal + @_$core.override + GrandParent<$T> fromReference(_$jni.JReference reference) => + GrandParent.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GrandParent$NullableType(T); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GrandParent$Type, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GrandParent$Type<$T>) && + other is $GrandParent$Type<$T> && + T == other.T; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.MyMap$MyEntry` +class MyMap_MyEntry<$K extends _$jni.JObject?, $V extends _$jni.JObject?> + extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + MyMap_MyEntry.fromReference( + this.K, + this.V, + _$jni.JReference reference, + ) : $type = type(K, V), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/MyMap$MyEntry'); + + /// The type which includes information such as the signature of this class. + static $MyMap_MyEntry$NullableType<$K, $V> + nullableType<$K extends _$jni.JObject?, $V extends _$jni.JObject?>( + _$jni.JObjType<$K> K, + _$jni.JObjType<$V> V, + ) { + return $MyMap_MyEntry$NullableType<$K, $V>( + K, + V, + ); + } + + static $MyMap_MyEntry$Type<$K, $V> + type<$K extends _$jni.JObject?, $V extends _$jni.JObject?>( + _$jni.JObjType<$K> K, + _$jni.JObjType<$V> V, + ) { + return $MyMap_MyEntry$Type<$K, $V>( + K, + V, + ); + } + + static final _id_key = _class.instanceFieldId( + r'key', + r'Ljava/lang/Object;', + ); + + /// from: `public K key` + /// The returned object must be released after use, by calling the [release] method. + $K get key => _id_key.get(this, K); + + /// from: `public K key` + /// The returned object must be released after use, by calling the [release] method. + set key($K value) => _id_key.set(this, K, value); + + static final _id_value = _class.instanceFieldId( + r'value', + r'Ljava/lang/Object;', + ); + + /// from: `public V value` + /// The returned object must be released after use, by calling the [release] method. + $V get value => _id_value.get(this, V); + + /// from: `public V value` + /// The returned object must be released after use, by calling the [release] method. + set value($V value) => _id_value.set(this, V, value); + + static final _id_new$ = _class.constructorId( + r'(Lcom/github/dart_lang/jnigen/generics/MyMap;Ljava/lang/Object;Ljava/lang/Object;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (com.github.dart_lang.jnigen.generics.MyMap $outerClass, K object, V object1)` + /// The returned object must be released after use, by calling the [release] method. + factory MyMap_MyEntry( + MyMap<$K, $V> $outerClass, + $K object, + $V object1, { + _$jni.JObjType<$K>? K, + _$jni.JObjType<$V>? V, + }) { + K ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type as $MyMap$Type<_$core.dynamic, _$core.dynamic>).K, + ]) as _$jni.JObjType<$K>; + V ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type as $MyMap$Type<_$core.dynamic, _$core.dynamic>).V, + ]) as _$jni.JObjType<$V>; + final _$outerClass = $outerClass.reference; + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; + return MyMap_MyEntry.fromReference( + K, + V, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _$outerClass.pointer, _object.pointer, _object1.pointer) + .reference); + } +} + +final class $MyMap_MyEntry$NullableType<$K extends _$jni.JObject?, + $V extends _$jni.JObject?> extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $MyMap_MyEntry$NullableType( + this.K, + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/MyMap$MyEntry;'; + + @_$jni.internal + @_$core.override + MyMap_MyEntry<$K, $V>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : MyMap_MyEntry.fromReference( + K, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyMap_MyEntry$NullableType, K, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyMap_MyEntry$NullableType<$K, $V>) && + other is $MyMap_MyEntry$NullableType<$K, $V> && + K == other.K && + V == other.V; + } +} + +final class $MyMap_MyEntry$Type<$K extends _$jni.JObject?, + $V extends _$jni.JObject?> extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $MyMap_MyEntry$Type( + this.K, + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/MyMap$MyEntry;'; + + @_$jni.internal + @_$core.override + MyMap_MyEntry<$K, $V> fromReference(_$jni.JReference reference) => + MyMap_MyEntry.fromReference( + K, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $MyMap_MyEntry$NullableType(K, V); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyMap_MyEntry$Type, K, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyMap_MyEntry$Type<$K, $V>) && + other is $MyMap_MyEntry$Type<$K, $V> && + K == other.K && + V == other.V; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.MyMap` +class MyMap<$K extends _$jni.JObject?, $V extends _$jni.JObject?> + extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + MyMap.fromReference( + this.K, + this.V, + _$jni.JReference reference, + ) : $type = type(K, V), + super.fromReference(reference); + + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/generics/MyMap'); + + /// The type which includes information such as the signature of this class. + static $MyMap$NullableType<$K, $V> + nullableType<$K extends _$jni.JObject?, $V extends _$jni.JObject?>( + _$jni.JObjType<$K> K, + _$jni.JObjType<$V> V, + ) { + return $MyMap$NullableType<$K, $V>( + K, + V, + ); + } + + static $MyMap$Type<$K, $V> + type<$K extends _$jni.JObject?, $V extends _$jni.JObject?>( + _$jni.JObjType<$K> K, + _$jni.JObjType<$V> V, + ) { + return $MyMap$Type<$K, $V>( + K, + V, + ); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory MyMap({ + required _$jni.JObjType<$K> K, + required _$jni.JObjType<$V> V, + }) { + return MyMap.fromReference( + K, + V, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } + + static final _id_get = _class.instanceMethodId( + r'get', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _get = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public V get(K object)` + /// The returned object must be released after use, by calling the [release] method. + $V get( + $K object, + ) { + final _object = object?.reference ?? _$jni.jNullReference; + return _get( + reference.pointer, _id_get as _$jni.JMethodIDPtr, _object.pointer) + .object(V); + } + + static final _id_put = _class.instanceMethodId( + r'put', + r'(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _put = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public V put(K object, V object1)` + /// The returned object must be released after use, by calling the [release] method. + $V put( + $K object, + $V object1, + ) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; + return _put(reference.pointer, _id_put as _$jni.JMethodIDPtr, + _object.pointer, _object1.pointer) + .object(V); + } + + static final _id_entryStack = _class.instanceMethodId( + r'entryStack', + r'()Lcom/github/dart_lang/jnigen/generics/MyStack;', + ); + + static final _entryStack = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public com.github.dart_lang.jnigen.generics.MyStack entryStack()` + /// The returned object must be released after use, by calling the [release] method. + MyStack?>? entryStack() { + return _entryStack(reference.pointer, _id_entryStack as _$jni.JMethodIDPtr) + .object($MyStack$NullableType($MyMap_MyEntry$NullableType(K, V))); + } +} + +final class $MyMap$NullableType<$K extends _$jni.JObject?, + $V extends _$jni.JObject?> extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $MyMap$NullableType( + this.K, + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/MyMap;'; + + @_$jni.internal + @_$core.override + MyMap<$K, $V>? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : MyMap.fromReference( + K, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyMap$NullableType, K, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyMap$NullableType<$K, $V>) && + other is $MyMap$NullableType<$K, $V> && + K == other.K && + V == other.V; + } +} + +final class $MyMap$Type<$K extends _$jni.JObject?, $V extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $MyMap$Type( + this.K, + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/MyMap;'; + + @_$jni.internal + @_$core.override + MyMap<$K, $V> fromReference(_$jni.JReference reference) => + MyMap.fromReference( + K, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => $MyMap$NullableType(K, V); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyMap$Type, K, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyMap$Type<$K, $V>) && + other is $MyMap$Type<$K, $V> && + K == other.K && + V == other.V; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.MyStack` +class MyStack<$T extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + MyStack.fromReference( + this.T, + _$jni.JReference reference, + ) : $type = type(T), + super.fromReference(reference); + + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/generics/MyStack'); + + /// The type which includes information such as the signature of this class. + static $MyStack$NullableType<$T> nullableType<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $MyStack$NullableType<$T>( + T, + ); + } + + static $MyStack$Type<$T> type<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $MyStack$Type<$T>( + T, + ); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory MyStack({ + required _$jni.JObjType<$T> T, + }) { + return MyStack.fromReference( + T, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } + + static final _id_fromArray = _class.staticMethodId( + r'fromArray', + r'([Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;', + ); + + static final _fromArray = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public com.github.dart_lang.jnigen.generics.MyStack fromArray(java.lang.Object[] objects)` + /// The returned object must be released after use, by calling the [release] method. + static MyStack<$T>? fromArray<$T extends _$jni.JObject?>( + _$jni.JArray<$T>? objects, { + required _$jni.JObjType<$T> T, + }) { + final _objects = objects?.reference ?? _$jni.jNullReference; + return _fromArray(_class.reference.pointer, + _id_fromArray as _$jni.JMethodIDPtr, _objects.pointer) + .object($MyStack$NullableType(T)); + } + + static final _id_fromArrayOfArrayOfGrandParents = _class.staticMethodId( + r'fromArrayOfArrayOfGrandParents', + r'([[Lcom/github/dart_lang/jnigen/generics/GrandParent;)Lcom/github/dart_lang/jnigen/generics/MyStack;', + ); + + static final _fromArrayOfArrayOfGrandParents = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public com.github.dart_lang.jnigen.generics.MyStack fromArrayOfArrayOfGrandParents(java.lang.Object[] grandParents)` + /// The returned object must be released after use, by calling the [release] method. + static MyStack<$S>? fromArrayOfArrayOfGrandParents<$S extends _$jni.JObject?>( + _$jni.JArray<_$jni.JArray?>?>? grandParents, { + required _$jni.JObjType<$S> S, + }) { + final _grandParents = grandParents?.reference ?? _$jni.jNullReference; + return _fromArrayOfArrayOfGrandParents( + _class.reference.pointer, + _id_fromArrayOfArrayOfGrandParents as _$jni.JMethodIDPtr, + _grandParents.pointer) + .object($MyStack$NullableType(S)); + } + + static final _id_of = _class.staticMethodId( + r'of', + r'()Lcom/github/dart_lang/jnigen/generics/MyStack;', + ); + + static final _of = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `static public com.github.dart_lang.jnigen.generics.MyStack of()` + /// The returned object must be released after use, by calling the [release] method. + static MyStack<$T>? of<$T extends _$jni.JObject?>({ + required _$jni.JObjType<$T> T, + }) { + return _of(_class.reference.pointer, _id_of as _$jni.JMethodIDPtr) + .object($MyStack$NullableType(T)); + } + + static final _id_of$1 = _class.staticMethodId( + r'of', + r'(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;', + ); + + static final _of$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public com.github.dart_lang.jnigen.generics.MyStack of(T object)` + /// The returned object must be released after use, by calling the [release] method. + static MyStack<$T>? of$1<$T extends _$jni.JObject?>( + $T object, { + required _$jni.JObjType<$T> T, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _of$1(_class.reference.pointer, _id_of$1 as _$jni.JMethodIDPtr, + _object.pointer) + .object($MyStack$NullableType(T)); + } + + static final _id_of$2 = _class.staticMethodId( + r'of', + r'(Ljava/lang/Object;Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/MyStack;', + ); + + static final _of$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public com.github.dart_lang.jnigen.generics.MyStack of(T object, T object1)` + /// The returned object must be released after use, by calling the [release] method. + static MyStack<$T>? of$2<$T extends _$jni.JObject?>( + $T object, + $T object1, { + required _$jni.JObjType<$T> T, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; + return _of$2(_class.reference.pointer, _id_of$2 as _$jni.JMethodIDPtr, + _object.pointer, _object1.pointer) + .object($MyStack$NullableType(T)); + } + + static final _id_push = _class.instanceMethodId( + r'push', + r'(Ljava/lang/Object;)V', + ); + + static final _push = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void push(T object)` + void push( + $T object, + ) { + final _object = object?.reference ?? _$jni.jNullReference; + _push(reference.pointer, _id_push as _$jni.JMethodIDPtr, _object.pointer) + .check(); + } + + static final _id_pop = _class.instanceMethodId( + r'pop', + r'()Ljava/lang/Object;', + ); + + static final _pop = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public T pop()` + /// The returned object must be released after use, by calling the [release] method. + $T pop() { + return _pop(reference.pointer, _id_pop as _$jni.JMethodIDPtr).object(T); + } + + static final _id_size = _class.instanceMethodId( + r'size', + r'()I', + ); + + static final _size = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public int size()` + int size() { + return _size(reference.pointer, _id_size as _$jni.JMethodIDPtr).integer; + } +} + +final class $MyStack$NullableType<$T extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $MyStack$NullableType( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/MyStack;'; + + @_$jni.internal + @_$core.override + MyStack<$T>? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : MyStack.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyStack$NullableType, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyStack$NullableType<$T>) && + other is $MyStack$NullableType<$T> && + T == other.T; + } +} + +final class $MyStack$Type<$T extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $MyStack$Type( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/MyStack;'; + + @_$jni.internal + @_$core.override + MyStack<$T> fromReference(_$jni.JReference reference) => + MyStack.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => $MyStack$NullableType(T); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyStack$Type, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyStack$Type<$T>) && + other is $MyStack$Type<$T> && + T == other.T; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.StringKeyedMap` +class StringKeyedMap<$V extends _$jni.JObject?> + extends MyMap<_$jni.JString?, $V> { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + StringKeyedMap.fromReference( + this.V, + _$jni.JReference reference, + ) : $type = type(V), + super.fromReference(const _$jni.JStringNullableType(), V, reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/StringKeyedMap'); + + /// The type which includes information such as the signature of this class. + static $StringKeyedMap$NullableType<$V> + nullableType<$V extends _$jni.JObject?>( + _$jni.JObjType<$V> V, + ) { + return $StringKeyedMap$NullableType<$V>( + V, + ); + } + + static $StringKeyedMap$Type<$V> type<$V extends _$jni.JObject?>( + _$jni.JObjType<$V> V, + ) { + return $StringKeyedMap$Type<$V>( + V, + ); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory StringKeyedMap({ + required _$jni.JObjType<$V> V, + }) { + return StringKeyedMap.fromReference( + V, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $StringKeyedMap$NullableType<$V extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $StringKeyedMap$NullableType( + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/StringKeyedMap;'; + + @_$jni.internal + @_$core.override + StringKeyedMap<$V>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : StringKeyedMap.fromReference( + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + $MyMap$NullableType(const _$jni.JStringNullableType(), V); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => Object.hash($StringKeyedMap$NullableType, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringKeyedMap$NullableType<$V>) && + other is $StringKeyedMap$NullableType<$V> && + V == other.V; + } +} + +final class $StringKeyedMap$Type<$V extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $StringKeyedMap$Type( + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/StringKeyedMap;'; + + @_$jni.internal + @_$core.override + StringKeyedMap<$V> fromReference(_$jni.JReference reference) => + StringKeyedMap.fromReference( + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + $MyMap$NullableType(const _$jni.JStringNullableType(), V); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $StringKeyedMap$NullableType(V); + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => Object.hash($StringKeyedMap$Type, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringKeyedMap$Type<$V>) && + other is $StringKeyedMap$Type<$V> && + V == other.V; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.StringMap` +class StringMap extends StringKeyedMap<_$jni.JString?> { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + StringMap.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(const _$jni.JStringNullableType(), reference); + + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/generics/StringMap'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $StringMap$NullableType(); + static const type = $StringMap$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory StringMap() { + return StringMap.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $StringMap$NullableType extends _$jni.JObjType { + @_$jni.internal + const $StringMap$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/StringMap;'; + + @_$jni.internal + @_$core.override + StringMap? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : StringMap.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $StringKeyedMap$NullableType(_$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 3; + + @_$core.override + int get hashCode => ($StringMap$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringMap$NullableType) && + other is $StringMap$NullableType; + } +} + +final class $StringMap$Type extends _$jni.JObjType { + @_$jni.internal + const $StringMap$Type(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/StringMap;'; + + @_$jni.internal + @_$core.override + StringMap fromReference(_$jni.JReference reference) => + StringMap.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $StringKeyedMap$NullableType(_$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $StringMap$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 3; + + @_$core.override + int get hashCode => ($StringMap$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringMap$Type) && other is $StringMap$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.StringStack` +class StringStack extends MyStack<_$jni.JString?> { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + StringStack.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(const _$jni.JStringNullableType(), reference); + + static final _class = + _$jni.JClass.forName(r'com/github/dart_lang/jnigen/generics/StringStack'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $StringStack$NullableType(); + static const type = $StringStack$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory StringStack() { + return StringStack.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $StringStack$NullableType extends _$jni.JObjType { + @_$jni.internal + const $StringStack$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/StringStack;'; + + @_$jni.internal + @_$core.override + StringStack? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : StringStack.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $MyStack$NullableType(_$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => ($StringStack$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringStack$NullableType) && + other is $StringStack$NullableType; + } +} + +final class $StringStack$Type extends _$jni.JObjType { + @_$jni.internal + const $StringStack$Type(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/generics/StringStack;'; + + @_$jni.internal + @_$core.override + StringStack fromReference(_$jni.JReference reference) => + StringStack.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $MyStack$NullableType(_$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $StringStack$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => ($StringStack$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringStack$Type) && + other is $StringStack$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.generics.StringValuedMap` +class StringValuedMap<$K extends _$jni.JObject?> + extends MyMap<$K, _$jni.JString?> { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + StringValuedMap.fromReference( + this.K, + _$jni.JReference reference, + ) : $type = type(K), + super.fromReference(K, const _$jni.JStringNullableType(), reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/generics/StringValuedMap'); + + /// The type which includes information such as the signature of this class. + static $StringValuedMap$NullableType<$K> + nullableType<$K extends _$jni.JObject?>( + _$jni.JObjType<$K> K, + ) { + return $StringValuedMap$NullableType<$K>( + K, + ); + } + + static $StringValuedMap$Type<$K> type<$K extends _$jni.JObject?>( + _$jni.JObjType<$K> K, + ) { + return $StringValuedMap$Type<$K>( + K, + ); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory StringValuedMap({ + required _$jni.JObjType<$K> K, + }) { + return StringValuedMap.fromReference( + K, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $StringValuedMap$NullableType<$K extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + const $StringValuedMap$NullableType( + this.K, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/StringValuedMap;'; + + @_$jni.internal + @_$core.override + StringValuedMap<$K>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : StringValuedMap.fromReference( + K, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + $MyMap$NullableType(K, const _$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => Object.hash($StringValuedMap$NullableType, K); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringValuedMap$NullableType<$K>) && + other is $StringValuedMap$NullableType<$K> && + K == other.K; + } +} + +final class $StringValuedMap$Type<$K extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$K> K; + + @_$jni.internal + const $StringValuedMap$Type( + this.K, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/generics/StringValuedMap;'; + + @_$jni.internal + @_$core.override + StringValuedMap<$K> fromReference(_$jni.JReference reference) => + StringValuedMap.fromReference( + K, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + $MyMap$NullableType(K, const _$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $StringValuedMap$NullableType(K); + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => Object.hash($StringValuedMap$Type, K); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringValuedMap$Type<$K>) && + other is $StringValuedMap$Type<$K> && + K == other.K; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.GenericInterface` +class GenericInterface<$T extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + GenericInterface.fromReference( + this.T, + _$jni.JReference reference, + ) : $type = type(T), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/GenericInterface'); + + /// The type which includes information such as the signature of this class. + static $GenericInterface$NullableType<$T> + nullableType<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $GenericInterface$NullableType<$T>( + T, + ); + } + + static $GenericInterface$Type<$T> type<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $GenericInterface$Type<$T>( + T, + ); + } + + static final _id_genericArrayOf = _class.instanceMethodId( + r'genericArrayOf', + r'(Ljava/lang/Object;)[Ljava/lang/Object;', + ); + + static final _genericArrayOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.lang.Object[] genericArrayOf(U object)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JArray<$U>? genericArrayOf<$U extends _$jni.JObject?>( + $U object, { + required _$jni.JObjType<$U> U, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _genericArrayOf(reference.pointer, + _id_genericArrayOf as _$jni.JMethodIDPtr, _object.pointer) + .object(_$jni.JArrayNullableType(U)); + } + + static final _id_arrayOf = _class.instanceMethodId( + r'arrayOf', + r'(Ljava/lang/Object;)[Ljava/lang/Object;', + ); + + static final _arrayOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.lang.Object[] arrayOf(T object)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JArray<$T>? arrayOf( + $T object, + ) { + final _object = object?.reference ?? _$jni.jNullReference; + return _arrayOf(reference.pointer, _id_arrayOf as _$jni.JMethodIDPtr, + _object.pointer) + .object(_$jni.JArrayNullableType(T)); + } + + static final _id_mapOf = _class.instanceMethodId( + r'mapOf', + r'(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;', + ); + + static final _mapOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.util.Map mapOf(T object, U object1)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JMap<$T, $U>? mapOf<$U extends _$jni.JObject?>( + $T object, + $U object1, { + required _$jni.JObjType<$U> U, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1?.reference ?? _$jni.jNullReference; + return _mapOf(reference.pointer, _id_mapOf as _$jni.JMethodIDPtr, + _object.pointer, _object1.pointer) + .object(_$jni.JMapNullableType(T, U)); + } + + static final _id_firstOfGenericArray = _class.instanceMethodId( + r'firstOfGenericArray', + r'([Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _firstOfGenericArray = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract U firstOfGenericArray(java.lang.Object[] objects)` + /// The returned object must be released after use, by calling the [release] method. + $U firstOfGenericArray<$U extends _$jni.JObject?>( + _$jni.JArray<$U>? objects, { + required _$jni.JObjType<$U> U, + }) { + final _objects = objects?.reference ?? _$jni.jNullReference; + return _firstOfGenericArray(reference.pointer, + _id_firstOfGenericArray as _$jni.JMethodIDPtr, _objects.pointer) + .object(U); + } + + static final _id_firstOfArray = _class.instanceMethodId( + r'firstOfArray', + r'([Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _firstOfArray = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract T firstOfArray(java.lang.Object[] objects)` + /// The returned object must be released after use, by calling the [release] method. + $T firstOfArray( + _$jni.JArray<$T>? objects, + ) { + final _objects = objects?.reference ?? _$jni.jNullReference; + return _firstOfArray(reference.pointer, + _id_firstOfArray as _$jni.JMethodIDPtr, _objects.pointer) + .object(T); + } + + static final _id_firstKeyOf = _class.instanceMethodId( + r'firstKeyOf', + r'(Ljava/util/Map;)Ljava/lang/Object;', + ); + + static final _firstKeyOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract T firstKeyOf(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + $T firstKeyOf<$U extends _$jni.JObject?>( + _$jni.JMap<$T, $U>? map, { + required _$jni.JObjType<$U> U, + }) { + final _map = map?.reference ?? _$jni.jNullReference; + return _firstKeyOf(reference.pointer, _id_firstKeyOf as _$jni.JMethodIDPtr, + _map.pointer) + .object(T); + } + + static final _id_firstValueOf = _class.instanceMethodId( + r'firstValueOf', + r'(Ljava/util/Map;)Ljava/lang/Object;', + ); + + static final _firstValueOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract U firstValueOf(java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + $U firstValueOf<$U extends _$jni.JObject?>( + _$jni.JMap<$T, $U>? map, { + required _$jni.JObjType<$U> U, + }) { + final _map = map?.reference ?? _$jni.jNullReference; + return _firstValueOf(reference.pointer, + _id_firstValueOf as _$jni.JMethodIDPtr, _map.pointer) + .object(U); + } + + /// Maps a specific port to the implemented interface. + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( + int port, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + _$jni.MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); + + static _$jni.Pointer<_$jni.Void> _$invokeMethod( + int $p, + _$jni.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'genericArrayOf(Ljava/lang/Object;)[Ljava/lang/Object;') { + final $r = _$impls[$p]!.genericArrayOf( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'arrayOf(Ljava/lang/Object;)[Ljava/lang/Object;') { + final $r = _$impls[$p]!.arrayOf( + $a[0].as(_$impls[$p]!.T, releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'mapOf(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;') { + final $r = _$impls[$p]!.mapOf( + $a[0].as(_$impls[$p]!.T, releaseOriginal: true), + $a[1].as(const _$jni.JObjectType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'firstOfGenericArray([Ljava/lang/Object;)Ljava/lang/Object;') { + final $r = _$impls[$p]!.firstOfGenericArray( + $a[0].as(const _$jni.JArrayNullableType(_$jni.JObjectType()), + releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'firstOfArray([Ljava/lang/Object;)Ljava/lang/Object;') { + final $r = _$impls[$p]!.firstOfArray( + $a[0].as(const _$jni.JArrayNullableType(_$jni.JObjectType()), + releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'firstKeyOf(Ljava/util/Map;)Ljava/lang/Object;') { + final $r = _$impls[$p]!.firstKeyOf( + $a[0].as( + const _$jni.JMapNullableType( + _$jni.JObjectType(), _$jni.JObjectType()), + releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'firstValueOf(Ljava/util/Map;)Ljava/lang/Object;') { + final $r = _$impls[$p]!.firstValueOf( + $a[0].as( + const _$jni.JMapNullableType( + _$jni.JObjectType(), _$jni.JObjectType()), + releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + } catch (e) { + return _$jni.ProtectedJniExtensions.newDartException(e); + } + return _$jni.nullptr; + } + + static void implementIn<$T extends _$jni.JObject?>( + _$jni.JImplementer implementer, + $GenericInterface<$T> $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = _$jni.MethodInvocation.fromMessage($m); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); + }); + implementer.add( + r'com.github.dart_lang.jnigen.interfaces.GenericInterface', + $p, + _$invokePointer, + [], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory GenericInterface.implement( + $GenericInterface<$T> $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return GenericInterface.fromReference( + $impl.T, + $i.implementReference(), + ); + } +} + +abstract base mixin class $GenericInterface<$T extends _$jni.JObject?> { + factory $GenericInterface({ + required _$jni.JObjType<$T> T, + required _$jni.JArray<_$jni.JObject>? Function(_$jni.JObject object) + genericArrayOf, + required _$jni.JArray<_$jni.JObject>? Function($T object) arrayOf, + required _$jni.JMap<_$jni.JObject, _$jni.JObject>? Function( + $T object, _$jni.JObject object1) + mapOf, + required _$jni.JObject Function(_$jni.JArray<_$jni.JObject>? objects) + firstOfGenericArray, + required $T Function(_$jni.JArray<_$jni.JObject>? objects) firstOfArray, + required $T Function(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map) + firstKeyOf, + required _$jni.JObject Function( + _$jni.JMap<_$jni.JObject, _$jni.JObject>? map) + firstValueOf, + }) = _$GenericInterface<$T>; + + _$jni.JObjType<$T> get T; + + _$jni.JArray<_$jni.JObject>? genericArrayOf(_$jni.JObject object); + _$jni.JArray<_$jni.JObject>? arrayOf($T object); + _$jni.JMap<_$jni.JObject, _$jni.JObject>? mapOf( + $T object, _$jni.JObject object1); + _$jni.JObject firstOfGenericArray(_$jni.JArray<_$jni.JObject>? objects); + $T firstOfArray(_$jni.JArray<_$jni.JObject>? objects); + $T firstKeyOf(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map); + _$jni.JObject firstValueOf(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map); +} + +final class _$GenericInterface<$T extends _$jni.JObject?> + with $GenericInterface<$T> { + _$GenericInterface({ + required this.T, + required _$jni.JArray<_$jni.JObject>? Function(_$jni.JObject object) + genericArrayOf, + required _$jni.JArray<_$jni.JObject>? Function($T object) arrayOf, + required _$jni.JMap<_$jni.JObject, _$jni.JObject>? Function( + $T object, _$jni.JObject object1) + mapOf, + required _$jni.JObject Function(_$jni.JArray<_$jni.JObject>? objects) + firstOfGenericArray, + required $T Function(_$jni.JArray<_$jni.JObject>? objects) firstOfArray, + required $T Function(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map) + firstKeyOf, + required _$jni.JObject Function( + _$jni.JMap<_$jni.JObject, _$jni.JObject>? map) + firstValueOf, + }) : _genericArrayOf = genericArrayOf, + _arrayOf = arrayOf, + _mapOf = mapOf, + _firstOfGenericArray = firstOfGenericArray, + _firstOfArray = firstOfArray, + _firstKeyOf = firstKeyOf, + _firstValueOf = firstValueOf; + + @_$core.override + final _$jni.JObjType<$T> T; + + final _$jni.JArray<_$jni.JObject>? Function(_$jni.JObject object) + _genericArrayOf; + final _$jni.JArray<_$jni.JObject>? Function($T object) _arrayOf; + final _$jni.JMap<_$jni.JObject, _$jni.JObject>? Function( + $T object, _$jni.JObject object1) _mapOf; + final _$jni.JObject Function(_$jni.JArray<_$jni.JObject>? objects) + _firstOfGenericArray; + final $T Function(_$jni.JArray<_$jni.JObject>? objects) _firstOfArray; + final $T Function(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map) _firstKeyOf; + final _$jni.JObject Function(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map) + _firstValueOf; + + _$jni.JArray<_$jni.JObject>? genericArrayOf(_$jni.JObject object) { + return _genericArrayOf(object); + } + + _$jni.JArray<_$jni.JObject>? arrayOf($T object) { + return _arrayOf(object); + } + + _$jni.JMap<_$jni.JObject, _$jni.JObject>? mapOf( + $T object, _$jni.JObject object1) { + return _mapOf(object, object1); + } + + _$jni.JObject firstOfGenericArray(_$jni.JArray<_$jni.JObject>? objects) { + return _firstOfGenericArray(objects); + } + + $T firstOfArray(_$jni.JArray<_$jni.JObject>? objects) { + return _firstOfArray(objects); + } + + $T firstKeyOf(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map) { + return _firstKeyOf(map); + } + + _$jni.JObject firstValueOf(_$jni.JMap<_$jni.JObject, _$jni.JObject>? map) { + return _firstValueOf(map); + } +} + +final class $GenericInterface$NullableType<$T extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $GenericInterface$NullableType( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/GenericInterface;'; + + @_$jni.internal + @_$core.override + GenericInterface<$T>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : GenericInterface.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GenericInterface$NullableType, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GenericInterface$NullableType<$T>) && + other is $GenericInterface$NullableType<$T> && + T == other.T; + } +} + +final class $GenericInterface$Type<$T extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $GenericInterface$Type( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/GenericInterface;'; + + @_$jni.internal + @_$core.override + GenericInterface<$T> fromReference(_$jni.JReference reference) => + GenericInterface.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GenericInterface$NullableType(T); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($GenericInterface$Type, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GenericInterface$Type<$T>) && + other is $GenericInterface$Type<$T> && + T == other.T; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.MyInterface` +class MyInterface<$T extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + MyInterface.fromReference( + this.T, + _$jni.JReference reference, + ) : $type = type(T), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/MyInterface'); + + /// The type which includes information such as the signature of this class. + static $MyInterface$NullableType<$T> nullableType<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $MyInterface$NullableType<$T>( + T, + ); + } + + static $MyInterface$Type<$T> type<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $MyInterface$Type<$T>( + T, + ); + } + + static final _id_voidCallback = _class.instanceMethodId( + r'voidCallback', + r'(Ljava/lang/String;)V', + ); + + static final _voidCallback = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract void voidCallback(java.lang.String string)` + void voidCallback( + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + _voidCallback(reference.pointer, _id_voidCallback as _$jni.JMethodIDPtr, + _string.pointer) + .check(); + } + + static final _id_stringCallback = _class.instanceMethodId( + r'stringCallback', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); + + static final _stringCallback = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.lang.String stringCallback(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JString? stringCallback( + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + return _stringCallback(reference.pointer, + _id_stringCallback as _$jni.JMethodIDPtr, _string.pointer) + .object(const _$jni.JStringNullableType()); + } + + static final _id_varCallback = _class.instanceMethodId( + r'varCallback', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _varCallback = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract T varCallback(T object)` + /// The returned object must be released after use, by calling the [release] method. + $T varCallback( + $T object, + ) { + final _object = object?.reference ?? _$jni.jNullReference; + return _varCallback(reference.pointer, + _id_varCallback as _$jni.JMethodIDPtr, _object.pointer) + .object(T); + } + + static final _id_manyPrimitives = _class.instanceMethodId( + r'manyPrimitives', + r'(IZCD)J', + ); + + static final _manyPrimitives = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Double + )>)>>('globalEnv_CallLongMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, int, double)>(); + + /// from: `public abstract long manyPrimitives(int i, boolean z, char c, double d)` + int manyPrimitives( + int i, + bool z, + int c, + double d, + ) { + return _manyPrimitives(reference.pointer, + _id_manyPrimitives as _$jni.JMethodIDPtr, i, z ? 1 : 0, c, d) + .long; + } + + /// Maps a specific port to the implemented interface. + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( + int port, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + _$jni.MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); + + static _$jni.Pointer<_$jni.Void> _$invokeMethod( + int $p, + _$jni.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'voidCallback(Ljava/lang/String;)V') { + _$impls[$p]!.voidCallback( + $a[0].as(const _$jni.JStringNullableType(), releaseOriginal: true), + ); + return _$jni.nullptr; + } + if ($d == r'stringCallback(Ljava/lang/String;)Ljava/lang/String;') { + final $r = _$impls[$p]!.stringCallback( + $a[0].as(const _$jni.JStringNullableType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'varCallback(Ljava/lang/Object;)Ljava/lang/Object;') { + final $r = _$impls[$p]!.varCallback( + $a[0].as(_$impls[$p]!.T, releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'manyPrimitives(IZCD)J') { + final $r = _$impls[$p]!.manyPrimitives( + $a[0] + .as(const _$jni.JIntegerType(), releaseOriginal: true) + .intValue(releaseOriginal: true), + $a[1] + .as(const _$jni.JBooleanType(), releaseOriginal: true) + .booleanValue(releaseOriginal: true), + $a[2] + .as(const _$jni.JCharacterType(), releaseOriginal: true) + .charValue(releaseOriginal: true), + $a[3] + .as(const _$jni.JDoubleType(), releaseOriginal: true) + .doubleValue(releaseOriginal: true), + ); + return _$jni.JLong($r).reference.toPointer(); + } + } catch (e) { + return _$jni.ProtectedJniExtensions.newDartException(e); + } + return _$jni.nullptr; + } + + static void implementIn<$T extends _$jni.JObject?>( + _$jni.JImplementer implementer, + $MyInterface<$T> $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = _$jni.MethodInvocation.fromMessage($m); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); + }); + implementer.add( + r'com.github.dart_lang.jnigen.interfaces.MyInterface', + $p, + _$invokePointer, + [ + if ($impl.voidCallback$async) r'voidCallback(Ljava/lang/String;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory MyInterface.implement( + $MyInterface<$T> $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return MyInterface.fromReference( + $impl.T, + $i.implementReference(), + ); + } + static _$core.Map get $impls => _$impls; +} + +abstract base mixin class $MyInterface<$T extends _$jni.JObject?> { + factory $MyInterface({ + required _$jni.JObjType<$T> T, + required void Function(_$jni.JString? string) voidCallback, + bool voidCallback$async, + required _$jni.JString? Function(_$jni.JString? string) stringCallback, + required $T Function($T object) varCallback, + required int Function(int i, bool z, int c, double d) manyPrimitives, + }) = _$MyInterface<$T>; + + _$jni.JObjType<$T> get T; + + void voidCallback(_$jni.JString? string); + bool get voidCallback$async => false; + _$jni.JString? stringCallback(_$jni.JString? string); + $T varCallback($T object); + int manyPrimitives(int i, bool z, int c, double d); +} + +final class _$MyInterface<$T extends _$jni.JObject?> with $MyInterface<$T> { + _$MyInterface({ + required this.T, + required void Function(_$jni.JString? string) voidCallback, + this.voidCallback$async = false, + required _$jni.JString? Function(_$jni.JString? string) stringCallback, + required $T Function($T object) varCallback, + required int Function(int i, bool z, int c, double d) manyPrimitives, + }) : _voidCallback = voidCallback, + _stringCallback = stringCallback, + _varCallback = varCallback, + _manyPrimitives = manyPrimitives; + + @_$core.override + final _$jni.JObjType<$T> T; + + final void Function(_$jni.JString? string) _voidCallback; + final bool voidCallback$async; + final _$jni.JString? Function(_$jni.JString? string) _stringCallback; + final $T Function($T object) _varCallback; + final int Function(int i, bool z, int c, double d) _manyPrimitives; + + void voidCallback(_$jni.JString? string) { + return _voidCallback(string); + } + + _$jni.JString? stringCallback(_$jni.JString? string) { + return _stringCallback(string); + } + + $T varCallback($T object) { + return _varCallback(object); + } + + int manyPrimitives(int i, bool z, int c, double d) { + return _manyPrimitives(i, z, c, d); + } +} + +final class $MyInterface$NullableType<$T extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $MyInterface$NullableType( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyInterface;'; + + @_$jni.internal + @_$core.override + MyInterface<$T>? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : MyInterface.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyInterface$NullableType, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyInterface$NullableType<$T>) && + other is $MyInterface$NullableType<$T> && + T == other.T; + } +} + +final class $MyInterface$Type<$T extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $MyInterface$Type( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyInterface;'; + + @_$jni.internal + @_$core.override + MyInterface<$T> fromReference(_$jni.JReference reference) => + MyInterface.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $MyInterface$NullableType(T); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($MyInterface$Type, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyInterface$Type<$T>) && + other is $MyInterface$Type<$T> && + T == other.T; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.MyInterfaceConsumer` +class MyInterfaceConsumer extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + MyInterfaceConsumer.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $MyInterfaceConsumer$NullableType(); + static const type = $MyInterfaceConsumer$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory MyInterfaceConsumer() { + return MyInterfaceConsumer.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } + + static final _id_consumeOnAnotherThread = _class.staticMethodId( + r'consumeOnAnotherThread', + r'(Lcom/github/dart_lang/jnigen/interfaces/MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V', + ); + + static final _consumeOnAnotherThread = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Double, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int, + int, + int, + double, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public void consumeOnAnotherThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String string, int i, boolean z, char c, double d, T object)` + static void consumeOnAnotherThread<$T extends _$jni.JObject?>( + MyInterface<$T>? myInterface, + _$jni.JString? string, + int i, + bool z, + int c, + double d, + $T object, { + required _$jni.JObjType<$T> T, + }) { + final _myInterface = myInterface?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; + final _object = object?.reference ?? _$jni.jNullReference; + _consumeOnAnotherThread( + _class.reference.pointer, + _id_consumeOnAnotherThread as _$jni.JMethodIDPtr, + _myInterface.pointer, + _string.pointer, + i, + z ? 1 : 0, + c, + d, + _object.pointer) + .check(); + } + + static final _id_consumeOnSameThread = _class.staticMethodId( + r'consumeOnSameThread', + r'(Lcom/github/dart_lang/jnigen/interfaces/MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V', + ); + + static final _consumeOnSameThread = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32, + _$jni.Int32, + _$jni.Double, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int, + int, + int, + double, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public void consumeOnSameThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String string, int i, boolean z, char c, double d, T object)` + static void consumeOnSameThread<$T extends _$jni.JObject?>( + MyInterface<$T>? myInterface, + _$jni.JString? string, + int i, + bool z, + int c, + double d, + $T object, { + required _$jni.JObjType<$T> T, + }) { + final _myInterface = myInterface?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; + final _object = object?.reference ?? _$jni.jNullReference; + _consumeOnSameThread( + _class.reference.pointer, + _id_consumeOnSameThread as _$jni.JMethodIDPtr, + _myInterface.pointer, + _string.pointer, + i, + z ? 1 : 0, + c, + d, + _object.pointer) + .check(); + } +} + +final class $MyInterfaceConsumer$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $MyInterfaceConsumer$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer;'; + + @_$jni.internal + @_$core.override + MyInterfaceConsumer? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : MyInterfaceConsumer.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MyInterfaceConsumer$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyInterfaceConsumer$NullableType) && + other is $MyInterfaceConsumer$NullableType; + } +} + +final class $MyInterfaceConsumer$Type + extends _$jni.JObjType { + @_$jni.internal + const $MyInterfaceConsumer$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer;'; + + @_$jni.internal + @_$core.override + MyInterfaceConsumer fromReference(_$jni.JReference reference) => + MyInterfaceConsumer.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $MyInterfaceConsumer$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MyInterfaceConsumer$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyInterfaceConsumer$Type) && + other is $MyInterfaceConsumer$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.MyRunnable` +class MyRunnable extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + MyRunnable.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/MyRunnable'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $MyRunnable$NullableType(); + static const type = $MyRunnable$Type(); + static final _id_run = _class.instanceMethodId( + r'run', + r'()V', + ); + + static final _run = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public abstract void run()` + void run() { + _run(reference.pointer, _id_run as _$jni.JMethodIDPtr).check(); + } + + /// Maps a specific port to the implemented interface. + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( + int port, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + _$jni.MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); + + static _$jni.Pointer<_$jni.Void> _$invokeMethod( + int $p, + _$jni.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'run()V') { + _$impls[$p]!.run(); + return _$jni.nullptr; + } + } catch (e) { + return _$jni.ProtectedJniExtensions.newDartException(e); + } + return _$jni.nullptr; + } + + static void implementIn( + _$jni.JImplementer implementer, + $MyRunnable $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = _$jni.MethodInvocation.fromMessage($m); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); + }); + implementer.add( + r'com.github.dart_lang.jnigen.interfaces.MyRunnable', + $p, + _$invokePointer, + [ + if ($impl.run$async) r'run()V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory MyRunnable.implement( + $MyRunnable $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return MyRunnable.fromReference( + $i.implementReference(), + ); + } + static _$core.Map get $impls => _$impls; +} + +abstract base mixin class $MyRunnable { + factory $MyRunnable({ + required void Function() run, + bool run$async, + }) = _$MyRunnable; + + void run(); + bool get run$async => false; +} + +final class _$MyRunnable with $MyRunnable { + _$MyRunnable({ + required void Function() run, + this.run$async = false, + }) : _run = run; + + final void Function() _run; + final bool run$async; + + void run() { + return _run(); + } +} + +final class $MyRunnable$NullableType extends _$jni.JObjType { + @_$jni.internal + const $MyRunnable$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyRunnable;'; + + @_$jni.internal + @_$core.override + MyRunnable? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : MyRunnable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MyRunnable$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyRunnable$NullableType) && + other is $MyRunnable$NullableType; + } +} + +final class $MyRunnable$Type extends _$jni.JObjType { + @_$jni.internal + const $MyRunnable$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyRunnable;'; + + @_$jni.internal + @_$core.override + MyRunnable fromReference(_$jni.JReference reference) => + MyRunnable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $MyRunnable$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MyRunnable$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyRunnable$Type) && other is $MyRunnable$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.MyRunnableRunner` +class MyRunnableRunner extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + MyRunnableRunner.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/MyRunnableRunner'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $MyRunnableRunner$NullableType(); + static const type = $MyRunnableRunner$Type(); + static final _id_error = _class.instanceFieldId( + r'error', + r'Ljava/lang/Throwable;', + ); + + /// from: `public java.lang.Throwable error` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject? get error => + _id_error.get(this, const _$jni.JObjectNullableType()); + + /// from: `public java.lang.Throwable error` + /// The returned object must be released after use, by calling the [release] method. + set error(_$jni.JObject? value) => + _id_error.set(this, const _$jni.JObjectNullableType(), value); + + static final _id_new$ = _class.constructorId( + r'(Lcom/github/dart_lang/jnigen/interfaces/MyRunnable;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (com.github.dart_lang.jnigen.interfaces.MyRunnable myRunnable)` + /// The returned object must be released after use, by calling the [release] method. + factory MyRunnableRunner( + MyRunnable? myRunnable, + ) { + final _myRunnable = myRunnable?.reference ?? _$jni.jNullReference; + return MyRunnableRunner.fromReference(_new$(_class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, _myRunnable.pointer) + .reference); + } + + static final _id_runOnSameThread = _class.instanceMethodId( + r'runOnSameThread', + r'()V', + ); + + static final _runOnSameThread = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void runOnSameThread()` + void runOnSameThread() { + _runOnSameThread( + reference.pointer, _id_runOnSameThread as _$jni.JMethodIDPtr) + .check(); + } + + static final _id_runOnAnotherThread = _class.instanceMethodId( + r'runOnAnotherThread', + r'()V', + ); + + static final _runOnAnotherThread = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void runOnAnotherThread()` + void runOnAnotherThread() { + _runOnAnotherThread( + reference.pointer, _id_runOnAnotherThread as _$jni.JMethodIDPtr) + .check(); + } + + static final _id_runOnAnotherThreadAndJoin = _class.instanceMethodId( + r'runOnAnotherThreadAndJoin', + r'()V', + ); + + static final _runOnAnotherThreadAndJoin = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void runOnAnotherThreadAndJoin()` + void runOnAnotherThreadAndJoin() { + _runOnAnotherThreadAndJoin(reference.pointer, + _id_runOnAnotherThreadAndJoin as _$jni.JMethodIDPtr) + .check(); + } +} + +final class $MyRunnableRunner$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $MyRunnableRunner$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyRunnableRunner;'; + + @_$jni.internal + @_$core.override + MyRunnableRunner? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : MyRunnableRunner.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MyRunnableRunner$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyRunnableRunner$NullableType) && + other is $MyRunnableRunner$NullableType; + } +} + +final class $MyRunnableRunner$Type extends _$jni.JObjType { + @_$jni.internal + const $MyRunnableRunner$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/MyRunnableRunner;'; + + @_$jni.internal + @_$core.override + MyRunnableRunner fromReference(_$jni.JReference reference) => + MyRunnableRunner.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $MyRunnableRunner$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MyRunnableRunner$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyRunnableRunner$Type) && + other is $MyRunnableRunner$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.StringConversionException` +class StringConversionException extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + StringConversionException.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/StringConversionException'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $StringConversionException$NullableType(); + static const type = $StringConversionException$Type(); + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/String;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + factory StringConversionException( + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + return StringConversionException.fromReference(_new$( + _class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, + _string.pointer) + .reference); + } +} + +final class $StringConversionException$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $StringConversionException$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/StringConversionException;'; + + @_$jni.internal + @_$core.override + StringConversionException? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : StringConversionException.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($StringConversionException$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringConversionException$NullableType) && + other is $StringConversionException$NullableType; + } +} + +final class $StringConversionException$Type + extends _$jni.JObjType { + @_$jni.internal + const $StringConversionException$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/StringConversionException;'; + + @_$jni.internal + @_$core.override + StringConversionException fromReference(_$jni.JReference reference) => + StringConversionException.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $StringConversionException$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($StringConversionException$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringConversionException$Type) && + other is $StringConversionException$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.StringConverter` +class StringConverter extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + StringConverter.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/StringConverter'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $StringConverter$NullableType(); + static const type = $StringConverter$Type(); + static final _id_parseToInt = _class.instanceMethodId( + r'parseToInt', + r'(Ljava/lang/String;)I', + ); + + static final _parseToInt = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract int parseToInt(java.lang.String string)` + int parseToInt( + _$jni.JString? string, + ) { + final _string = string?.reference ?? _$jni.jNullReference; + return _parseToInt(reference.pointer, _id_parseToInt as _$jni.JMethodIDPtr, + _string.pointer) + .integer; + } + + /// Maps a specific port to the implemented interface. + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( + int port, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + _$jni.MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); + + static _$jni.Pointer<_$jni.Void> _$invokeMethod( + int $p, + _$jni.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'parseToInt(Ljava/lang/String;)I') { + final $r = _$impls[$p]!.parseToInt( + $a[0].as(const _$jni.JStringNullableType(), releaseOriginal: true), + ); + return _$jni.JInteger($r).reference.toPointer(); + } + } catch (e) { + return _$jni.ProtectedJniExtensions.newDartException(e); + } + return _$jni.nullptr; + } + + static void implementIn( + _$jni.JImplementer implementer, + $StringConverter $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = _$jni.MethodInvocation.fromMessage($m); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); + }); + implementer.add( + r'com.github.dart_lang.jnigen.interfaces.StringConverter', + $p, + _$invokePointer, + [], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory StringConverter.implement( + $StringConverter $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return StringConverter.fromReference( + $i.implementReference(), + ); + } +} + +abstract base mixin class $StringConverter { + factory $StringConverter({ + required int Function(_$jni.JString? string) parseToInt, + }) = _$StringConverter; + + int parseToInt(_$jni.JString? string); +} + +final class _$StringConverter with $StringConverter { + _$StringConverter({ + required int Function(_$jni.JString? string) parseToInt, + }) : _parseToInt = parseToInt; + + final int Function(_$jni.JString? string) _parseToInt; + + int parseToInt(_$jni.JString? string) { + return _parseToInt(string); + } +} + +final class $StringConverter$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $StringConverter$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/StringConverter;'; + + @_$jni.internal + @_$core.override + StringConverter? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : StringConverter.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($StringConverter$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringConverter$NullableType) && + other is $StringConverter$NullableType; + } +} + +final class $StringConverter$Type extends _$jni.JObjType { + @_$jni.internal + const $StringConverter$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/StringConverter;'; + + @_$jni.internal + @_$core.override + StringConverter fromReference(_$jni.JReference reference) => + StringConverter.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $StringConverter$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($StringConverter$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringConverter$Type) && + other is $StringConverter$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.interfaces.StringConverterConsumer` +class StringConverterConsumer extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + StringConverterConsumer.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/interfaces/StringConverterConsumer'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $StringConverterConsumer$NullableType(); + static const type = $StringConverterConsumer$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory StringConverterConsumer() { + return StringConverterConsumer.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } + + static final _id_consumeOnSameThread = _class.staticMethodId( + r'consumeOnSameThread', + r'(Lcom/github/dart_lang/jnigen/interfaces/StringConverter;Ljava/lang/String;)Ljava/lang/Integer;', + ); + + static final _consumeOnSameThread = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public java.lang.Integer consumeOnSameThread(com.github.dart_lang.jnigen.interfaces.StringConverter stringConverter, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JInteger? consumeOnSameThread( + StringConverter? stringConverter, + _$jni.JString? string, + ) { + final _stringConverter = stringConverter?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; + return _consumeOnSameThread( + _class.reference.pointer, + _id_consumeOnSameThread as _$jni.JMethodIDPtr, + _stringConverter.pointer, + _string.pointer) + .object(const _$jni.JIntegerNullableType()); + } + + static final _id_consumeOnAnotherThread = _class.staticMethodId( + r'consumeOnAnotherThread', + r'(Lcom/github/dart_lang/jnigen/interfaces/StringConverter;Ljava/lang/String;)Ljava/util/concurrent/Future;', + ); + + static final _consumeOnAnotherThread = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `static public java.util.concurrent.Future consumeOnAnotherThread(com.github.dart_lang.jnigen.interfaces.StringConverter stringConverter, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static _$jni.JObject? consumeOnAnotherThread( + StringConverter? stringConverter, + _$jni.JString? string, + ) { + final _stringConverter = stringConverter?.reference ?? _$jni.jNullReference; + final _string = string?.reference ?? _$jni.jNullReference; + return _consumeOnAnotherThread( + _class.reference.pointer, + _id_consumeOnAnotherThread as _$jni.JMethodIDPtr, + _stringConverter.pointer, + _string.pointer) + .object(const _$jni.JObjectNullableType()); + } +} + +final class $StringConverterConsumer$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $StringConverterConsumer$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/StringConverterConsumer;'; + + @_$jni.internal + @_$core.override + StringConverterConsumer? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : StringConverterConsumer.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($StringConverterConsumer$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringConverterConsumer$NullableType) && + other is $StringConverterConsumer$NullableType; + } +} + +final class $StringConverterConsumer$Type + extends _$jni.JObjType { + @_$jni.internal + const $StringConverterConsumer$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/interfaces/StringConverterConsumer;'; + + @_$jni.internal + @_$core.override + StringConverterConsumer fromReference(_$jni.JReference reference) => + StringConverterConsumer.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $StringConverterConsumer$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($StringConverterConsumer$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($StringConverterConsumer$Type) && + other is $StringConverterConsumer$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.inheritance.BaseClass` +class BaseClass<$T extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + BaseClass.fromReference( + this.T, + _$jni.JReference reference, + ) : $type = type(T), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/inheritance/BaseClass'); + + /// The type which includes information such as the signature of this class. + static $BaseClass$NullableType<$T> nullableType<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $BaseClass$NullableType<$T>( + T, + ); + } + + static $BaseClass$Type<$T> type<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $BaseClass$Type<$T>( + T, + ); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory BaseClass({ + required _$jni.JObjType<$T> T, + }) { + return BaseClass.fromReference( + T, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $BaseClass$NullableType<$T extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $BaseClass$NullableType( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/inheritance/BaseClass;'; + + @_$jni.internal + @_$core.override + BaseClass<$T>? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : BaseClass.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($BaseClass$NullableType, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($BaseClass$NullableType<$T>) && + other is $BaseClass$NullableType<$T> && + T == other.T; + } +} + +final class $BaseClass$Type<$T extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $BaseClass$Type( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/inheritance/BaseClass;'; + + @_$jni.internal + @_$core.override + BaseClass<$T> fromReference(_$jni.JReference reference) => + BaseClass.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => $BaseClass$NullableType(T); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($BaseClass$Type, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($BaseClass$Type<$T>) && + other is $BaseClass$Type<$T> && + T == other.T; + } +} + +/// from: `com.github.dart_lang.jnigen.inheritance.GenericDerivedClass` +class GenericDerivedClass<$T extends _$jni.JObject?> extends BaseClass<$T> { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + GenericDerivedClass.fromReference( + this.T, + _$jni.JReference reference, + ) : $type = type(T), + super.fromReference(T, reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/inheritance/GenericDerivedClass'); + + /// The type which includes information such as the signature of this class. + static $GenericDerivedClass$NullableType<$T> + nullableType<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $GenericDerivedClass$NullableType<$T>( + T, + ); + } + + static $GenericDerivedClass$Type<$T> type<$T extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + ) { + return $GenericDerivedClass$Type<$T>( + T, + ); + } + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory GenericDerivedClass({ + required _$jni.JObjType<$T> T, + }) { + return GenericDerivedClass.fromReference( + T, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $GenericDerivedClass$NullableType<$T extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $GenericDerivedClass$NullableType( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/inheritance/GenericDerivedClass;'; + + @_$jni.internal + @_$core.override + GenericDerivedClass<$T>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : GenericDerivedClass.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => $BaseClass$NullableType(T); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => Object.hash($GenericDerivedClass$NullableType, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GenericDerivedClass$NullableType<$T>) && + other is $GenericDerivedClass$NullableType<$T> && + T == other.T; + } +} + +final class $GenericDerivedClass$Type<$T extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + const $GenericDerivedClass$Type( + this.T, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/inheritance/GenericDerivedClass;'; + + @_$jni.internal + @_$core.override + GenericDerivedClass<$T> fromReference(_$jni.JReference reference) => + GenericDerivedClass.fromReference( + T, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => $BaseClass$NullableType(T); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $GenericDerivedClass$NullableType(T); + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => Object.hash($GenericDerivedClass$Type, T); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($GenericDerivedClass$Type<$T>) && + other is $GenericDerivedClass$Type<$T> && + T == other.T; + } +} + +/// from: `com.github.dart_lang.jnigen.inheritance.SpecificDerivedClass` +class SpecificDerivedClass extends BaseClass<_$jni.JString?> { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + + @_$jni.internal + SpecificDerivedClass.fromReference( + _$jni.JReference reference, + ) : $type = type, + super.fromReference(const _$jni.JStringNullableType(), reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/inheritance/SpecificDerivedClass'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $SpecificDerivedClass$NullableType(); + static const type = $SpecificDerivedClass$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory SpecificDerivedClass() { + return SpecificDerivedClass.fromReference( + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) + .reference); + } +} + +final class $SpecificDerivedClass$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $SpecificDerivedClass$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/inheritance/SpecificDerivedClass;'; + + @_$jni.internal + @_$core.override + SpecificDerivedClass? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : SpecificDerivedClass.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $BaseClass$NullableType(_$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => ($SpecificDerivedClass$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($SpecificDerivedClass$NullableType) && + other is $SpecificDerivedClass$NullableType; + } +} + +final class $SpecificDerivedClass$Type + extends _$jni.JObjType { + @_$jni.internal + const $SpecificDerivedClass$Type(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/inheritance/SpecificDerivedClass;'; + + @_$jni.internal + @_$core.override + SpecificDerivedClass fromReference(_$jni.JReference reference) => + SpecificDerivedClass.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => + const $BaseClass$NullableType(_$jni.JStringNullableType()); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => + const $SpecificDerivedClass$NullableType(); + + @_$jni.internal + @_$core.override + final superCount = 2; + + @_$core.override + int get hashCode => ($SpecificDerivedClass$Type).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($SpecificDerivedClass$Type) && + other is $SpecificDerivedClass$Type; + } +} + +/// from: `com.github.dart_lang.jnigen.annotations.Annotated$Nested` +class Annotated_Nested<$T extends _$jni.JObject?, $U extends _$jni.JObject, + $W extends _$jni.JObject, $V extends _$jni.JObject?> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + final _$jni.JObjType<$W> W; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + Annotated_Nested.fromReference( + this.T, + this.U, + this.W, + this.V, + _$jni.JReference reference, + ) : $type = type(T, U, W, V), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/annotations/Annotated$Nested'); + + /// The type which includes information such as the signature of this class. + static $Annotated_Nested$NullableType<$T, $U, $W, $V> nullableType< + $T extends _$jni.JObject?, + $U extends _$jni.JObject, + $W extends _$jni.JObject, + $V extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$U> U, + _$jni.JObjType<$W> W, + _$jni.JObjType<$V> V, + ) { + return $Annotated_Nested$NullableType<$T, $U, $W, $V>( + T, + U, + W, + V, + ); + } + + static $Annotated_Nested$Type<$T, $U, $W, $V> type< + $T extends _$jni.JObject?, + $U extends _$jni.JObject, + $W extends _$jni.JObject, + $V extends _$jni.JObject?>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$U> U, + _$jni.JObjType<$W> W, + _$jni.JObjType<$V> V, + ) { + return $Annotated_Nested$Type<$T, $U, $W, $V>( + T, + U, + W, + V, + ); + } + + static final _id_v = _class.instanceFieldId( + r'v', + r'Ljava/lang/Object;', + ); + + /// from: `public V v` + /// The returned object must be released after use, by calling the [release] method. + $V get v => _id_v.get(this, V); + + /// from: `public V v` + /// The returned object must be released after use, by calling the [release] method. + set v($V value) => _id_v.set(this, V, value); + + static final _id_u = _class.instanceFieldId( + r'u', + r'Ljava/lang/Object;', + ); + + /// from: `public U u` + /// The returned object must be released after use, by calling the [release] method. + $U get u => _id_u.get(this, U); + + /// from: `public U u` + /// The returned object must be released after use, by calling the [release] method. + set u($U value) => _id_u.set(this, U, value); + + static final _id_new$ = _class.constructorId( + r'(Lcom/github/dart_lang/jnigen/annotations/Annotated;Ljava/lang/Object;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (com.github.dart_lang.jnigen.annotations.Annotated $outerClass, V object)` + /// The returned object must be released after use, by calling the [release] method. + factory Annotated_Nested( + Annotated<$T, $U, $W> $outerClass, + $V object, { + _$jni.JObjType<$T>? T, + _$jni.JObjType<$U>? U, + _$jni.JObjType<$W>? W, + required _$jni.JObjType<$V> V, + }) { + T ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type as $Annotated$Type<_$core.dynamic, _$core.dynamic, + _$core.dynamic>) + .T, + ]) as _$jni.JObjType<$T>; + U ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type as $Annotated$Type<_$core.dynamic, _$core.dynamic, + _$core.dynamic>) + .U, + ]) as _$jni.JObjType<$U>; + W ??= _$jni.lowestCommonSuperType([ + ($outerClass.$type as $Annotated$Type<_$core.dynamic, _$core.dynamic, + _$core.dynamic>) + .W, + ]) as _$jni.JObjType<$W>; + final _$outerClass = $outerClass.reference; + final _object = object?.reference ?? _$jni.jNullReference; + return Annotated_Nested.fromReference( + T, + U, + W, + V, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _$outerClass.pointer, _object.pointer) + .reference); + } +} + +final class $Annotated_Nested$NullableType< + $T extends _$jni.JObject?, + $U extends _$jni.JObject, + $W extends _$jni.JObject, + $V extends _$jni.JObject?> + extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + final _$jni.JObjType<$W> W; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $Annotated_Nested$NullableType( + this.T, + this.U, + this.W, + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/annotations/Annotated$Nested;'; + + @_$jni.internal + @_$core.override + Annotated_Nested<$T, $U, $W, $V>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : Annotated_Nested.fromReference( + T, + U, + W, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($Annotated_Nested$NullableType, T, U, W, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == + ($Annotated_Nested$NullableType<$T, $U, $W, $V>) && + other is $Annotated_Nested$NullableType<$T, $U, $W, $V> && + T == other.T && + U == other.U && + W == other.W && + V == other.V; + } +} + +final class $Annotated_Nested$Type< + $T extends _$jni.JObject?, + $U extends _$jni.JObject, + $W extends _$jni.JObject, + $V extends _$jni.JObject?> + extends _$jni.JObjType> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + final _$jni.JObjType<$W> W; + + @_$jni.internal + final _$jni.JObjType<$V> V; + + @_$jni.internal + const $Annotated_Nested$Type( + this.T, + this.U, + this.W, + this.V, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/annotations/Annotated$Nested;'; + + @_$jni.internal + @_$core.override + Annotated_Nested<$T, $U, $W, $V> fromReference(_$jni.JReference reference) => + Annotated_Nested.fromReference( + T, + U, + W, + V, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => + $Annotated_Nested$NullableType(T, U, W, V); + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($Annotated_Nested$Type, T, U, W, V); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Annotated_Nested$Type<$T, $U, $W, $V>) && + other is $Annotated_Nested$Type<$T, $U, $W, $V> && + T == other.T && + U == other.U && + W == other.W && + V == other.V; + } +} + +/// from: `com.github.dart_lang.jnigen.annotations.Annotated` +class Annotated<$T extends _$jni.JObject?, $U extends _$jni.JObject, + $W extends _$jni.JObject> extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType> $type; + + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + final _$jni.JObjType<$W> W; + + @_$jni.internal + Annotated.fromReference( + this.T, + this.U, + this.W, + _$jni.JReference reference, + ) : $type = type(T, U, W), + super.fromReference(reference); + + static final _class = _$jni.JClass.forName( + r'com/github/dart_lang/jnigen/annotations/Annotated'); + + /// The type which includes information such as the signature of this class. + static $Annotated$NullableType<$T, $U, $W> nullableType< + $T extends _$jni.JObject?, + $U extends _$jni.JObject, + $W extends _$jni.JObject>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$U> U, + _$jni.JObjType<$W> W, + ) { + return $Annotated$NullableType<$T, $U, $W>( + T, + U, + W, + ); + } + + static $Annotated$Type<$T, $U, $W> type<$T extends _$jni.JObject?, + $U extends _$jni.JObject, $W extends _$jni.JObject>( + _$jni.JObjType<$T> T, + _$jni.JObjType<$U> U, + _$jni.JObjType<$W> W, + ) { + return $Annotated$Type<$T, $U, $W>( + T, + U, + W, + ); + } + + static final _id_t = _class.instanceFieldId( + r't', + r'Ljava/lang/Object;', + ); + + /// from: `public T t` + /// The returned object must be released after use, by calling the [release] method. + $T get t => _id_t.get(this, T); + + /// from: `public T t` + /// The returned object must be released after use, by calling the [release] method. + set t($T value) => _id_t.set(this, T, value); + + static final _id_u = _class.instanceFieldId( + r'u', + r'Ljava/lang/Object;', + ); + + /// from: `public U u` + /// The returned object must be released after use, by calling the [release] method. + $U get u => _id_u.get(this, U); + + /// from: `public U u` + /// The returned object must be released after use, by calling the [release] method. + set u($U value) => _id_u.set(this, U, value); + + static final _id_w = _class.instanceFieldId( + r'w', + r'Ljava/lang/Object;', + ); + + /// from: `public W w` + /// The returned object must be released after use, by calling the [release] method. + $W get w => _id_w.get(this, W); + + /// from: `public W w` + /// The returned object must be released after use, by calling the [release] method. + set w($W value) => _id_w.set(this, W, value); + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V', + ); + + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_NewObject') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (T object, U object1, W object2)` + /// The returned object must be released after use, by calling the [release] method. + factory Annotated( + $T object, + $U object1, + $W object2, { + required _$jni.JObjType<$T> T, + _$jni.JObjType<$U>? U, + _$jni.JObjType<$W>? W, + }) { + U ??= _$jni.lowestCommonSuperType([ + object1.$type, + ]) as _$jni.JObjType<$U>; + W ??= _$jni.lowestCommonSuperType([ + object2.$type, + ]) as _$jni.JObjType<$W>; + final _object = object?.reference ?? _$jni.jNullReference; + final _object1 = object1.reference; + final _object2 = object2.reference; + return Annotated.fromReference( + T, + U, + W, + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, + _object.pointer, _object1.pointer, _object2.pointer) + .reference); + } + + static final _id_hello = _class.instanceMethodId( + r'hello', + r'()Ljava/lang/String;', ); - static final _classGenericList = _$jni.ProtectedJniExtensions.lookup< + static final _hello = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, @@ -889,46 +9072,19 @@ class Annotated<$T extends _$jni.JObject?, $U extends _$jni.JObject?, _$jni.JMethodIDPtr, )>(); - /// from: `public java.util.List classGenericList()` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<$T> classGenericList() { - return _classGenericList( - reference.pointer, _id_classGenericList as _$jni.JMethodIDPtr) - .object(_$jni.JListType(T)); - } - - static final _id_classGenericListOfNullable = _class.instanceMethodId( - r'classGenericListOfNullable', - r'()Ljava/util/List;', - ); - - static final _classGenericListOfNullable = - _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>(); - - /// from: `public java.util.List classGenericListOfNullable()` + /// from: `public java.lang.String hello()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<$T?> classGenericListOfNullable() { - return _classGenericListOfNullable(reference.pointer, - _id_classGenericListOfNullable as _$jni.JMethodIDPtr) - .object(_$jni.JListType(T)); + _$jni.JString hello() { + return _hello(reference.pointer, _id_hello as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } - static final _id_nullableClassGenericList = _class.instanceMethodId( - r'nullableClassGenericList', - r'(Z)Ljava/util/List;', + static final _id_nullableHello = _class.instanceMethodId( + r'nullableHello', + r'(Z)Ljava/lang/String;', ); - static final _nullableClassGenericList = _$jni.ProtectedJniExtensions.lookup< + static final _nullableHello = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, @@ -938,585 +9094,618 @@ class Annotated<$T extends _$jni.JObject?, $U extends _$jni.JObject?, _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: `public java.util.List nullableClassGenericList(boolean z)` + /// from: `public java.lang.String nullableHello(boolean z)` /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_Parent_Child( - GrandParent_Parent<$T, $S> $parent, - $U newValue, { - _$jni.JObjType<$T>? T, - _$jni.JObjType<$S>? S, - _$jni.JObjType<$U>? U, - }) { - T ??= _$jni.lowestCommonSuperType([ - ($parent.$type - as $GrandParent_Parent$Type<_$core.dynamic, _$core.dynamic>) - .T, - ]) as _$jni.JObjType<$T>; - S ??= _$jni.lowestCommonSuperType([ - ($parent.$type - as $GrandParent_Parent$Type<_$core.dynamic, _$core.dynamic>) - .S, - ]) as _$jni.JObjType<$S>; - U ??= _$jni.lowestCommonSuperType([ - newValue.$type, - ]) as _$jni.JObjType<$U>; - return GrandParent_Parent_Child.fromReference( - T, - S, - U, - _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, - $parent.reference.pointer, newValue.reference.pointer) - .reference); + _$jni.JString? nullableHello( + bool z, + ) { + return _nullableHello(reference.pointer, + _id_nullableHello as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const _$jni.JStringNullableType()); } -} - -final class $GrandParent_Parent_Child$Type<$T extends _$jni.JObject, - $S extends _$jni.JObject, $U extends _$jni.JObject> - extends _$jni.JObjType> { - @_$jni.internal - final _$jni.JObjType<$T> T; - - @_$jni.internal - final _$jni.JObjType<$S> S; - @_$jni.internal - final _$jni.JObjType<$U> U; - - @_$jni.internal - const $GrandParent_Parent_Child$Type( - this.T, - this.S, - this.U, + static final _id_echo = _class.instanceMethodId( + r'echo', + r'(Ljava/lang/String;)Ljava/lang/String;', ); - @_$jni.internal - @_$core.override - String get signature => - r'Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent$Child;'; - - @_$jni.internal - @_$core.override - GrandParent_Parent_Child<$T, $S, $U> fromReference( - _$jni.JReference reference) => - GrandParent_Parent_Child.fromReference(T, S, U, reference); - - @_$jni.internal - @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); - - @_$jni.internal - @_$core.override - final superCount = 1; - - @_$core.override - int get hashCode => Object.hash($GrandParent_Parent_Child$Type, T, S, U); + static final _echo = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - @_$core.override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParent_Parent_Child$Type<$T, $S, $U>) && - other is $GrandParent_Parent_Child$Type<$T, $S, $U> && - T == other.T && - S == other.S && - U == other.U; + /// from: `public java.lang.String echo(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JString echo( + _$jni.JString string, + ) { + final _string = string.reference; + return _echo( + reference.pointer, _id_echo as _$jni.JMethodIDPtr, _string.pointer) + .object(const _$jni.JStringType()); } -} - -/// from: `com.github.dart_lang.jnigen.generics.GrandParent$Parent` -class GrandParent_Parent<$T extends _$jni.JObject, $S extends _$jni.JObject> - extends _$jni.JObject { - @_$jni.internal - @_$core.override - final _$jni.JObjType> $type; - - @_$jni.internal - final _$jni.JObjType<$T> T; - - @_$jni.internal - final _$jni.JObjType<$S> S; - @_$jni.internal - GrandParent_Parent.fromReference( - this.T, - this.S, - _$jni.JReference reference, - ) : $type = type(T, S), - super.fromReference(reference); + static final _id_nullableEcho = _class.instanceMethodId( + r'nullableEcho', + r'(Ljava/lang/String;)Ljava/lang/String;', + ); - static final _class = _$jni.JClass.forName( - r'com/github/dart_lang/jnigen/generics/GrandParent$Parent'); + static final _nullableEcho = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// The type which includes information such as the signature of this class. - static $GrandParent_Parent$Type<$T, $S> - type<$T extends _$jni.JObject, $S extends _$jni.JObject>( - _$jni.JObjType<$T> T, - _$jni.JObjType<$S> S, + /// from: `public java.lang.String nullableEcho(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JString? nullableEcho( + _$jni.JString? string, ) { - return _nullableClassGenericList(reference.pointer, - _id_nullableClassGenericList as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(_$jni.JListType(T)); + final _string = string?.reference ?? _$jni.jNullReference; + return _nullableEcho(reference.pointer, + _id_nullableEcho as _$jni.JMethodIDPtr, _string.pointer) + .object(const _$jni.JStringNullableType()); } - static final _id_nullableClassGenericListOfNullable = _class.instanceMethodId( - r'nullableClassGenericListOfNullable', - r'(Z)Ljava/util/List;', + static final _id_array = _class.instanceMethodId( + r'array', + r'()[Ljava/lang/String;', ); - static final _nullableClassGenericListOfNullable = - _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int32,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< + static final _array = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: `public java.util.List nullableClassGenericListOfNullable(boolean z)` + /// from: `public java.lang.String[] array()` /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_Parent( - GrandParent<$T> $parent, - $S newValue, { - _$jni.JObjType<$T>? T, - _$jni.JObjType<$S>? S, - }) { - T ??= _$jni.lowestCommonSuperType([ - ($parent.$type as $GrandParent$Type<_$core.dynamic>).T, - ]) as _$jni.JObjType<$T>; - S ??= _$jni.lowestCommonSuperType([ - newValue.$type, - ]) as _$jni.JObjType<$S>; - return GrandParent_Parent.fromReference( - T, - S, - _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, - $parent.reference.pointer, newValue.reference.pointer) - .reference); + _$jni.JArray<_$jni.JString> array() { + return _array(reference.pointer, _id_array as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayType(_$jni.JStringType())); } -} - -final class $GrandParent_Parent$Type<$T extends _$jni.JObject, - $S extends _$jni.JObject> - extends _$jni.JObjType> { - @_$jni.internal - final _$jni.JObjType<$T> T; - - @_$jni.internal - final _$jni.JObjType<$S> S; - - @_$jni.internal - const $GrandParent_Parent$Type( - this.T, - this.S, - ); - - @_$jni.internal - @_$core.override - String get signature => - r'Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;'; - - @_$jni.internal - @_$core.override - GrandParent_Parent<$T, $S> fromReference(_$jni.JReference reference) => - GrandParent_Parent.fromReference(T, S, reference); - - @_$jni.internal - @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); - @_$jni.internal - @_$core.override - final superCount = 1; + static final _id_arrayOfNullable = _class.instanceMethodId( + r'arrayOfNullable', + r'()[Ljava/lang/String;', + ); - @_$core.override - int get hashCode => Object.hash($GrandParent_Parent$Type, T, S); + static final _arrayOfNullable = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - @_$core.override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParent_Parent$Type<$T, $S>) && - other is $GrandParent_Parent$Type<$T, $S> && - T == other.T && - S == other.S; + /// from: `public java.lang.String[] arrayOfNullable()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JArray<_$jni.JString?> arrayOfNullable() { + return _arrayOfNullable( + reference.pointer, _id_arrayOfNullable as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayType(_$jni.JStringNullableType())); } -} -/// from: `com.github.dart_lang.jnigen.generics.GrandParent$StaticParent$Child` -class GrandParent_StaticParent_Child<$S extends _$jni.JObject, - $U extends _$jni.JObject> extends _$jni.JObject { - @_$jni.internal - @_$core.override - final _$jni.JObjType> $type; + static final _id_nullableArray = _class.instanceMethodId( + r'nullableArray', + r'(Z)[Ljava/lang/String;', + ); - @_$jni.internal - final _$jni.JObjType<$S> S; + static final _nullableArray = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - @_$jni.internal - final _$jni.JObjType<$U> U; + /// from: `public java.lang.String[] nullableArray(boolean z)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JArray<_$jni.JString>? nullableArray( + bool z, + ) { + return _nullableArray(reference.pointer, + _id_nullableArray as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const _$jni.JArrayNullableType(_$jni.JStringType())); + } - @_$jni.internal - GrandParent_StaticParent_Child.fromReference( - this.S, - this.U, - _$jni.JReference reference, - ) : $type = type(S, U), - super.fromReference(reference); + static final _id_nullableArrayOfNullable = _class.instanceMethodId( + r'nullableArrayOfNullable', + r'(Z)[Ljava/lang/String;', + ); - static final _class = _$jni.JClass.forName( - r'com/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child'); + static final _nullableArrayOfNullable = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// The type which includes information such as the signature of this class. - static $GrandParent_StaticParent_Child$Type<$S, $U> - type<$S extends _$jni.JObject, $U extends _$jni.JObject>( - _$jni.JObjType<$S> S, - _$jni.JObjType<$U> U, + /// from: `public java.lang.String[] nullableArrayOfNullable(boolean z)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JArray<_$jni.JString?>? nullableArrayOfNullable( + bool z, ) { - return _nullableClassGenericListOfNullable( - reference.pointer, - _id_nullableClassGenericListOfNullable as _$jni.JMethodIDPtr, - z ? 1 : 0) - .object(_$jni.JListType(T)); + return _nullableArrayOfNullable(reference.pointer, + _id_nullableArrayOfNullable as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const _$jni.JArrayNullableType(_$jni.JStringNullableType())); } - static final _id_methodGenericList = _class.instanceMethodId( - r'methodGenericList', - r'(Ljava/lang/Object;)Ljava/util/List;', + static final _id_list = _class.instanceMethodId( + r'list', + r'()Ljava/util/List;', ); - /// from: `public S parentValue` - /// The returned object must be released after use, by calling the [release] method. - $S get parentValue => _id_parentValue.get(this, S); + static final _list = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: `public S parentValue` + /// from: `public java.util.List list()` /// The returned object must be released after use, by calling the [release] method. - set parentValue($S value) => _id_parentValue.set(this, S, value); + _$jni.JList<_$jni.JString> list() { + return _list(reference.pointer, _id_list as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JStringType())); + } - static final _id_value = _class.instanceFieldId( - r'value', - r'Ljava/lang/Object;', + static final _id_listOfNullable = _class.instanceMethodId( + r'listOfNullable', + r'()Ljava/util/List;', ); - /// from: `public U value` - /// The returned object must be released after use, by calling the [release] method. - $U get value => _id_value.get(this, U); + static final _listOfNullable = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: `public U value` + /// from: `public java.util.List listOfNullable()` /// The returned object must be released after use, by calling the [release] method. - set value($U value) => _id_value.set(this, U, value); + _$jni.JList<_$jni.JString?> listOfNullable() { + return _listOfNullable( + reference.pointer, _id_listOfNullable as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JStringNullableType())); + } - static final _id_new$ = _class.constructorId( - r'(Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;Ljava/lang/Object;Ljava/lang/Object;)V', + static final _id_nullableList = _class.instanceMethodId( + r'nullableList', + r'(Z)Ljava/util/List;', ); - static final _new$ = _$jni.ProtectedJniExtensions.lookup< + static final _nullableList = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, - _$jni.VarArgs< - ( - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void> - )>)>>('globalEnv_NewObject') + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>)>(); + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: `public void (com.github.dart_lang.jnigen.generics.GrandParent$StaticParent $parent, S parentValue, U value)` + /// from: `public java.util.List nullableList(boolean z)` /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_StaticParent_Child( - GrandParent_StaticParent<$S> $parent, - $S parentValue, - $U value, { - _$jni.JObjType<$S>? S, - _$jni.JObjType<$U>? U, - }) { - S ??= _$jni.lowestCommonSuperType([ - parentValue.$type, - ($parent.$type as $GrandParent_StaticParent$Type<_$core.dynamic>).S, - ]) as _$jni.JObjType<$S>; - U ??= _$jni.lowestCommonSuperType([ - value.$type, - ]) as _$jni.JObjType<$U>; - return GrandParent_StaticParent_Child.fromReference( - S, - U, - _new$( - _class.reference.pointer, - _id_new$ as _$jni.JMethodIDPtr, - $parent.reference.pointer, - parentValue.reference.pointer, - value.reference.pointer) - .reference); + _$jni.JList<_$jni.JString>? nullableList( + bool z, + ) { + return _nullableList(reference.pointer, + _id_nullableList as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const _$jni.JListNullableType(_$jni.JStringType())); } -} - -final class $GrandParent_StaticParent_Child$Type<$S extends _$jni.JObject, - $U extends _$jni.JObject> - extends _$jni.JObjType> { - @_$jni.internal - final _$jni.JObjType<$S> S; - - @_$jni.internal - final _$jni.JObjType<$U> U; - @_$jni.internal - const $GrandParent_StaticParent_Child$Type( - this.S, - this.U, + static final _id_nullableListOfNullable = _class.instanceMethodId( + r'nullableListOfNullable', + r'(Z)Ljava/util/List;', ); - @_$jni.internal - @_$core.override - String get signature => - r'Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent$Child;'; - - @_$jni.internal - @_$core.override - GrandParent_StaticParent_Child<$S, $U> fromReference( - _$jni.JReference reference) => - GrandParent_StaticParent_Child.fromReference(S, U, reference); - - @_$jni.internal - @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); - - @_$jni.internal - @_$core.override - final superCount = 1; - - @_$core.override - int get hashCode => Object.hash($GrandParent_StaticParent_Child$Type, S, U); + static final _nullableListOfNullable = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - @_$core.override - bool operator ==(Object other) { - return other.runtimeType == - ($GrandParent_StaticParent_Child$Type<$S, $U>) && - other is $GrandParent_StaticParent_Child$Type<$S, $U> && - S == other.S && - U == other.U; + /// from: `public java.util.List nullableListOfNullable(boolean z)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<_$jni.JString?>? nullableListOfNullable( + bool z, + ) { + return _nullableListOfNullable(reference.pointer, + _id_nullableListOfNullable as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const _$jni.JListNullableType(_$jni.JStringNullableType())); } -} -/// from: `com.github.dart_lang.jnigen.generics.GrandParent$StaticParent` -class GrandParent_StaticParent<$S extends _$jni.JObject> extends _$jni.JObject { - @_$jni.internal - @_$core.override - final _$jni.JObjType> $type; + static final _id_classGenericEcho = _class.instanceMethodId( + r'classGenericEcho', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); + + static final _classGenericEcho = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - @_$jni.internal - final _$jni.JObjType<$S> S; + /// from: `public T classGenericEcho(T object)` + /// The returned object must be released after use, by calling the [release] method. + $T classGenericEcho( + $T object, + ) { + final _object = object?.reference ?? _$jni.jNullReference; + return _classGenericEcho(reference.pointer, + _id_classGenericEcho as _$jni.JMethodIDPtr, _object.pointer) + .object(T); + } - @_$jni.internal - GrandParent_StaticParent.fromReference( - this.S, - _$jni.JReference reference, - ) : $type = type(S), - super.fromReference(reference); + static final _id_nullableClassGenericEcho = _class.instanceMethodId( + r'nullableClassGenericEcho', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); - static final _class = _$jni.JClass.forName( - r'com/github/dart_lang/jnigen/generics/GrandParent$StaticParent'); + static final _nullableClassGenericEcho = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// The type which includes information such as the signature of this class. - static $GrandParent_StaticParent$Type<$S> type<$S extends _$jni.JObject>( - _$jni.JObjType<$S> S, + /// from: `public T nullableClassGenericEcho(T object)` + /// The returned object must be released after use, by calling the [release] method. + $T nullableClassGenericEcho( + $T object, ) { - return $GrandParent_StaticParent$Type( - S, - ); + final _object = object?.reference ?? _$jni.jNullReference; + return _nullableClassGenericEcho(reference.pointer, + _id_nullableClassGenericEcho as _$jni.JMethodIDPtr, _object.pointer) + .object(T); } - static final _id_value = _class.instanceFieldId( - r'value', - r'Ljava/lang/Object;', + static final _id_methodGenericEcho = _class.instanceMethodId( + r'methodGenericEcho', + r'(Ljava/lang/Object;)Ljava/lang/Object;', ); - /// from: `public S value` - /// The returned object must be released after use, by calling the [release] method. - $S get value => _id_value.get(this, S); + static final _methodGenericEcho = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: `public S value` + /// from: `public V methodGenericEcho(V object)` /// The returned object must be released after use, by calling the [release] method. - set value($S value) => _id_value.set(this, S, value); + $V methodGenericEcho<$V extends _$jni.JObject?>( + $V object, { + required _$jni.JObjType<$V> V, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _methodGenericEcho(reference.pointer, + _id_methodGenericEcho as _$jni.JMethodIDPtr, _object.pointer) + .object(V); + } - static final _id_new$ = _class.constructorId( - r'(Ljava/lang/Object;)V', + static final _id_methodGenericEcho2 = _class.instanceMethodId( + r'methodGenericEcho2', + r'(Ljava/lang/Object;)Ljava/lang/Object;', ); - static final _new$ = _$jni.ProtectedJniExtensions.lookup< + static final _methodGenericEcho2 = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_NewObject') + 'globalEnv_CallObjectMethod') .asFunction< _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: `public void (S value)` + /// from: `public V methodGenericEcho2(V object)` /// The returned object must be released after use, by calling the [release] method. - factory GrandParent_StaticParent( - $S value, { - _$jni.JObjType<$S>? S, + $V methodGenericEcho2<$V extends _$jni.JObject>( + $V object, { + _$jni.JObjType<$V>? V, }) { - S ??= _$jni.lowestCommonSuperType([ - value.$type, - ]) as _$jni.JObjType<$S>; - return GrandParent_StaticParent.fromReference( - S, - _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, - value.reference.pointer) - .reference); + V ??= _$jni.lowestCommonSuperType([ + object.$type, + ]) as _$jni.JObjType<$V>; + final _object = object.reference; + return _methodGenericEcho2(reference.pointer, + _id_methodGenericEcho2 as _$jni.JMethodIDPtr, _object.pointer) + .object(V); } -} - -final class $GrandParent_StaticParent$Type<$S extends _$jni.JObject> - extends _$jni.JObjType> { - @_$jni.internal - final _$jni.JObjType<$S> S; - @_$jni.internal - const $GrandParent_StaticParent$Type( - this.S, + static final _id_methodGenericEcho3 = _class.instanceMethodId( + r'methodGenericEcho3', + r'(Ljava/lang/Object;)Ljava/lang/Object;', ); - @_$jni.internal - @_$core.override - String get signature => - r'Lcom/github/dart_lang/jnigen/generics/GrandParent$StaticParent;'; - - @_$jni.internal - @_$core.override - GrandParent_StaticParent<$S> fromReference(_$jni.JReference reference) => - GrandParent_StaticParent.fromReference(S, reference); + static final _methodGenericEcho3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - @_$jni.internal - @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + /// from: `public V methodGenericEcho3(V object)` + /// The returned object must be released after use, by calling the [release] method. + $V methodGenericEcho3<$V extends _$jni.JObject>( + $V object, { + _$jni.JObjType<$V>? V, + }) { + V ??= _$jni.lowestCommonSuperType([ + object.$type, + ]) as _$jni.JObjType<$V>; + final _object = object.reference; + return _methodGenericEcho3(reference.pointer, + _id_methodGenericEcho3 as _$jni.JMethodIDPtr, _object.pointer) + .object(V); + } - @_$jni.internal - @_$core.override - final superCount = 1; + static final _id_nullableReturnMethodGenericEcho = _class.instanceMethodId( + r'nullableReturnMethodGenericEcho', + r'(Ljava/lang/Object;Z)Ljava/lang/Object;', + ); - @_$core.override - int get hashCode => Object.hash($GrandParent_StaticParent$Type, S); + static final _nullableReturnMethodGenericEcho = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int32 + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - @_$core.override - bool operator ==(Object other) { - return other.runtimeType == ($GrandParent_StaticParent$Type<$S>) && - other is $GrandParent_StaticParent$Type<$S> && - S == other.S; + /// from: `public V nullableReturnMethodGenericEcho(V object, boolean z)` + /// The returned object must be released after use, by calling the [release] method. + $V nullableReturnMethodGenericEcho<$V extends _$jni.JObject?>( + $V object, + bool z, { + required _$jni.JObjType<$V> V, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _nullableReturnMethodGenericEcho( + reference.pointer, + _id_nullableReturnMethodGenericEcho as _$jni.JMethodIDPtr, + _object.pointer, + z ? 1 : 0) + .object(V); } -} -/// from: `com.github.dart_lang.jnigen.generics.GrandParent` -class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { - @_$jni.internal - @_$core.override - final _$jni.JObjType> $type; + static final _id_nullableMethodGenericEcho = _class.instanceMethodId( + r'nullableMethodGenericEcho', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); - @_$jni.internal - final _$jni.JObjType<$T> T; + static final _nullableMethodGenericEcho = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - @_$jni.internal - GrandParent.fromReference( - this.T, - _$jni.JReference reference, - ) : $type = type(T), - super.fromReference(reference); + /// from: `public V nullableMethodGenericEcho(V object)` + /// The returned object must be released after use, by calling the [release] method. + $V nullableMethodGenericEcho<$V extends _$jni.JObject?>( + $V object, { + required _$jni.JObjType<$V> V, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _nullableMethodGenericEcho( + reference.pointer, + _id_nullableMethodGenericEcho as _$jni.JMethodIDPtr, + _object.pointer) + .object(V); + } - static final _class = - _$jni.JClass.forName(r'com/github/dart_lang/jnigen/generics/GrandParent'); + static final _id_nullableArgMethodGenericEcho = _class.instanceMethodId( + r'nullableArgMethodGenericEcho', + r'(Ljava/lang/Object;)Ljava/lang/Object;', + ); - /// The type which includes information such as the signature of this class. - static $GrandParent$Type<$T> type<$T extends _$jni.JObject>( - _$jni.JObjType<$T> T, - ) { - return $GrandParent$Type( - T, - ); + static final _nullableArgMethodGenericEcho = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public V nullableArgMethodGenericEcho(V object)` + /// The returned object must be released after use, by calling the [release] method. + $V nullableArgMethodGenericEcho<$V extends _$jni.JObject?>( + $V object, { + required _$jni.JObjType<$V> V, + }) { + final _object = object?.reference ?? _$jni.jNullReference; + return _nullableArgMethodGenericEcho( + reference.pointer, + _id_nullableArgMethodGenericEcho as _$jni.JMethodIDPtr, + _object.pointer) + .object(V); } - static final _id_value = _class.instanceFieldId( - r'value', - r'Ljava/lang/Object;', + static final _id_classGenericList = _class.instanceMethodId( + r'classGenericList', + r'()Ljava/util/List;', ); - /// from: `public T value` - /// The returned object must be released after use, by calling the [release] method. - $T get value => _id_value.get(this, T); + static final _classGenericList = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: `public T value` + /// from: `public java.util.List classGenericList()` /// The returned object must be released after use, by calling the [release] method. - set value($T value) => _id_value.set(this, T, value); + _$jni.JList<$T> classGenericList() { + return _classGenericList( + reference.pointer, _id_classGenericList as _$jni.JMethodIDPtr) + .object(_$jni.JListType(T)); + } - static final _id_new$ = _class.constructorId( - r'(Ljava/lang/Object;)V', + static final _id_classGenericListOfNullable = _class.instanceMethodId( + r'classGenericListOfNullable', + r'()Ljava/util/List;', ); - static final _new$ = _$jni.ProtectedJniExtensions.lookup< + static final _classGenericListOfNullable = + _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_NewObject') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: `public void (T value)` + /// from: `public java.util.List classGenericListOfNullable()` /// The returned object must be released after use, by calling the [release] method. - factory GrandParent( - $T value, { - _$jni.JObjType<$T>? T, - }) { - T ??= _$jni.lowestCommonSuperType([ - value.$type, - ]) as _$jni.JObjType<$T>; - return GrandParent.fromReference( - T, - _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr, - value.reference.pointer) - .reference); + _$jni.JList<$T> classGenericListOfNullable() { + return _classGenericListOfNullable(reference.pointer, + _id_classGenericListOfNullable as _$jni.JMethodIDPtr) + .object(_$jni.JListType(T)); } - static final _id_stringParent = _class.instanceMethodId( - r'stringParent', - r'()Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;', + static final _id_nullableClassGenericList = _class.instanceMethodId( + r'nullableClassGenericList', + r'(Z)Ljava/util/List;', ); - static final _stringParent = _$jni.ProtectedJniExtensions.lookup< + static final _nullableClassGenericList = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>(); + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: `public com.github.dart_lang.jnigen.generics.GrandParent.Parent stringParent()` + /// from: `public java.util.List nullableClassGenericList(boolean z)` /// The returned object must be released after use, by calling the [release] method. - GrandParent_Parent<_$jni.JObject, _$jni.JString> stringParent() { - return _stringParent( - reference.pointer, _id_stringParent as _$jni.JMethodIDPtr) - .object(const $GrandParent_Parent$Type( - _$jni.JObjectType(), _$jni.JStringType())); + _$jni.JList<$T>? nullableClassGenericList( + bool z, + ) { + return _nullableClassGenericList(reference.pointer, + _id_nullableClassGenericList as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(_$jni.JListNullableType(T)); } - static final _id_varParent = _class.instanceMethodId( - r'varParent', - r'(Ljava/lang/Object;)Lcom/github/dart_lang/jnigen/generics/GrandParent$Parent;', + static final _id_nullableClassGenericListOfNullable = _class.instanceMethodId( + r'nullableClassGenericListOfNullable', + r'(Z)Ljava/util/List;', ); - static final _varParent = _$jni.ProtectedJniExtensions.lookup< + static final _nullableClassGenericListOfNullable = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int32,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + + /// from: `public java.util.List nullableClassGenericListOfNullable(boolean z)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<$T>? nullableClassGenericListOfNullable( + bool z, + ) { + return _nullableClassGenericListOfNullable( + reference.pointer, + _id_nullableClassGenericListOfNullable as _$jni.JMethodIDPtr, + z ? 1 : 0) + .object(_$jni.JListNullableType(T)); + } + + static final _id_methodGenericList = _class.instanceMethodId( + r'methodGenericList', + r'(Ljava/lang/Object;)Ljava/util/List;', + ); + + static final _methodGenericList = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, @@ -1531,17 +9720,9 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// The returned object must be released after use, by calling the [release] method. _$jni.JList<$V> methodGenericList<$V extends _$jni.JObject?>( $V object, { - _$jni.JObjType<$V>? V, + required _$jni.JObjType<$V> V, }) { - K ??= _$jni.lowestCommonSuperType([ - key.$type, - ($parent.$type as $MyMap$Type<_$core.dynamic, _$core.dynamic>).K, - ]) as _$jni.JObjType<$K>; - V ??= _$jni.lowestCommonSuperType([ - value.$type, - ($parent.$type as $MyMap$Type<_$core.dynamic, _$core.dynamic>).V, - ]) as _$jni.JObjType<$V>; - final _object = object?.reference; + final _object = object?.reference ?? _$jni.jNullReference; return _methodGenericList(reference.pointer, _id_methodGenericList as _$jni.JMethodIDPtr, _object.pointer) .object(_$jni.JListType(V)); @@ -1567,7 +9748,7 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public java.util.List methodGenericListOfNullable()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<$V?> methodGenericListOfNullable<$V extends _$jni.JObject?>({ + _$jni.JList<$V> methodGenericListOfNullable<$V extends _$jni.JObject?>({ required _$jni.JObjType<$V> V, }) { return _methodGenericListOfNullable(reference.pointer, @@ -1597,18 +9778,15 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { _$jni.JList<$V>? nullableMethodGenericList<$V extends _$jni.JObject?>( $V object, bool z, { - _$jni.JObjType<$V>? V, + required _$jni.JObjType<$V> V, }) { - V ??= _$jni.lowestCommonSuperType([ - object.$type, - ]) as _$jni.JObjType<$V>; - final _object = object?.reference; + final _object = object?.reference ?? _$jni.jNullReference; return _nullableMethodGenericList( reference.pointer, _id_nullableMethodGenericList as _$jni.JMethodIDPtr, _object.pointer, z ? 1 : 0) - .object(_$jni.JListType(V)); + .object(_$jni.JListNullableType(V)); } static final _id_nullableMethodGenericListOfNullable = @@ -1629,7 +9807,7 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public java.util.List nullableMethodGenericListOfNullable(boolean z)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<$V?>? + _$jni.JList<$V>? nullableMethodGenericListOfNullable<$V extends _$jni.JObject?>( bool z, { required _$jni.JObjType<$V> V, @@ -1638,7 +9816,7 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { reference.pointer, _id_nullableMethodGenericListOfNullable as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(_$jni.JListType(V)); + .object(_$jni.JListNullableType(V)); } static final _id_firstOfClassGenericList = _class.instanceMethodId( @@ -1659,10 +9837,10 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstOfClassGenericList(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - $T? firstOfClassGenericList( + $T firstOfClassGenericList( _$jni.JList<$T> list, ) { - final _list = list?.reference; + final _list = list.reference; return _firstOfClassGenericList(reference.pointer, _id_firstOfClassGenericList as _$jni.JMethodIDPtr, _list.pointer) .object(T); @@ -1687,22 +9865,15 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstOfClassGenericNullableList(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - static MyStack<$S> fromArrayOfArrayOfGrandParents<$S extends _$jni.JObject>( - _$jni.JArray<_$jni.JArray>> arr, { - _$jni.JObjType<$S>? S, - }) { - S ??= _$jni.lowestCommonSuperType([ - (((((arr.$type as _$jni.JArrayType).elementType as _$jni.JObjType) - as _$jni.JArrayType) - .elementType as _$jni.JObjType) - as $GrandParent$Type<_$core.dynamic>) - .T, - ]) as _$jni.JObjType<$S>; - return _fromArrayOfArrayOfGrandParents( - _class.reference.pointer, - _id_fromArrayOfArrayOfGrandParents as _$jni.JMethodIDPtr, - arr.reference.pointer) - .object($MyStack$Type(S)); + $T firstOfClassGenericNullableList( + _$jni.JList<$T>? list, + ) { + final _list = list?.reference ?? _$jni.jNullReference; + return _firstOfClassGenericNullableList( + reference.pointer, + _id_firstOfClassGenericNullableList as _$jni.JMethodIDPtr, + _list.pointer) + .object(T); } static final _id_firstOfClassGenericListOfNullable = _class.instanceMethodId( @@ -1724,10 +9895,10 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstOfClassGenericListOfNullable(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - $T? firstOfClassGenericListOfNullable( - _$jni.JList<$T?> list, + $T firstOfClassGenericListOfNullable( + _$jni.JList<$T> list, ) { - final _list = list?.reference; + final _list = list.reference; return _firstOfClassGenericListOfNullable( reference.pointer, _id_firstOfClassGenericListOfNullable as _$jni.JMethodIDPtr, @@ -1755,14 +9926,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstOfClassGenericNullableListOfNullable(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - $T? firstOfClassGenericNullableListOfNullable( - _$jni.JList<$T?>? list, + $T firstOfClassGenericNullableListOfNullable( + _$jni.JList<$T>? list, ) { - final _list = list?.reference; + final _list = list?.reference ?? _$jni.jNullReference; return _firstOfClassGenericNullableListOfNullable( reference.pointer, _id_firstOfClassGenericNullableListOfNullable as _$jni.JMethodIDPtr, - _list?.pointer ?? _$jni.nullptr) + _list.pointer) .object(T); } @@ -1784,14 +9955,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstOfMethodGenericList(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - $V? firstOfMethodGenericList<$V extends _$jni.JObject?>( + $V firstOfMethodGenericList<$V extends _$jni.JObject?>( _$jni.JList<$V> list, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (list.$type as _$jni.JListType).E, + (list.$type as _$jni.JListType<_$core.dynamic>).E, ]) as _$jni.JObjType<$V>; - final _list = list?.reference; + final _list = list.reference; return _firstOfMethodGenericList(reference.pointer, _id_firstOfMethodGenericList as _$jni.JMethodIDPtr, _list.pointer) .object(V); @@ -1816,15 +9987,15 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstOfMethodGenericNullableList(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - $V? firstOfMethodGenericNullableList<$V extends _$jni.JObject?>( + $V firstOfMethodGenericNullableList<$V extends _$jni.JObject?>( _$jni.JList<$V>? list, { required _$jni.JObjType<$V> V, }) { - final _list = list?.reference; + final _list = list?.reference ?? _$jni.jNullReference; return _firstOfMethodGenericNullableList( reference.pointer, _id_firstOfMethodGenericNullableList as _$jni.JMethodIDPtr, - _list?.pointer ?? _$jni.nullptr) + _list.pointer) .object(V); } @@ -1847,14 +10018,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstOfMethodGenericListOfNullable(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - $V? firstOfMethodGenericListOfNullable<$V extends _$jni.JObject?>( - _$jni.JList<$V?> list, { + $V firstOfMethodGenericListOfNullable<$V extends _$jni.JObject?>( + _$jni.JList<$V> list, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (list.$type as _$jni.JListType).E, + (list.$type as _$jni.JListType<_$core.dynamic>).E, ]) as _$jni.JObjType<$V>; - final _list = list?.reference; + final _list = list.reference; return _firstOfMethodGenericListOfNullable( reference.pointer, _id_firstOfMethodGenericListOfNullable as _$jni.JMethodIDPtr, @@ -1882,16 +10053,16 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstOfMethodGenericNullableListOfNullable(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. - $V? firstOfMethodGenericNullableListOfNullable<$V extends _$jni.JObject?>( - _$jni.JList<$V?>? list, { + $V firstOfMethodGenericNullableListOfNullable<$V extends _$jni.JObject?>( + _$jni.JList<$V>? list, { required _$jni.JObjType<$V> V, }) { - final _list = list?.reference; + final _list = list?.reference ?? _$jni.jNullReference; return _firstOfMethodGenericNullableListOfNullable( reference.pointer, _id_firstOfMethodGenericNullableListOfNullable as _$jni.JMethodIDPtr, - _list?.pointer ?? _$jni.nullptr) + _list.pointer) .object(V); } @@ -1913,14 +10084,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstKeyOfComboMap(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $T? firstKeyOfComboMap<$V extends _$jni.JObject?>( + $T firstKeyOfComboMap<$V extends _$jni.JObject?>( _$jni.JMap<$T, $V> map, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, + (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, ]) as _$jni.JObjType<$V>; - final _map = map?.reference; + final _map = map.reference; return _firstKeyOfComboMap(reference.pointer, _id_firstKeyOfComboMap as _$jni.JMethodIDPtr, _map.pointer) .object(T); @@ -1944,14 +10115,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstValueOfComboMap(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $V? firstValueOfComboMap<$V extends _$jni.JObject?>( + $V firstValueOfComboMap<$V extends _$jni.JObject?>( _$jni.JMap<$T, $V> map, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, + (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, ]) as _$jni.JObjType<$V>; - final _map = map?.reference; + final _map = map.reference; return _firstValueOfComboMap(reference.pointer, _id_firstValueOfComboMap as _$jni.JMethodIDPtr, _map.pointer) .object(V); @@ -1976,14 +10147,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstKeyOfComboMapNullableKey(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $T? firstKeyOfComboMapNullableKey<$V extends _$jni.JObject?>( - _$jni.JMap<$T?, $V> map, { + $T firstKeyOfComboMapNullableKey<$V extends _$jni.JObject?>( + _$jni.JMap<$T, $V> map, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, + (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, ]) as _$jni.JObjType<$V>; - final _map = map?.reference; + final _map = map.reference; return _firstKeyOfComboMapNullableKey( reference.pointer, _id_firstKeyOfComboMapNullableKey as _$jni.JMethodIDPtr, @@ -2010,14 +10181,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstValueOfComboMapNullableKey(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $V? firstValueOfComboMapNullableKey<$V extends _$jni.JObject?>( - _$jni.JMap<$T?, $V> map, { + $V firstValueOfComboMapNullableKey<$V extends _$jni.JObject?>( + _$jni.JMap<$T, $V> map, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, + (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, ]) as _$jni.JObjType<$V>; - final _map = map?.reference; + final _map = map.reference; return _firstValueOfComboMapNullableKey( reference.pointer, _id_firstValueOfComboMapNullableKey as _$jni.JMethodIDPtr, @@ -2044,14 +10215,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstKeyOfComboMapNullableValue(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $T? firstKeyOfComboMapNullableValue<$V extends _$jni.JObject?>( - _$jni.JMap<$T, $V?> map, { + $T firstKeyOfComboMapNullableValue<$V extends _$jni.JObject?>( + _$jni.JMap<$T, $V> map, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, + (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, ]) as _$jni.JObjType<$V>; - final _map = map?.reference; + final _map = map.reference; return _firstKeyOfComboMapNullableValue( reference.pointer, _id_firstKeyOfComboMapNullableValue as _$jni.JMethodIDPtr, @@ -2078,14 +10249,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstValueOfComboMapNullableValue(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $V? firstValueOfComboMapNullableValue<$V extends _$jni.JObject?>( - _$jni.JMap<$T, $V?> map, { + $V firstValueOfComboMapNullableValue<$V extends _$jni.JObject?>( + _$jni.JMap<$T, $V> map, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, + (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, ]) as _$jni.JObjType<$V>; - final _map = map?.reference; + final _map = map.reference; return _firstValueOfComboMapNullableValue( reference.pointer, _id_firstValueOfComboMapNullableValue as _$jni.JMethodIDPtr, @@ -2113,14 +10284,14 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public T firstKeyOfComboMapNullableKeyAndValue(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $T? firstKeyOfComboMapNullableKeyAndValue<$V extends _$jni.JObject?>( - _$jni.JMap<$T?, $V?> map, { + $T firstKeyOfComboMapNullableKeyAndValue<$V extends _$jni.JObject?>( + _$jni.JMap<$T, $V> map, { _$jni.JObjType<$V>? V, }) { V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, + (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, ]) as _$jni.JObjType<$V>; - final _map = map?.reference; + final _map = map.reference; return _firstKeyOfComboMapNullableKeyAndValue( reference.pointer, _id_firstKeyOfComboMapNullableKeyAndValue as _$jni.JMethodIDPtr, @@ -2148,136 +10319,27 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { /// from: `public V firstValueOfComboMapNullableKeyAndValue(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $V? firstValueOfComboMapNullableKeyAndValue<$V extends _$jni.JObject?>( - _$jni.JMap<$T?, $V?> map, { - _$jni.JObjType<$V>? V, - }) { - V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, - ]) as _$jni.JObjType<$V>; - final _map = map?.reference; - return _firstValueOfComboMapNullableKeyAndValue( - reference.pointer, - _id_firstValueOfComboMapNullableKeyAndValue as _$jni.JMethodIDPtr, - _map.pointer) - .object(V); - } - - static final _id_firstEntryOfComboMap = _class.instanceMethodId( - r'firstEntryOfComboMap', - r'(Ljava/util/Map;)Ljava/util/Map$Entry;', - ); - - static final _firstEntryOfComboMap = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - - /// from: `public java.util.Map$Entry firstEntryOfComboMap(java.util.Map map)` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JObject? firstEntryOfComboMap<$V extends _$jni.JObject?>( - _$jni.JMap<$T, $V> map, { - _$jni.JObjType<$V>? V, - }) { - V ??= _$jni.lowestCommonSuperType([ - (map.$type as _$jni.JMapType).V, - ]) as _$jni.JObjType<$V>; - final _map = map?.reference; - return _firstEntryOfComboMap(reference.pointer, - _id_firstEntryOfComboMap as _$jni.JMethodIDPtr, _map.pointer) - .object(const _$jni.JObjectType()); - } - - static final _id_getW = _class.instanceMethodId( - r'getW', - r'()Ljava/lang/Object;', - ); - - static final _getW = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>(); - - /// from: `public W getW()` - /// The returned object must be released after use, by calling the [release] method. - $W? getW() { - return _getW(reference.pointer, _id_getW as _$jni.JMethodIDPtr).object(W); - } - - static final _id_nullableGetW = _class.instanceMethodId( - r'nullableGetW', - r'(Z)Ljava/lang/Object;', - ); - - static final _nullableGetW = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - - /// from: `public W nullableGetW(boolean z)` - /// The returned object must be released after use, by calling the [release] method. - $W? nullableGetW( - bool z, - ) { - return _nullableGetW(reference.pointer, - _id_nullableGetW as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(W); - } - - static final _id_list3dOfT = _class.instanceMethodId( - r'list3dOfT', - r'()Ljava/util/List;', - ); - - static final _firstKeyOf = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( - 'globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - - /// from: `public abstract T firstKeyOf(java.util.Map map)` - /// The returned object must be released after use, by calling the [release] method. - $T firstKeyOf<$U extends _$jni.JObject>( - _$jni.JMap<$T, $U> map, { - _$jni.JObjType<$U>? U, + $V firstValueOfComboMapNullableKeyAndValue<$V extends _$jni.JObject?>( + _$jni.JMap<$T, $V> map, { + _$jni.JObjType<$V>? V, }) { - U ??= _$jni.lowestCommonSuperType([ + V ??= _$jni.lowestCommonSuperType([ (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, - ]) as _$jni.JObjType<$U>; - return _firstKeyOf(reference.pointer, _id_firstKeyOf as _$jni.JMethodIDPtr, - map.reference.pointer) - .object(T); + ]) as _$jni.JObjType<$V>; + final _map = map.reference; + return _firstValueOfComboMapNullableKeyAndValue( + reference.pointer, + _id_firstValueOfComboMapNullableKeyAndValue as _$jni.JMethodIDPtr, + _map.pointer) + .object(V); } - static final _id_firstValueOf = _class.instanceMethodId( - r'firstValueOf', - r'(Ljava/util/Map;)Ljava/lang/Object;', + static final _id_firstEntryOfComboMap = _class.instanceMethodId( + r'firstEntryOfComboMap', + r'(Ljava/util/Map;)Ljava/util/Map$Entry;', ); - static final _firstValueOf = _$jni.ProtectedJniExtensions.lookup< + static final _firstEntryOfComboMap = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, @@ -2288,38 +10350,27 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: `public abstract U firstValueOf(java.util.Map map)` + /// from: `public java.util.Map$Entry firstEntryOfComboMap(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - $U firstValueOf<$U extends _$jni.JObject>( - _$jni.JMap<$T, $U> map, { - _$jni.JObjType<$U>? U, + _$jni.JObject? firstEntryOfComboMap<$V extends _$jni.JObject?>( + _$jni.JMap<$T, $V> map, { + _$jni.JObjType<$V>? V, }) { - U ??= _$jni.lowestCommonSuperType([ + V ??= _$jni.lowestCommonSuperType([ (map.$type as _$jni.JMapType<_$core.dynamic, _$core.dynamic>).V, - ]) as _$jni.JObjType<$U>; - return _firstValueOf(reference.pointer, - _id_firstValueOf as _$jni.JMethodIDPtr, map.reference.pointer) - .object(U); + ]) as _$jni.JObjType<$V>; + final _map = map.reference; + return _firstEntryOfComboMap(reference.pointer, + _id_firstEntryOfComboMap as _$jni.JMethodIDPtr, _map.pointer) + .object(const _$jni.JObjectNullableType()); } - /// Maps a specific port to the implemented interface. - static final _$core.Map _$impls = {}; - static _$jni.JObjectPtr _$invoke( - int port, - _$jni.JObjectPtr descriptor, - _$jni.JObjectPtr args, - ) { - return _$invokeMethod( - port, - _$jni.MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } + static final _id_getW = _class.instanceMethodId( + r'getW', + r'()Ljava/lang/Object;', + ); - static final _$jni.Pointer< + static final _getW = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, @@ -2331,43 +10382,43 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { _$jni.JMethodIDPtr, )>(); - /// from: `public java.util.List list3dOfT()` + /// from: `public W getW()` /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JList<_$jni.JList<$T?>>> list3dOfT() { - return _list3dOfT(reference.pointer, _id_list3dOfT as _$jni.JMethodIDPtr) - .object(_$jni.JListType(_$jni.JListType(_$jni.JListType(T)))); + $W getW() { + return _getW(reference.pointer, _id_getW as _$jni.JMethodIDPtr).object(W); } - static final _id_list3dOfU = _class.instanceMethodId( - r'list3dOfU', - r'()Ljava/util/List;', + static final _id_nullableGetW = _class.instanceMethodId( + r'nullableGetW', + r'(Z)Ljava/lang/Object;', ); - static final _list3dOfU = _$jni.ProtectedJniExtensions.lookup< + static final _nullableGetW = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - )>(); + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: `public java.util.List list3dOfU()` + /// from: `public W nullableGetW(boolean z)` /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JList<_$jni.JList<$U?>>> list3dOfU() { - return _list3dOfU(reference.pointer, _id_list3dOfU as _$jni.JMethodIDPtr) - .object(_$jni.JListType(_$jni.JListType(_$jni.JListType(U)))); + $W? nullableGetW( + bool z, + ) { + return _nullableGetW(reference.pointer, + _id_nullableGetW as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(W); } - static final _id_list3dOfW = _class.instanceMethodId( - r'list3dOfW', + static final _id_list3dOfT = _class.instanceMethodId( + r'list3dOfT', r'()Ljava/util/List;', ); - static final _list3dOfW = _$jni.ProtectedJniExtensions.lookup< + static final _list3dOfT = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, @@ -2379,235 +10430,80 @@ class GrandParent<$T extends _$jni.JObject> extends _$jni.JObject { _$jni.JMethodIDPtr, )>(); - /// from: `public java.util.List list3dOfW()` - /// The returned object must be released after use, by calling the [release] method. - _$jni.JList<_$jni.JList<_$jni.JList<$W?>>> list3dOfW() { - return _list3dOfW(reference.pointer, _id_list3dOfW as _$jni.JMethodIDPtr) - .object(_$jni.JListType(_$jni.JListType(_$jni.JListType(W)))); - } - - static final _id_list3dOfNullableU = _class.instanceMethodId( - r'list3dOfNullableU', - r'(Z)Ljava/util/List;', - ); - - static final _list3dOfNullableU = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') - .asFunction< - _$jni.JniResult Function( - _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - - /// from: `public java.util.List list3dOfNullableU(boolean z)` + /// from: `public java.util.List list3dOfT()` /// The returned object must be released after use, by calling the [release] method. - factory MyInterfaceConsumer() { - return MyInterfaceConsumer.fromReference( - _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) - .reference); - } - - static final _id_consumeOnAnotherThread = _class.staticMethodId( - r'consumeOnAnotherThread', - r'(Lcom/github/dart_lang/jnigen/interfaces/MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V', - ); - - static final _consumeOnAnotherThread = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JThrowablePtr Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs< - ( - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - _$jni.Int32, - _$jni.Int32, - _$jni.Int32, - _$jni.Double, - _$jni.Pointer<_$jni.Void> - )>)>>('globalEnv_CallStaticVoidMethod') - .asFunction< - _$jni.JThrowablePtr Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - int, - int, - int, - double, - _$jni.Pointer<_$jni.Void>)>(); - - /// from: `static public void consumeOnAnotherThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String s, int a, boolean b, char c, double d, T t)` - static void consumeOnAnotherThread<$T extends _$jni.JObject>( - MyInterface<$T> myInterface, - _$jni.JString s, - int a, - bool b, - int c, - double d, - $T t, { - _$jni.JObjType<$T>? T, - }) { - T ??= _$jni.lowestCommonSuperType([ - t.$type, - (myInterface.$type as $MyInterface$Type<_$core.dynamic>).T, - ]) as _$jni.JObjType<$T>; - _consumeOnAnotherThread( - _class.reference.pointer, - _id_consumeOnAnotherThread as _$jni.JMethodIDPtr, - myInterface.reference.pointer, - s.reference.pointer, - a, - b ? 1 : 0, - c, - d, - t.reference.pointer) - .check(); - } - - static final _id_consumeOnSameThread = _class.staticMethodId( - r'consumeOnSameThread', - r'(Lcom/github/dart_lang/jnigen/interfaces/MyInterface;Ljava/lang/String;IZCDLjava/lang/Object;)V', - ); - - static final _consumeOnSameThread = _$jni.ProtectedJniExtensions.lookup< - _$jni.NativeFunction< - _$jni.JThrowablePtr Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.VarArgs< - ( - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - _$jni.Int32, - _$jni.Int32, - _$jni.Int32, - _$jni.Double, - _$jni.Pointer<_$jni.Void> - )>)>>('globalEnv_CallStaticVoidMethod') - .asFunction< - _$jni.JThrowablePtr Function( - _$jni.Pointer<_$jni.Void>, - _$jni.JMethodIDPtr, - _$jni.Pointer<_$jni.Void>, - _$jni.Pointer<_$jni.Void>, - int, - int, - int, - double, - _$jni.Pointer<_$jni.Void>)>(); - - /// from: `static public void consumeOnSameThread(com.github.dart_lang.jnigen.interfaces.MyInterface myInterface, java.lang.String s, int a, boolean b, char c, double d, T t)` - static void consumeOnSameThread<$T extends _$jni.JObject>( - MyInterface<$T> myInterface, - _$jni.JString s, - int a, - bool b, - int c, - double d, - $T t, { - _$jni.JObjType<$T>? T, - }) { - T ??= _$jni.lowestCommonSuperType([ - t.$type, - (myInterface.$type as $MyInterface$Type<_$core.dynamic>).T, - ]) as _$jni.JObjType<$T>; - _consumeOnSameThread( - _class.reference.pointer, - _id_consumeOnSameThread as _$jni.JMethodIDPtr, - myInterface.reference.pointer, - s.reference.pointer, - a, - b ? 1 : 0, - c, - d, - t.reference.pointer) - .check(); - } -} - -final class $MyInterfaceConsumer$Type - extends _$jni.JObjType { - @_$jni.internal - const $MyInterfaceConsumer$Type(); - - @_$jni.internal - @_$core.override - String get signature => - r'Lcom/github/dart_lang/jnigen/interfaces/MyInterfaceConsumer;'; - - @_$jni.internal - @_$core.override - MyInterfaceConsumer fromReference(_$jni.JReference reference) => - MyInterfaceConsumer.fromReference(reference); - - @_$jni.internal - @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); - - @_$jni.internal - @_$core.override - final superCount = 1; - - @_$core.override - int get hashCode => ($MyInterfaceConsumer$Type).hashCode; - - @_$core.override - bool operator ==(Object other) { - return other.runtimeType == ($MyInterfaceConsumer$Type) && - other is $MyInterfaceConsumer$Type; + _$jni.JList<_$jni.JList<_$jni.JList<$T>>> list3dOfT() { + return _list3dOfT(reference.pointer, _id_list3dOfT as _$jni.JMethodIDPtr) + .object(_$jni.JListType(_$jni.JListType(_$jni.JListType(T)))); } -} -/// from: `com.github.dart_lang.jnigen.interfaces.MyRunnable` -class MyRunnable extends _$jni.JObject { - @_$jni.internal - @_$core.override - final _$jni.JObjType $type; + static final _id_list3dOfU = _class.instanceMethodId( + r'list3dOfU', + r'()Ljava/util/List;', + ); - @_$jni.internal - MyRunnable.fromReference( - _$jni.JReference reference, - ) : $type = type, - super.fromReference(reference); + static final _list3dOfU = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - static final _class = _$jni.JClass.forName( - r'com/github/dart_lang/jnigen/interfaces/MyRunnable'); + /// from: `public java.util.List list3dOfU()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<_$jni.JList<_$jni.JList<$U>>> list3dOfU() { + return _list3dOfU(reference.pointer, _id_list3dOfU as _$jni.JMethodIDPtr) + .object(_$jni.JListType(_$jni.JListType(_$jni.JListType(U)))); + } - /// The type which includes information such as the signature of this class. - static const type = $MyRunnable$Type(); - static final _id_run = _class.instanceMethodId( - r'run', - r'()V', + static final _id_list3dOfW = _class.instanceMethodId( + r'list3dOfW', + r'()Ljava/util/List;', ); - static final _run = _$jni.ProtectedJniExtensions.lookup< + static final _list3dOfW = _$jni.ProtectedJniExtensions.lookup< _$jni.NativeFunction< - _$jni.JThrowablePtr Function( + _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, - )>>('globalEnv_CallVoidMethod') + )>>('globalEnv_CallObjectMethod') .asFunction< - _$jni.JThrowablePtr Function( + _$jni.JniResult Function( _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, )>(); - /// from: `public abstract void run()` - void run() { - _run(reference.pointer, _id_run as _$jni.JMethodIDPtr).check(); + /// from: `public java.util.List list3dOfW()` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<_$jni.JList<_$jni.JList<$W>>> list3dOfW() { + return _list3dOfW(reference.pointer, _id_list3dOfW as _$jni.JMethodIDPtr) + .object(_$jni.JListType(_$jni.JListType(_$jni.JListType(W)))); } - /// Maps a specific port to the implemented interface. - static final _$core.Map _$impls = {}; - static _$jni.JObjectPtr _$invoke( - int port, - _$jni.JObjectPtr descriptor, - _$jni.JObjectPtr args, + static final _id_list3dOfNullableU = _class.instanceMethodId( + r'list3dOfNullableU', + r'(Z)Ljava/util/List;', + ); + + static final _list3dOfNullableU = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); + + /// from: `public java.util.List list3dOfNullableU(boolean z)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<_$jni.JList<_$jni.JList<$U?>>> list3dOfNullableU( + bool z, ) { return _list3dOfNullableU(reference.pointer, _id_list3dOfNullableU as _$jni.JMethodIDPtr, z ? 1 : 0) @@ -2658,9 +10554,9 @@ class MyRunnable extends _$jni.JObject { /// from: `public com.github.dart_lang.jnigen.annotations.Annotated.Nested nested()` /// The returned object must be released after use, by calling the [release] method. - Annotated_Nested<$T?, $U?, $W?, _$jni.JInteger>? nested() { - return _nested(reference.pointer, _id_nested as _$jni.JMethodIDPtr) - .object($Annotated_Nested$Type(T, U, W, const _$jni.JIntegerType())); + Annotated_Nested<$T, $U, $W, _$jni.JInteger>? nested() { + return _nested(reference.pointer, _id_nested as _$jni.JMethodIDPtr).object( + $Annotated_Nested$NullableType(T, U, W, const _$jni.JIntegerType())); } static final _id_intList = _class.instanceMethodId( @@ -2688,9 +10584,68 @@ class MyRunnable extends _$jni.JObject { } } -final class $Annotated$Type< +final class $Annotated$NullableType< $T extends _$jni.JObject?, - $U extends _$jni.JObject?, + $U extends _$jni.JObject, + $W extends _$jni.JObject> extends _$jni.JObjType?> { + @_$jni.internal + final _$jni.JObjType<$T> T; + + @_$jni.internal + final _$jni.JObjType<$U> U; + + @_$jni.internal + final _$jni.JObjType<$W> W; + + @_$jni.internal + const $Annotated$NullableType( + this.T, + this.U, + this.W, + ); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/annotations/Annotated;'; + + @_$jni.internal + @_$core.override + Annotated<$T, $U, $W>? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : Annotated.fromReference( + T, + U, + W, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType?> get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => Object.hash($Annotated$NullableType, T, U, W); + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Annotated$NullableType<$T, $U, $W>) && + other is $Annotated$NullableType<$T, $U, $W> && + T == other.T && + U == other.U && + W == other.W; + } +} + +final class $Annotated$Type<$T extends _$jni.JObject?, $U extends _$jni.JObject, $W extends _$jni.JObject> extends _$jni.JObjType> { @_$jni.internal final _$jni.JObjType<$T> T; @@ -2716,11 +10671,20 @@ final class $Annotated$Type< @_$jni.internal @_$core.override Annotated<$T, $U, $W> fromReference(_$jni.JReference reference) => - Annotated.fromReference(T, U, W, reference); + Annotated.fromReference( + T, + U, + W, + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType?> get nullableType => + $Annotated$NullableType(T, U, W); @_$jni.internal @_$core.override @@ -2755,6 +10719,7 @@ class JsonSerializable_Case extends _$jni.JObject { r'com/github/dart_lang/jnigen/annotations/JsonSerializable$Case'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonSerializable_Case$NullableType(); static const type = $JsonSerializable_Case$Type(); static final _id_SNAKE_CASE = _class.staticFieldId( r'SNAKE_CASE', @@ -2764,7 +10729,7 @@ class JsonSerializable_Case extends _$jni.JObject { /// from: `static public final com.github.dart_lang.jnigen.annotations.JsonSerializable$Case SNAKE_CASE` /// The returned object must be released after use, by calling the [release] method. static JsonSerializable_Case? get SNAKE_CASE => - _id_SNAKE_CASE.get(_class, const $JsonSerializable_Case$Type()); + _id_SNAKE_CASE.get(_class, const $JsonSerializable_Case$NullableType()); static final _id_KEBAB_CASE = _class.staticFieldId( r'KEBAB_CASE', @@ -2774,7 +10739,7 @@ class JsonSerializable_Case extends _$jni.JObject { /// from: `static public final com.github.dart_lang.jnigen.annotations.JsonSerializable$Case KEBAB_CASE` /// The returned object must be released after use, by calling the [release] method. static JsonSerializable_Case? get KEBAB_CASE => - _id_KEBAB_CASE.get(_class, const $JsonSerializable_Case$Type()); + _id_KEBAB_CASE.get(_class, const $JsonSerializable_Case$NullableType()); static final _id_CAMEL_CASE = _class.staticFieldId( r'CAMEL_CASE', @@ -2784,7 +10749,7 @@ class JsonSerializable_Case extends _$jni.JObject { /// from: `static public final com.github.dart_lang.jnigen.annotations.JsonSerializable$Case CAMEL_CASE` /// The returned object must be released after use, by calling the [release] method. static JsonSerializable_Case? get CAMEL_CASE => - _id_CAMEL_CASE.get(_class, const $JsonSerializable_Case$Type()); + _id_CAMEL_CASE.get(_class, const $JsonSerializable_Case$NullableType()); static final _id_values = _class.staticMethodId( r'values', @@ -2807,7 +10772,8 @@ class JsonSerializable_Case extends _$jni.JObject { /// 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.JArrayType($JsonSerializable_Case$Type())); + .object(const _$jni.JArrayNullableType( + $JsonSerializable_Case$NullableType())); } static final _id_valueOf = _class.staticMethodId( @@ -2831,10 +10797,50 @@ class JsonSerializable_Case extends _$jni.JObject { static JsonSerializable_Case? valueOf( _$jni.JString? string, ) { - final _string = string?.reference; + final _string = string?.reference ?? _$jni.jNullReference; return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, - _string?.pointer ?? _$jni.nullptr) - .object(const $JsonSerializable_Case$Type()); + _string.pointer) + .object(const $JsonSerializable_Case$NullableType()); + } +} + +final class $JsonSerializable_Case$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $JsonSerializable_Case$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/annotations/JsonSerializable$Case;'; + + @_$jni.internal + @_$core.override + JsonSerializable_Case? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : JsonSerializable_Case.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonSerializable_Case$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonSerializable_Case$NullableType) && + other is $JsonSerializable_Case$NullableType; } } @@ -2851,11 +10857,17 @@ final class $JsonSerializable_Case$Type @_$jni.internal @_$core.override JsonSerializable_Case fromReference(_$jni.JReference reference) => - JsonSerializable_Case.fromReference(reference); + JsonSerializable_Case.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonSerializable_Case$NullableType(); @_$jni.internal @_$core.override @@ -2887,6 +10899,7 @@ class JsonSerializable extends _$jni.JObject { r'com/github/dart_lang/jnigen/annotations/JsonSerializable'); /// The type which includes information such as the signature of this class. + static const nullableType = $JsonSerializable$NullableType(); static const type = $JsonSerializable$Type(); static final _id_value = _class.instanceMethodId( r'value', @@ -2909,7 +10922,7 @@ class JsonSerializable extends _$jni.JObject { /// The returned object must be released after use, by calling the [release] method. JsonSerializable_Case? value() { return _value(reference.pointer, _id_value as _$jni.JMethodIDPtr) - .object(const $JsonSerializable_Case$Type()); + .object(const $JsonSerializable_Case$NullableType()); } /// Maps a specific port to the implemented interface. @@ -3012,6 +11025,46 @@ final class _$JsonSerializable with $JsonSerializable { } } +final class $JsonSerializable$NullableType + extends _$jni.JObjType { + @_$jni.internal + const $JsonSerializable$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/annotations/JsonSerializable;'; + + @_$jni.internal + @_$core.override + JsonSerializable? fromReference(_$jni.JReference reference) => + reference.isNull + ? null + : JsonSerializable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($JsonSerializable$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($JsonSerializable$NullableType) && + other is $JsonSerializable$NullableType; + } +} + final class $JsonSerializable$Type extends _$jni.JObjType { @_$jni.internal const $JsonSerializable$Type(); @@ -3024,11 +11077,17 @@ final class $JsonSerializable$Type extends _$jni.JObjType { @_$jni.internal @_$core.override JsonSerializable fromReference(_$jni.JReference reference) => - JsonSerializable.fromReference(reference); + JsonSerializable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $JsonSerializable$NullableType(); @_$jni.internal @_$core.override @@ -3060,6 +11119,7 @@ class MyDataClass extends _$jni.JObject { r'com/github/dart_lang/jnigen/annotations/MyDataClass'); /// The type which includes information such as the signature of this class. + static const nullableType = $MyDataClass$NullableType(); static const type = $MyDataClass$Type(); static final _id_new$ = _class.constructorId( r'()V', @@ -3086,6 +11146,44 @@ class MyDataClass extends _$jni.JObject { } } +final class $MyDataClass$NullableType extends _$jni.JObjType { + @_$jni.internal + const $MyDataClass$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => + r'Lcom/github/dart_lang/jnigen/annotations/MyDataClass;'; + + @_$jni.internal + @_$core.override + MyDataClass? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : MyDataClass.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($MyDataClass$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($MyDataClass$NullableType) && + other is $MyDataClass$NullableType; + } +} + final class $MyDataClass$Type extends _$jni.JObjType { @_$jni.internal const $MyDataClass$Type(); @@ -3098,11 +11196,17 @@ final class $MyDataClass$Type extends _$jni.JObjType { @_$jni.internal @_$core.override MyDataClass fromReference(_$jni.JReference reference) => - MyDataClass.fromReference(reference); + MyDataClass.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => + const $MyDataClass$NullableType(); @_$jni.internal @_$core.override @@ -3134,6 +11238,7 @@ class NotNull extends _$jni.JObject { _$jni.JClass.forName(r'com/github/dart_lang/jnigen/annotations/NotNull'); /// The type which includes information such as the signature of this class. + static const nullableType = $NotNull$NullableType(); static const type = $NotNull$Type(); /// Maps a specific port to the implemented interface. @@ -3216,6 +11321,43 @@ final class _$NotNull with $NotNull { _$NotNull(); } +final class $NotNull$NullableType extends _$jni.JObjType { + @_$jni.internal + const $NotNull$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/annotations/NotNull;'; + + @_$jni.internal + @_$core.override + NotNull? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : NotNull.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($NotNull$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($NotNull$NullableType) && + other is $NotNull$NullableType; + } +} + final class $NotNull$Type extends _$jni.JObjType { @_$jni.internal const $NotNull$Type(); @@ -3226,12 +11368,16 @@ final class $NotNull$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - NotNull fromReference(_$jni.JReference reference) => - NotNull.fromReference(reference); + NotNull fromReference(_$jni.JReference reference) => NotNull.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => const $NotNull$NullableType(); @_$jni.internal @_$core.override @@ -3262,6 +11408,7 @@ class Nullable extends _$jni.JObject { _$jni.JClass.forName(r'com/github/dart_lang/jnigen/annotations/Nullable'); /// The type which includes information such as the signature of this class. + static const nullableType = $Nullable$NullableType(); static const type = $Nullable$Type(); /// Maps a specific port to the implemented interface. @@ -3344,6 +11491,43 @@ final class _$Nullable with $Nullable { _$Nullable(); } +final class $Nullable$NullableType extends _$jni.JObjType { + @_$jni.internal + const $Nullable$NullableType(); + + @_$jni.internal + @_$core.override + String get signature => r'Lcom/github/dart_lang/jnigen/annotations/Nullable;'; + + @_$jni.internal + @_$core.override + Nullable? fromReference(_$jni.JReference reference) => reference.isNull + ? null + : Nullable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); + + @_$jni.internal + @_$core.override + _$jni.JObjType get nullableType => this; + + @_$jni.internal + @_$core.override + final superCount = 1; + + @_$core.override + int get hashCode => ($Nullable$NullableType).hashCode; + + @_$core.override + bool operator ==(Object other) { + return other.runtimeType == ($Nullable$NullableType) && + other is $Nullable$NullableType; + } +} + final class $Nullable$Type extends _$jni.JObjType { @_$jni.internal const $Nullable$Type(); @@ -3354,12 +11538,16 @@ final class $Nullable$Type extends _$jni.JObjType { @_$jni.internal @_$core.override - Nullable fromReference(_$jni.JReference reference) => - Nullable.fromReference(reference); + Nullable fromReference(_$jni.JReference reference) => Nullable.fromReference( + reference, + ); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectNullableType(); @_$jni.internal @_$core.override - _$jni.JObjType get superType => const _$jni.JObjectType(); + _$jni.JObjType get nullableType => const $Nullable$NullableType(); @_$jni.internal @_$core.override diff --git a/pkgs/jnigen/test/simple_package_test/generate.dart b/pkgs/jnigen/test/simple_package_test/generate.dart index 1e2fc750c..b4983e786 100644 --- a/pkgs/jnigen/test/simple_package_test/generate.dart +++ b/pkgs/jnigen/test/simple_package_test/generate.dart @@ -73,11 +73,11 @@ Config getConfig() { classPath: [Uri.directory(javaPath)], summarizerOptions: SummarizerOptions(backend: SummarizerBackend.asm), classes: [ - // 'com.github.dart_lang.jnigen.simple_package', - // 'com.github.dart_lang.jnigen.pkg2', - // 'com.github.dart_lang.jnigen.generics', - // 'com.github.dart_lang.jnigen.interfaces', - // 'com.github.dart_lang.jnigen.inheritance', + 'com.github.dart_lang.jnigen.simple_package', + 'com.github.dart_lang.jnigen.pkg2', + 'com.github.dart_lang.jnigen.generics', + 'com.github.dart_lang.jnigen.interfaces', + 'com.github.dart_lang.jnigen.inheritance', 'com.github.dart_lang.jnigen.annotations', ], logLevel: Level.INFO, diff --git a/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart b/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart index fdabd98d5..e95554ba4 100644 --- a/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart +++ b/pkgs/jnigen/test/simple_package_test/runtime_test_registrant.dart @@ -40,7 +40,7 @@ void registerTests(String groupName, TestRunnerCallback test) { expect(Example.OFF, equals(0)); expect(Example.PI, closeTo(pi, fpDelta)); expect(Example.SEMICOLON, equals(';'.codeUnitAt(0))); - expect(Example.SEMICOLON_STRING.toDartString(releaseOriginal: true), + expect(Example.SEMICOLON_STRING!.toDartString(releaseOriginal: true), equals(';')); }); @@ -56,18 +56,18 @@ void registerTests(String groupName, TestRunnerCallback test) { test('Static fields & methods - string', () { expect( - Example.getName().toDartString(releaseOriginal: true), + Example.getName()!.toDartString(releaseOriginal: true), isIn(['Ragnar Lothbrok', 'Theseus']), ); Example.setName('Theseus'.toJString()); expect( - Example.getName().toDartString(releaseOriginal: true), + Example.getName()!.toDartString(releaseOriginal: true), equals('Theseus'), ); }); test('Static fields and methods - Object', () { - final nested = Example.getNestedInstance(); + final nested = Example.getNestedInstance()!; expect(nested.getValue(), isIn([true, false])); nested.setValue(false); expect(nested.getValue(), isFalse); @@ -83,13 +83,13 @@ void registerTests(String groupName, TestRunnerCallback test) { final e = Example(); expect(e.getNumber(), equals(0)); expect(e.getIsUp(), true); - expect(e.getCodename().toDartString(), equals('achilles')); + expect(e.getCodename()!.toDartString(), equals('achilles')); e.setNumber(1); e.setUp(false); e.setCodename('spartan'.toJString()); expect(e.getIsUp(), false); expect(e.getNumber(), 1); - expect(e.getCodename().toDartString(), equals('spartan')); + expect(e.getCodename()!.toDartString(), equals('spartan')); e.release(); }); @@ -112,14 +112,14 @@ void registerTests(String groupName, TestRunnerCallback test) { test('Misc. instance methods', () { final e = Example(); final rand = e.getRandom(); - expect(rand.isNull, isFalse); + expect(rand, isNotNull); final _ = e.getRandomLong(); final id = - e.getRandomNumericString(rand).toDartString(releaseOriginal: true); + e.getRandomNumericString(rand)!.toDartString(releaseOriginal: true); expect(int.parse(id), lessThan(10000)); e.setNumber(145); expect( - e.getSelf().getSelf().getSelf().getSelf().getNumber(), + e.getSelf()!.getSelf()!.getSelf()!.getSelf()!.getNumber(), equals(145), ); e.release(); @@ -129,19 +129,19 @@ void registerTests(String groupName, TestRunnerCallback test) { final e0 = Example(); expect(e0.getNumber(), 0); expect(e0.getIsUp(), true); - expect(e0.getCodename().toDartString(), equals('achilles')); + expect(e0.getCodename()!.toDartString(), equals('achilles')); final e1 = Example.new$1(111); expect(e1.getNumber(), equals(111)); expect(e1.getIsUp(), true); - expect(e1.getCodename().toDartString(), 'achilles'); + expect(e1.getCodename()!.toDartString(), 'achilles'); final e2 = Example.new$2(122, false); expect(e2.getNumber(), equals(122)); expect(e2.getIsUp(), false); - expect(e2.getCodename().toDartString(), 'achilles'); + expect(e2.getCodename()!.toDartString(), 'achilles'); final e3 = Example.new$3(133, false, 'spartan'.toJString()); expect(e3.getNumber(), equals(133)); expect(e3.getIsUp(), false); - expect(e3.getCodename().toDartString(), 'spartan'); + expect(e3.getCodename()!.toDartString(), 'spartan'); }); test('Static (non-final) fields', () { @@ -154,12 +154,12 @@ void registerTests(String groupName, TestRunnerCallback test) { expect(Fields.asterisk, equals('*'.codeUnitAt(0))); expect( - Fields.name.toDartString(), + Fields.name!.toDartString(), isIn(['Earl Haraldson', 'Ragnar Lothbrok']), ); Fields.name = 'Ragnar Lothbrok'.toJString(); - expect(Fields.name.toDartString(), equals('Ragnar Lothbrok')); + expect(Fields.name!.toDartString(), equals('Ragnar Lothbrok')); expect(Fields.pi, closeTo(pi, fpDelta)); }); @@ -169,24 +169,24 @@ void registerTests(String groupName, TestRunnerCallback test) { expect(f.trillion, equals(trillion)); expect(f.isAchillesDead, isFalse); - expect(f.bestFighterInGreece.toDartString(), equals('Achilles')); + expect(f.bestFighterInGreece!.toDartString(), equals('Achilles')); // "For your glory walks hand-in-hand with your doom." - Thetis. f.isAchillesDead = true; // I don't know much Greek mythology. But Troy was released in 2004, // and 300 was released in 2006, so it's Leonidas I. f.bestFighterInGreece = 'Leonidas I'.toJString(); expect(f.isAchillesDead, isTrue); - expect(f.bestFighterInGreece.toDartString(), 'Leonidas I'); + expect(f.bestFighterInGreece!.toDartString(), 'Leonidas I'); }); test('Fields from nested class', () { expect(Fields_Nested().hundred, equals(100)); // Hector of Troy may disagree. - expect(Fields_Nested.BEST_GOD.toDartString(), equals('Pallas Athena')); + expect(Fields_Nested.BEST_GOD!.toDartString(), equals('Pallas Athena')); }); test('static methods arrays', () { - final array = Example.getArr(); + final array = Example.getArr()!; expect(array[0], 1); expect(array[1], 2); expect(array[2], 3); @@ -267,9 +267,10 @@ void registerTests(String groupName, TestRunnerCallback test) { group('generics', () { test('GrandParent constructor', () { using((arena) { - final grandParent = - GrandParent('Hello'.toJString()..releasedBy(arena)) - ..releasedBy(arena); + final grandParent = GrandParent( + 'Hello'.toJString()..releasedBy(arena), + T: JString.type) + ..releasedBy(arena); expect(grandParent, isA>()); expect(grandParent.$type, isA<$GrandParent$Type>()); expect( @@ -323,7 +324,7 @@ void registerTests(String groupName, TestRunnerCallback test) { 2, ); expect( - ((map.entryStack()..releasedBy(arena)).pop()..releasedBy(arena)) + ((map.entryStack()!..releasedBy(arena)).pop()!..releasedBy(arena)) .key .as(JString.type, releaseOriginal: true) .toDartString(releaseOriginal: true), @@ -336,8 +337,8 @@ void registerTests(String groupName, TestRunnerCallback test) { using((arena) { final stringStack = StringStack()..releasedBy(arena); stringStack.push('Hello'.toJString()..releasedBy(arena)); - expect( - stringStack.pop().toDartString(releaseOriginal: true), 'Hello'); + expect(stringStack.pop()!.toDartString(releaseOriginal: true), + 'Hello'); }); }); test('StringKeyedMap', () { @@ -359,7 +360,7 @@ void registerTests(String groupName, TestRunnerCallback test) { final example = Example()..releasedBy(arena); map.put(example, 'Hello'.toJString()..releasedBy(arena)); expect( - map.get(example).toDartString(releaseOriginal: true), + map.get(example)!.toDartString(releaseOriginal: true), 'Hello', ); }); @@ -371,7 +372,7 @@ void registerTests(String groupName, TestRunnerCallback test) { 'world'.toJString()..releasedBy(arena)); expect( map - .get('hello'.toJString()..releasedBy(arena)) + .get('hello'.toJString()..releasedBy(arena))! .toDartString(releaseOriginal: true), 'world', ); @@ -395,22 +396,22 @@ void registerTests(String groupName, TestRunnerCallback test) { '!', ); - final strStaticParent = GrandParent.stringStaticParent() + final strStaticParent = GrandParent.stringStaticParent()! ..releasedBy(arena); expect( - strStaticParent.value.toDartString(releaseOriginal: true), + strStaticParent.value!.toDartString(releaseOriginal: true), 'Hello', ); final exampleStaticParent = GrandParent.varStaticParent( - S: Example.type, Example()..releasedBy(arena)) + S: Example.type, Example()..releasedBy(arena))! ..releasedBy(arena); expect( (exampleStaticParent.value..releasedBy(arena)).getNumber(), 0, ); - final strParent = grandParent.stringParent()..releasedBy(arena); + final strParent = grandParent.stringParent()!..releasedBy(arena); expect( strParent.parentValue .as(JString.type, releaseOriginal: true) @@ -418,12 +419,12 @@ void registerTests(String groupName, TestRunnerCallback test) { '!', ); expect( - strParent.value.toDartString(releaseOriginal: true), + strParent.value!.toDartString(releaseOriginal: true), 'Hello', ); final exampleParent = grandParent.varParent( - S: Example.type, Example()..releasedBy(arena)) + S: Example.type, Example()..releasedBy(arena))! ..releasedBy(arena); expect( exampleParent.parentValue @@ -442,11 +443,14 @@ void registerTests(String groupName, TestRunnerCallback test) { }); test('Constructing non-static nested classes', () { using((arena) { - final grandParent = GrandParent(1.toJInteger())..releasedBy(arena); - final parent = GrandParent_Parent(grandParent, 2.toJInteger()) - ..releasedBy(arena); - final child = GrandParent_Parent_Child(parent, 3.toJInteger()) + final grandParent = GrandParent(1.toJInteger(), T: JInteger.type) ..releasedBy(arena); + final parent = + GrandParent_Parent(grandParent, 2.toJInteger(), S: JInteger.type) + ..releasedBy(arena); + final child = + GrandParent_Parent_Child(parent, 3.toJInteger(), U: JInteger.type) + ..releasedBy(arena); expect(grandParent.value.intValue(releaseOriginal: true), 1); expect(parent.parentValue.intValue(releaseOriginal: true), 1); expect(parent.value.intValue(releaseOriginal: true), 2); @@ -463,7 +467,9 @@ void registerTests(String groupName, TestRunnerCallback test) { expect(emptyStack.size(), 0); final stack = MyStack.of$1( 'Hello'.toJString()..releasedBy(arena), - )..releasedBy(arena); + T: JString.type, + )! + ..releasedBy(arena); expect(stack, isA>()); expect(stack.$type, isA<$MyStack$Type>()); expect( @@ -477,7 +483,9 @@ void registerTests(String groupName, TestRunnerCallback test) { final stack = MyStack.of$2( 'Hello'.toJString()..releasedBy(arena), 'World'.toJString()..releasedBy(arena), - )..releasedBy(arena); + T: JString.type, + )! + ..releasedBy(arena); expect(stack, isA>()); expect(stack.$type, isA<$MyStack$Type>()); expect( @@ -495,9 +503,11 @@ void registerTests(String groupName, TestRunnerCallback test) { final array = JArray.filled(1, 'World'.toJString()..releasedBy(arena)) ..releasedBy(arena); final stack = MyStack.of$2( + T: JObject.type, 'Hello'.toJString()..releasedBy(arena), array, - )..releasedBy(arena); + )! + ..releasedBy(arena); expect(stack, isA>()); expect(stack.$type, isA<$MyStack$Type>()); expect( @@ -520,7 +530,8 @@ void registerTests(String groupName, TestRunnerCallback test) { using((arena) { final array = JArray.filled(1, 'Hello'.toJString()..releasedBy(arena)) ..releasedBy(arena); - final stack = MyStack.fromArray(array)..releasedBy(arena); + final stack = MyStack.fromArray(T: JString.type, array)! + ..releasedBy(arena); expect(stack, isA>()); expect(stack.$type, isA<$MyStack$Type>()); expect( @@ -533,14 +544,14 @@ void registerTests(String groupName, TestRunnerCallback test) { using((arena) { final firstDimention = JArray.filled( 1, - GrandParent('Hello'.toJString()..releasedBy(arena)) + GrandParent(T: JString.type, 'Hello'.toJString()..releasedBy(arena)) ..releasedBy(arena), )..releasedBy(arena); final twoDimentionalArray = JArray.filled(1, firstDimention) ..releasedBy(arena); - final stack = - MyStack.fromArrayOfArrayOfGrandParents(twoDimentionalArray) - ..releasedBy(arena); + final stack = MyStack.fromArrayOfArrayOfGrandParents( + S: JString.type, twoDimentionalArray)! + ..releasedBy(arena); expect(stack, isA>()); expect(stack.$type, isA<$MyStack$Type>()); expect( @@ -568,7 +579,7 @@ void registerTests(String groupName, TestRunnerCallback test) { $MyInterface( voidCallback: voidCallbackResult.complete, stringCallback: (s) { - return (s.toDartString(releaseOriginal: true) * 2).toJString(); + return (s!.toDartString(releaseOriginal: true) * 2).toJString(); }, varCallback: (JInteger t) { final result = @@ -595,6 +606,7 @@ void registerTests(String groupName, TestRunnerCallback test) { // The other two methods will be called individually using the passed // arguments afterwards. consume( + T: JInteger.type, myInterface, // For stringCallback: 'hello'.toJString(), @@ -695,10 +707,10 @@ void registerTests(String groupName, TestRunnerCallback test) { StringConverter.implement(DartStringToIntParser(radix: 10)) ..releasedBy(arena); final fifteen = StringConverterConsumer.consumeOnSameThread( - hexParser, 'F'.toJString()..releasedBy(arena)); + hexParser, 'F'.toJString()..releasedBy(arena))!; expect(fifteen.intValue(releaseOriginal: true), 15); final fortyTwo = StringConverterConsumer.consumeOnSameThread( - decimalParser, '42'.toJString()..releasedBy(arena)); + decimalParser, '42'.toJString()..releasedBy(arena))!; expect(fortyTwo.intValue(releaseOriginal: true), 42); }); }); @@ -762,13 +774,13 @@ void registerTests(String groupName, TestRunnerCallback test) { } else { runner.runOnAnotherThread(); } - while (runner.error.isNull) { + while (runner.error == null) { await Future.delayed(const Duration(milliseconds: 100)); } expect( Jni.env.IsInstanceOf( // ignore: invalid_use_of_internal_member - runner.error.reference.pointer, + runner.error!.reference.pointer, JClass.forName( 'java/lang/reflect/UndeclaredThrowableException') // ignore: invalid_use_of_internal_member @@ -777,10 +789,10 @@ void registerTests(String groupName, TestRunnerCallback test) { ), isTrue, ); - final throwableClass = runner.error.jClass; + final throwableClass = runner.error!.jClass; final cause = throwableClass .instanceMethodId('getCause', '()Ljava/lang/Throwable;') - .call(runner.error, JObject.type, []); + .call(runner.error!, JObject.type, []); expect( Jni.env.IsInstanceOf( // ignore: invalid_use_of_internal_member @@ -811,7 +823,7 @@ void registerTests(String groupName, TestRunnerCallback test) { test('StringConverter.implement on $threading ', () async { final stringConverter = StringConverter.implement($StringConverter( parseToInt: (s) { - final value = int.tryParse(s.toDartString()); + final value = int.tryParse(s!.toDartString()); if (value == null) { // ignore: only_throw_errors throw StringConversionException( @@ -844,7 +856,8 @@ void registerTests(String groupName, TestRunnerCallback test) { return (await receivePort.first) as $T; } - final sevenHundredBoxed = consume(stringConverter, '700'.toJString()); + final sevenHundredBoxed = + consume(stringConverter, '700'.toJString())!; final int sevenHundred; if (sevenHundredBoxed is JInteger) { sevenHundred = sevenHundredBoxed.intValue(); @@ -855,7 +868,7 @@ void registerTests(String groupName, TestRunnerCallback test) { } expect(sevenHundred, 700); - final fooBoxed = consume(stringConverter, 'foo'.toJString()); + final fooBoxed = consume(stringConverter, 'foo'.toJString())!; final int foo; if (fooBoxed is JInteger) { foo = fooBoxed.intValue(); @@ -874,17 +887,17 @@ void registerTests(String groupName, TestRunnerCallback test) { $GenericInterface( T: JString.type, arrayOf: (element) => JArray(JString.type, 1)..[0] = element, - firstKeyOf: (map) => map.keys.first.as(JString.type), - firstValueOf: (map) => map.values.first, - firstOfArray: (array) => array[0].as(JString.type), - firstOfGenericArray: (array) => array[0], + firstKeyOf: (map) => map!.keys.first.as(JString.type), + firstValueOf: (map) => map!.values.first, + firstOfArray: (array) => array![0].as(JString.type), + firstOfGenericArray: (array) => array![0], genericArrayOf: (element) => JArray(JObject.type, 1)..[0] = element, mapOf: (key, value) => JMap.hash(JString.type, JObject.type)..[key] = value, ), )..releasedBy(arena); final stringArray = genericInterface - .arrayOf('hello'.toJString()..releasedBy(arena)) + .arrayOf('hello'.toJString()..releasedBy(arena))! ..releasedBy(arena); expect(stringArray, hasLength(1)); expect(stringArray[0].toDartString(releaseOriginal: true), 'hello'); @@ -895,20 +908,22 @@ void registerTests(String groupName, TestRunnerCallback test) { 'hello', ); - final intArray = genericInterface - .genericArrayOf(42.toJInteger()..releasedBy(arena)) + final intArray = genericInterface.genericArrayOf( + U: JInteger.type, 42.toJInteger()..releasedBy(arena))! ..releasedBy(arena); expect( genericInterface - .firstOfGenericArray(intArray) + .firstOfGenericArray(U: JInteger.type, intArray) .intValue(releaseOriginal: true), 42, ); final jmap = genericInterface.mapOf( + U: JInteger.type, 'hello'.toJString()..releasedBy(arena), 42.toJInteger()..releasedBy(arena), - )..releasedBy(arena); + )! + ..releasedBy(arena); expect( jmap['hello'.toJString()..releasedBy(arena)]! .intValue(releaseOriginal: true), @@ -916,13 +931,15 @@ void registerTests(String groupName, TestRunnerCallback test) { ); expect( genericInterface - .firstKeyOf(jmap) + .firstKeyOf(U: JInteger.type, jmap) .as(JString.type) .toDartString(releaseOriginal: true), 'hello', ); expect( - genericInterface.firstValueOf(jmap).intValue(releaseOriginal: true), + genericInterface + .firstValueOf(U: JInteger.type, jmap) + .intValue(releaseOriginal: true), 42, ); }); @@ -999,8 +1016,8 @@ final class DartStringToIntParser with $StringConverter { DartStringToIntParser({required this.radix}); @override - int parseToInt(JString s) { - return int.parse(s.toDartString(releaseOriginal: true), radix: radix); + int parseToInt(JString? s) { + return int.parse(s!.toDartString(releaseOriginal: true), radix: radix); } }