diff --git a/CHANGELOG.md b/CHANGELOG.md index ed0208bf9b..11f40e7314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Enhancements +- Refactor native breadcrumbs sync to use FFI/JNI ([#3293](https://github.com/getsentry/sentry-dart/pull/3293/)) - Refactor app hang and crash apis to use FFI/JNI ([#3289](https://github.com/getsentry/sentry-dart/pull/3289/)) - Refactor `AndroidReplayRecorder` to use the new worker isolate api ([#3296](https://github.com/getsentry/sentry-dart/pull/3296/)) - Refactor fetching app start and display refresh rate to use FFI and JNI ([#3288](https://github.com/getsentry/sentry-dart/pull/3288/)) diff --git a/packages/dart/lib/src/scope_observer.dart b/packages/dart/lib/src/scope_observer.dart index 09af0c46a0..7d657cd26c 100644 --- a/packages/dart/lib/src/scope_observer.dart +++ b/packages/dart/lib/src/scope_observer.dart @@ -7,8 +7,8 @@ abstract class ScopeObserver { Future setContexts(String key, dynamic value); Future removeContexts(String key); Future setUser(SentryUser? user); - Future addBreadcrumb(Breadcrumb breadcrumb); - Future clearBreadcrumbs(); + FutureOr addBreadcrumb(Breadcrumb breadcrumb); + FutureOr clearBreadcrumbs(); Future setExtra(String key, dynamic value); Future removeExtra(String key); Future setTag(String key, String value); diff --git a/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt b/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt index bd0843006c..5ad695fdb5 100644 --- a/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt +++ b/packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt @@ -64,8 +64,6 @@ class SentryFlutterPlugin : "setContexts" -> setContexts(call.argument("key"), call.argument("value"), result) "removeContexts" -> removeContexts(call.argument("key"), result) "setUser" -> setUser(call.argument("user"), result) - "addBreadcrumb" -> addBreadcrumb(call.argument("breadcrumb"), result) - "clearBreadcrumbs" -> clearBreadcrumbs(result) "setExtra" -> setExtra(call.argument("key"), call.argument("value"), result) "removeExtra" -> removeExtra(call.argument("key"), result) "setTag" -> setTag(call.argument("key"), call.argument("value"), result) @@ -189,24 +187,6 @@ class SentryFlutterPlugin : result.success("") } - private fun addBreadcrumb( - breadcrumb: Map?, - result: Result, - ) { - if (breadcrumb != null) { - val options = ScopesAdapter.getInstance().options - val breadcrumbInstance = Breadcrumb.fromMap(breadcrumb, options) - Sentry.addBreadcrumb(breadcrumbInstance) - } - result.success("") - } - - private fun clearBreadcrumbs(result: Result) { - Sentry.clearBreadcrumbs() - - result.success("") - } - private fun setExtra( key: String?, value: String?, diff --git a/packages/flutter/example/integration_test/integration_test.dart b/packages/flutter/example/integration_test/integration_test.dart index 82b2c0e703..0c121748ce 100644 --- a/packages/flutter/example/integration_test/integration_test.dart +++ b/packages/flutter/example/integration_test/integration_test.dart @@ -564,6 +564,51 @@ void main() { } }); + testWidgets('addBreadcrumb and clearBreadcrumbs sync to native', + (tester) async { + await restoreFlutterOnErrorAfter(() async { + await setupSentryAndApp(tester); + }); + + // 1. Add a breadcrumb via Dart + final testBreadcrumb = Breadcrumb( + message: 'test-breadcrumb-message', + category: 'test-category', + level: SentryLevel.info, + ); + await Sentry.addBreadcrumb(testBreadcrumb); + + // 2. Verify it appears in native via loadContexts + var contexts = await SentryFlutter.native?.loadContexts(); + expect(contexts, isNotNull); + + var breadcrumbs = contexts!['breadcrumbs'] as List?; + expect(breadcrumbs, isNotNull, + reason: 'Breadcrumbs should not be null after adding'); + expect(breadcrumbs!.isNotEmpty, isTrue, + reason: 'Breadcrumbs should not be empty after adding'); + + // Find our test breadcrumb + final testCrumb = breadcrumbs.firstWhere( + (b) => b['message'] == 'test-breadcrumb-message', + orElse: () => null, + ); + expect(testCrumb, isNotNull, + reason: 'Test breadcrumb should exist in native breadcrumbs'); + expect(testCrumb['category'], equals('test-category')); + + // 3. Clear breadcrumbs + await Sentry.configureScope((scope) async { + await scope.clearBreadcrumbs(); + }); + + // 4. Verify they're cleared in native + contexts = await SentryFlutter.native?.loadContexts(); + breadcrumbs = contexts!['breadcrumbs'] as List?; + expect(breadcrumbs == null || breadcrumbs.isEmpty, isTrue, + reason: 'Breadcrumbs should be null or empty after clearing'); + }); + testWidgets('loads debug images through loadDebugImages', (tester) async { await restoreFlutterOnErrorAfter(() async { await setupSentryAndApp(tester); diff --git a/packages/flutter/ffi-cocoa.yaml b/packages/flutter/ffi-cocoa.yaml index bc1a60cdcf..e0cf790183 100644 --- a/packages/flutter/ffi-cocoa.yaml +++ b/packages/flutter/ffi-cocoa.yaml @@ -6,6 +6,7 @@ headers: entry-points: - ./temp/Sentry.framework/PrivateHeaders/PrivateSentrySDKOnly.h - ./temp/Sentry.framework/Headers/Sentry-Swift.h + - ./temp/Sentry.framework/Headers/SentryScope.h - ./ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterPlugin.h compiler-opts: - -DSENTRY_TARGET_PROFILING_SUPPORTED=1 @@ -19,6 +20,7 @@ objc-interfaces: - PrivateSentrySDKOnly - SentryId - SentryFlutterPlugin + - SentryScope - SentrySDK module: 'SentryId': 'Sentry' @@ -29,6 +31,11 @@ objc-interfaces: - 'crash' - 'pauseAppHangTracking' - 'resumeAppHangTracking' + - 'configureScope:' + - 'addBreadcrumb:' + SentryScope: + include: + - 'clearBreadcrumbs' preamble: | // ignore_for_file: type=lint, unused_element diff --git a/packages/flutter/ffi-jni.yaml b/packages/flutter/ffi-jni.yaml index cf7f4e0e6e..0b2265758e 100644 --- a/packages/flutter/ffi-jni.yaml +++ b/packages/flutter/ffi-jni.yaml @@ -16,4 +16,7 @@ classes: - io.sentry.android.core.InternalSentrySdk - io.sentry.android.replay.ReplayIntegration - io.sentry.flutter.SentryFlutterPlugin + - io.sentry.Sentry + - io.sentry.Breadcrumb + - io.sentry.ScopesAdapter - android.graphics.Bitmap diff --git a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift index ca10f8140a..fa6862f036 100644 --- a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift +++ b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift @@ -92,14 +92,6 @@ public class SentryFlutterPlugin: NSObject, FlutterPlugin { let user = arguments?["user"] as? [String: Any] setUser(user: user, result: result) - case "addBreadcrumb": - let arguments = call.arguments as? [String: Any?] - let breadcrumb = arguments?["breadcrumb"] as? [String: Any] - addBreadcrumb(breadcrumb: breadcrumb, result: result) - - case "clearBreadcrumbs": - clearBreadcrumbs(result: result) - case "setExtra": let arguments = call.arguments as? [String: Any?] let key = arguments?["key"] as? String @@ -322,22 +314,6 @@ public class SentryFlutterPlugin: NSObject, FlutterPlugin { result("") } - private func addBreadcrumb(breadcrumb: [String: Any]?, result: @escaping FlutterResult) { - if let breadcrumb = breadcrumb { - let breadcrumbInstance = PrivateSentrySDKOnly.breadcrumb(with: breadcrumb) - SentrySDK.addBreadcrumb(breadcrumbInstance) - } - result("") - } - - private func clearBreadcrumbs(result: @escaping FlutterResult) { - SentrySDK.configureScope { scope in - scope.clearBreadcrumbs() - - result("") - } - } - private func setExtra(key: String?, value: Any?, result: @escaping FlutterResult) { guard let key = key else { result("") diff --git a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/include/ns_number.h b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/include/ns_number.h new file mode 100644 index 0000000000..d21b0e40da --- /dev/null +++ b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/include/ns_number.h @@ -0,0 +1,17 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// We need to add this file until we update the objective_c package due to a bug +// See the issue: https://github.com/dart-lang/native/pull/2581 + +#ifndef OBJECTIVE_C_SRC_NS_NUMBER_H_ +#define OBJECTIVE_C_SRC_NS_NUMBER_H_ + +#import + +@interface NSNumber (NSNumberIsFloat) +@property (readonly) bool isFloat; +@end + +#endif // OBJECTIVE_C_SRC_NS_NUMBER_H_ diff --git a/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/ns_number.m b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/ns_number.m new file mode 100644 index 0000000000..1ed9f0129e --- /dev/null +++ b/packages/flutter/ios/sentry_flutter/Sources/sentry_flutter_objc/ns_number.m @@ -0,0 +1,15 @@ +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// We need to add this file until we update the objective_c package due to a bug +// See the issue: https://github.com/dart-lang/native/pull/2581 + +#import "ns_number.h" + +@implementation NSNumber (NSNumberIsFloat) +-(bool)isFloat { + const char *t = [self objCType]; + return strcmp(t, @encode(float)) == 0 || strcmp(t, @encode(double)) == 0; +} +@end diff --git a/packages/flutter/lib/src/native/cocoa/binding.dart b/packages/flutter/lib/src/native/cocoa/binding.dart index d39050185c..65fb990cd2 100644 --- a/packages/flutter/lib/src/native/cocoa/binding.dart +++ b/packages/flutter/lib/src/native/cocoa/binding.dart @@ -1121,7 +1121,30 @@ class SentryId$1 extends objc.NSObject { } late final _class_SentrySDK = objc.getClass("Sentry.SentrySDK"); -late final _sel_crash = objc.registerName("crash"); +late final _sel_addBreadcrumb_ = objc.registerName("addBreadcrumb:"); +late final _class_SentryScope = objc.getClass("SentryScope"); + +/// WARNING: SentrySerializable is a stub. To generate bindings for this class, include +/// SentrySerializable in your config's objc-protocols list. +/// +/// SentrySerializable +interface class SentrySerializable extends objc.ObjCProtocolBase + implements objc.NSObjectProtocol { + SentrySerializable._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [SentrySerializable] that points to the same underlying object as [other]. + SentrySerializable.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [SentrySerializable] that wraps the given raw object pointer. + SentrySerializable.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _sel_clearBreadcrumbs = objc.registerName("clearBreadcrumbs"); final _objc_msgSend_1pl9qdv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1130,6 +1153,226 @@ final _objc_msgSend_1pl9qdv = objc.msgSendPointer .asFunction< void Function( ffi.Pointer, ffi.Pointer)>(); + +/// SentryScope +class SentryScope extends objc.NSObject implements SentrySerializable { + SentryScope._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [SentryScope] that points to the same underlying object as [other]. + SentryScope.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [SentryScope] that wraps the given raw object pointer. + SentryScope.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [SentryScope]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_19nvye5( + obj.ref.pointer, _sel_isKindOfClass_, _class_SentryScope); + } + + /// Clears all breadcrumbs in the scope + void clearBreadcrumbs() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_clearBreadcrumbs); + } +} + +void _ObjCBlock_ffiVoid_SentryScope_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_SentryScope_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_SentryScope_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_SentryScope_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_SentryScope_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_SentryScope_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_SentryScope_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_SentryScope_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_SentryScope_listenerTrampoline) + ..keepIsolateAlive = false; +void _ObjCBlock_ffiVoid_SentryScope_blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0) { + try { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_SentryScope_blockingCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.isolateLocal( + _ObjCBlock_ffiVoid_SentryScope_blockingTrampoline) + ..keepIsolateAlive = false; +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_SentryScope_blockingListenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_SentryScope_blockingTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_SentryScope { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_SentryScope_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function(SentryScope) fn, + {bool keepIsolateAlive = true}) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_SentryScope_closureCallable, + (ffi.Pointer arg0) => fn( + SentryScope.castFromPointer(arg0, + retain: true, release: true)), + keepIsolateAlive), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(SentryScope) fn, + {bool keepIsolateAlive = true}) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_SentryScope_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => + fn(SentryScope.castFromPointer(arg0, retain: false, release: true)), + keepIsolateAlive); + final wrapper = _SentryCocoa_wrapListenerBlock_xtuoz7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(SentryScope) fn, + {bool keepIsolateAlive = true}) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_SentryScope_blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => + fn(SentryScope.castFromPointer(arg0, retain: false, release: true)), + keepIsolateAlive); + final rawListener = objc.newClosureBlock( + _ObjCBlock_ffiVoid_SentryScope_blockingListenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0) => + fn(SentryScope.castFromPointer(arg0, retain: false, release: true)), + keepIsolateAlive); + final wrapper = _SentryCocoa_wrapBlockingBlock_xtuoz7( + raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_SentryScope_CallExtension + on objc.ObjCBlock { + void call(SentryScope arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); +} + +late final _sel_configureScope_ = objc.registerName("configureScope:"); +late final _sel_crash = objc.registerName("crash"); late final _sel_pauseAppHangTracking = objc.registerName("pauseAppHangTracking"); late final _sel_resumeAppHangTracking = @@ -1157,6 +1400,23 @@ class SentrySDK extends objc.NSObject { obj.ref.pointer, _sel_isKindOfClass_, _class_SentrySDK); } + /// Adds a Breadcrumb to the current Scope of the current Hub. If the total number of breadcrumbs + /// exceeds the SentryOptions.maxBreadcrumbs the SDK removes the oldest breadcrumb. + /// \param crumb The Breadcrumb to add to the current Scope of the current Hub. + static void addBreadcrumb(SentryBreadcrumb crumb) { + _objc_msgSend_xtuoz7( + _class_SentrySDK, _sel_addBreadcrumb_, crumb.ref.pointer); + } + + /// Use this method to modify the current Scope of the current Hub. The SDK uses the Scope to attach + /// contextual data to events. + /// \param callback The callback for configuring the current Scope of the current Hub. + static void configureScope( + objc.ObjCBlock callback) { + _objc_msgSend_f167m6( + _class_SentrySDK, _sel_configureScope_, callback.ref.pointer); + } + /// This forces a crash, useful to test the SentryCrash integration. /// note: /// The SDK can’t report a crash when a debugger is attached. Your application needs to run diff --git a/packages/flutter/lib/src/native/cocoa/binding.dart.m b/packages/flutter/lib/src/native/cocoa/binding.dart.m index 488e6027b2..cab4800aae 100644 --- a/packages/flutter/lib/src/native/cocoa/binding.dart.m +++ b/packages/flutter/lib/src/native/cocoa/binding.dart.m @@ -3,6 +3,7 @@ #import #import "../../../../temp/Sentry.framework/PrivateHeaders/PrivateSentrySDKOnly.h" #import "../../../../temp/Sentry.framework/Headers/Sentry-Swift.h" +#import "../../../../temp/Sentry.framework/Headers/SentryScope.h" #import "../../../../ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterPlugin.h" #if !__has_feature(objc_arc) @@ -79,6 +80,8 @@ ListenerTrampoline _SentryCocoa_wrapBlockingBlock_xtuoz7( id _SentryCocoa_protocolTrampoline_1mbt9g9(id target, void * sel) { return ((ProtocolTrampoline)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel); } + +Protocol* _SentryCocoa_SentrySerializable(void) { return @protocol(SentrySerializable); } #undef BLOCKING_BLOCK_IMPL #pragma clang diagnostic pop diff --git a/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart b/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart index 35f1cf4144..00f02d1cde 100644 --- a/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart +++ b/packages/flutter/lib/src/native/cocoa/sentry_native_cocoa.dart @@ -192,6 +192,24 @@ class SentryNativeCocoa extends SentryNativeChannel { }, ); + @override + void addBreadcrumb(Breadcrumb breadcrumb) => + tryCatchSync('addBreadcrumb', () { + final nativeBreadcrumb = + cocoa.PrivateSentrySDKOnly.breadcrumbWithDictionary( + _deepConvertMapNonNull(breadcrumb.toJson()).toNSDictionary()); + cocoa.SentrySDK.addBreadcrumb(nativeBreadcrumb); + }); + + @override + void clearBreadcrumbs() => tryCatchSync('clearBreadcrumbs', () { + cocoa.SentrySDK.configureScope( + cocoa.ObjCBlock_ffiVoid_SentryScope.fromFunction( + (cocoa.SentryScope scope) { + scope.clearBreadcrumbs(); + })); + }); + @override void nativeCrash() => cocoa.SentrySDK.crash(); @@ -205,3 +223,28 @@ class SentryNativeCocoa extends SentryNativeChannel { cocoa.SentrySDK.resumeAppHangTracking(); }); } + +/// This map conversion is needed so we can use the toNSDictionary extension function +/// provided by the objective_c package. +Map _deepConvertMapNonNull(Map input) { + final out = {}; + + for (final entry in input.entries) { + final value = entry.value; + if (value == null) continue; + + out[entry.key] = switch (value) { + Map m => _deepConvertMapNonNull(m), + List l => [ + for (final e in l) + if (e != null) + e is Map + ? _deepConvertMapNonNull(e) + : e as Object + ], + _ => value as Object, + }; + } + + return out; +} diff --git a/packages/flutter/lib/src/native/java/binding.dart b/packages/flutter/lib/src/native/java/binding.dart index 9b59a003b3..830d9f6d6f 100644 --- a/packages/flutter/lib/src/native/java/binding.dart +++ b/packages/flutter/lib/src/native/java/binding.dart @@ -2066,6 +2066,6454 @@ final class $SentryFlutterPlugin$Type } } +/// from: `io.sentry.Sentry$OptionsConfiguration` +class Sentry$OptionsConfiguration<$T extends jni$_.JObject?> + extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType> $type; + + @jni$_.internal + final jni$_.JObjType<$T> T; + + @jni$_.internal + Sentry$OptionsConfiguration.fromReference( + this.T, + jni$_.JReference reference, + ) : $type = type<$T>(T), + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'io/sentry/Sentry$OptionsConfiguration'); + + /// The type which includes information such as the signature of this class. + static $Sentry$OptionsConfiguration$NullableType<$T> + nullableType<$T extends jni$_.JObject?>( + jni$_.JObjType<$T> T, + ) { + return $Sentry$OptionsConfiguration$NullableType<$T>( + T, + ); + } + + static $Sentry$OptionsConfiguration$Type<$T> type<$T extends jni$_.JObject?>( + jni$_.JObjType<$T> T, + ) { + return $Sentry$OptionsConfiguration$Type<$T>( + T, + ); + } + + static final _id_configure = _class.instanceMethodId( + r'configure', + r'(Lio/sentry/SentryOptions;)V', + ); + + static final _configure = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public abstract void configure(T sentryOptions)` + void configure( + $T sentryOptions, + ) { + final _$sentryOptions = sentryOptions?.reference ?? jni$_.jNullReference; + _configure(reference.pointer, _id_configure as jni$_.JMethodIDPtr, + _$sentryOptions.pointer) + .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 _$invokeMethod( + int $p, + jni$_.MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'configure(Lio/sentry/SentryOptions;)V') { + _$impls[$p]!.configure( + $a![0]?.as(_$impls[$p]!.T, releaseOriginal: true), + ); + return jni$_.nullptr; + } + } catch (e) { + return jni$_.ProtectedJniExtensions.newDartException(e); + } + return jni$_.nullptr; + } + + static void implementIn<$T extends jni$_.JObject?>( + jni$_.JImplementer implementer, + $Sentry$OptionsConfiguration<$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'io.sentry.Sentry$OptionsConfiguration', + $p, + _$invokePointer, + [ + if ($impl.configure$async) r'configure(Lio/sentry/SentryOptions;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory Sentry$OptionsConfiguration.implement( + $Sentry$OptionsConfiguration<$T> $impl, + ) { + final $i = jni$_.JImplementer(); + implementIn($i, $impl); + return Sentry$OptionsConfiguration<$T>.fromReference( + $impl.T, + $i.implementReference(), + ); + } +} + +abstract base mixin class $Sentry$OptionsConfiguration< + $T extends jni$_.JObject?> { + factory $Sentry$OptionsConfiguration({ + required jni$_.JObjType<$T> T, + required void Function($T sentryOptions) configure, + bool configure$async, + }) = _$Sentry$OptionsConfiguration<$T>; + + jni$_.JObjType<$T> get T; + + void configure($T sentryOptions); + bool get configure$async => false; +} + +final class _$Sentry$OptionsConfiguration<$T extends jni$_.JObject?> + with $Sentry$OptionsConfiguration<$T> { + _$Sentry$OptionsConfiguration({ + required this.T, + required void Function($T sentryOptions) configure, + this.configure$async = false, + }) : _configure = configure; + + @core$_.override + final jni$_.JObjType<$T> T; + + final void Function($T sentryOptions) _configure; + final bool configure$async; + + void configure($T sentryOptions) { + return _configure(sentryOptions); + } +} + +final class $Sentry$OptionsConfiguration$NullableType<$T extends jni$_.JObject?> + extends jni$_.JObjType?> { + @jni$_.internal + final jni$_.JObjType<$T> T; + + @jni$_.internal + const $Sentry$OptionsConfiguration$NullableType( + this.T, + ); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Sentry$OptionsConfiguration;'; + + @jni$_.internal + @core$_.override + Sentry$OptionsConfiguration<$T>? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : Sentry$OptionsConfiguration<$T>.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($Sentry$OptionsConfiguration$NullableType, T); + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == + ($Sentry$OptionsConfiguration$NullableType<$T>) && + other is $Sentry$OptionsConfiguration$NullableType<$T> && + T == other.T; + } +} + +final class $Sentry$OptionsConfiguration$Type<$T extends jni$_.JObject?> + extends jni$_.JObjType> { + @jni$_.internal + final jni$_.JObjType<$T> T; + + @jni$_.internal + const $Sentry$OptionsConfiguration$Type( + this.T, + ); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Sentry$OptionsConfiguration;'; + + @jni$_.internal + @core$_.override + Sentry$OptionsConfiguration<$T> fromReference(jni$_.JReference reference) => + Sentry$OptionsConfiguration<$T>.fromReference( + T, + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType?> get nullableType => + $Sentry$OptionsConfiguration$NullableType<$T>(T); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => Object.hash($Sentry$OptionsConfiguration$Type, T); + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Sentry$OptionsConfiguration$Type<$T>) && + other is $Sentry$OptionsConfiguration$Type<$T> && + T == other.T; + } +} + +/// from: `io.sentry.Sentry` +class Sentry extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Sentry.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'io/sentry/Sentry'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Sentry$NullableType(); + static const type = $Sentry$Type(); + static final _id_APP_START_PROFILING_CONFIG_FILE_NAME = _class.staticFieldId( + r'APP_START_PROFILING_CONFIG_FILE_NAME', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String APP_START_PROFILING_CONFIG_FILE_NAME` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString get APP_START_PROFILING_CONFIG_FILE_NAME => + _id_APP_START_PROFILING_CONFIG_FILE_NAME.get( + _class, const jni$_.JStringType()); + + static final _id_getCurrentHub = _class.staticMethodId( + r'getCurrentHub', + r'()Lio/sentry/IHub;', + ); + + static final _getCurrentHub = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.IHub getCurrentHub()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject getCurrentHub() { + return _getCurrentHub( + _class.reference.pointer, _id_getCurrentHub as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_getCurrentScopes = _class.staticMethodId( + r'getCurrentScopes', + r'()Lio/sentry/IScopes;', + ); + + static final _getCurrentScopes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.IScopes getCurrentScopes()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject getCurrentScopes() { + return _getCurrentScopes(_class.reference.pointer, + _id_getCurrentScopes as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_forkedRootScopes = _class.staticMethodId( + r'forkedRootScopes', + r'(Ljava/lang/String;)Lio/sentry/IScopes;', + ); + + static final _forkedRootScopes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.IScopes forkedRootScopes(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject forkedRootScopes( + jni$_.JString string, + ) { + final _$string = string.reference; + return _forkedRootScopes(_class.reference.pointer, + _id_forkedRootScopes as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_forkedScopes = _class.staticMethodId( + r'forkedScopes', + r'(Ljava/lang/String;)Lio/sentry/IScopes;', + ); + + static final _forkedScopes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.IScopes forkedScopes(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject forkedScopes( + jni$_.JString string, + ) { + final _$string = string.reference; + return _forkedScopes(_class.reference.pointer, + _id_forkedScopes as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_forkedCurrentScope = _class.staticMethodId( + r'forkedCurrentScope', + r'(Ljava/lang/String;)Lio/sentry/IScopes;', + ); + + static final _forkedCurrentScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.IScopes forkedCurrentScope(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject forkedCurrentScope( + jni$_.JString string, + ) { + final _$string = string.reference; + return _forkedCurrentScope(_class.reference.pointer, + _id_forkedCurrentScope as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_setCurrentHub = _class.staticMethodId( + r'setCurrentHub', + r'(Lio/sentry/IHub;)Lio/sentry/ISentryLifecycleToken;', + ); + + static final _setCurrentHub = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.ISentryLifecycleToken setCurrentHub(io.sentry.IHub iHub)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject setCurrentHub( + jni$_.JObject iHub, + ) { + final _$iHub = iHub.reference; + return _setCurrentHub(_class.reference.pointer, + _id_setCurrentHub as jni$_.JMethodIDPtr, _$iHub.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_setCurrentScopes = _class.staticMethodId( + r'setCurrentScopes', + r'(Lio/sentry/IScopes;)Lio/sentry/ISentryLifecycleToken;', + ); + + static final _setCurrentScopes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.ISentryLifecycleToken setCurrentScopes(io.sentry.IScopes iScopes)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject setCurrentScopes( + jni$_.JObject iScopes, + ) { + final _$iScopes = iScopes.reference; + return _setCurrentScopes(_class.reference.pointer, + _id_setCurrentScopes as jni$_.JMethodIDPtr, _$iScopes.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_getGlobalScope = _class.staticMethodId( + r'getGlobalScope', + r'()Lio/sentry/IScope;', + ); + + static final _getGlobalScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.IScope getGlobalScope()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject getGlobalScope() { + return _getGlobalScope( + _class.reference.pointer, _id_getGlobalScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_isEnabled = _class.staticMethodId( + r'isEnabled', + r'()Z', + ); + + static final _isEnabled = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public boolean isEnabled()` + static bool isEnabled() { + return _isEnabled( + _class.reference.pointer, _id_isEnabled as jni$_.JMethodIDPtr) + .boolean; + } + + static final _id_init = _class.staticMethodId( + r'init', + r'()V', + ); + + static final _init = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void init()` + static void init() { + _init(_class.reference.pointer, _id_init as jni$_.JMethodIDPtr).check(); + } + + static final _id_init$1 = _class.staticMethodId( + r'init', + r'(Ljava/lang/String;)V', + ); + + static final _init$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void init(java.lang.String string)` + static void init$1( + jni$_.JString string, + ) { + final _$string = string.reference; + _init$1(_class.reference.pointer, _id_init$1 as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_init$2 = _class.staticMethodId( + r'init', + r'(Lio/sentry/OptionsContainer;Lio/sentry/Sentry$OptionsConfiguration;)V', + ); + + static final _init$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public void init(io.sentry.OptionsContainer optionsContainer, io.sentry.Sentry$OptionsConfiguration optionsConfiguration)` + static void init$2<$T extends jni$_.JObject?>( + jni$_.JObject optionsContainer, + Sentry$OptionsConfiguration<$T?> optionsConfiguration, { + jni$_.JObjType<$T>? T, + }) { + T ??= jni$_.lowestCommonSuperType([ + (optionsConfiguration.$type + as $Sentry$OptionsConfiguration$Type) + .T, + ]) as jni$_.JObjType<$T>; + final _$optionsContainer = optionsContainer.reference; + final _$optionsConfiguration = optionsConfiguration.reference; + _init$2(_class.reference.pointer, _id_init$2 as jni$_.JMethodIDPtr, + _$optionsContainer.pointer, _$optionsConfiguration.pointer) + .check(); + } + + static final _id_init$3 = _class.staticMethodId( + r'init', + r'(Lio/sentry/OptionsContainer;Lio/sentry/Sentry$OptionsConfiguration;Z)V', + ); + + static final _init$3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Int32 + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + int)>(); + + /// from: `static public void init(io.sentry.OptionsContainer optionsContainer, io.sentry.Sentry$OptionsConfiguration optionsConfiguration, boolean z)` + static void init$3<$T extends jni$_.JObject?>( + jni$_.JObject optionsContainer, + Sentry$OptionsConfiguration<$T?> optionsConfiguration, + bool z, { + jni$_.JObjType<$T>? T, + }) { + T ??= jni$_.lowestCommonSuperType([ + (optionsConfiguration.$type + as $Sentry$OptionsConfiguration$Type) + .T, + ]) as jni$_.JObjType<$T>; + final _$optionsContainer = optionsContainer.reference; + final _$optionsConfiguration = optionsConfiguration.reference; + _init$3( + _class.reference.pointer, + _id_init$3 as jni$_.JMethodIDPtr, + _$optionsContainer.pointer, + _$optionsConfiguration.pointer, + z ? 1 : 0) + .check(); + } + + static final _id_init$4 = _class.staticMethodId( + r'init', + r'(Lio/sentry/Sentry$OptionsConfiguration;)V', + ); + + static final _init$4 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void init(io.sentry.Sentry$OptionsConfiguration optionsConfiguration)` + static void init$4( + Sentry$OptionsConfiguration optionsConfiguration, + ) { + final _$optionsConfiguration = optionsConfiguration.reference; + _init$4(_class.reference.pointer, _id_init$4 as jni$_.JMethodIDPtr, + _$optionsConfiguration.pointer) + .check(); + } + + static final _id_init$5 = _class.staticMethodId( + r'init', + r'(Lio/sentry/Sentry$OptionsConfiguration;Z)V', + ); + + static final _init$5 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_ + .VarArgs<(jni$_.Pointer, jni$_.Int32)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer, int)>(); + + /// from: `static public void init(io.sentry.Sentry$OptionsConfiguration optionsConfiguration, boolean z)` + static void init$5( + Sentry$OptionsConfiguration optionsConfiguration, + bool z, + ) { + final _$optionsConfiguration = optionsConfiguration.reference; + _init$5(_class.reference.pointer, _id_init$5 as jni$_.JMethodIDPtr, + _$optionsConfiguration.pointer, z ? 1 : 0) + .check(); + } + + static final _id_init$6 = _class.staticMethodId( + r'init', + r'(Lio/sentry/SentryOptions;)V', + ); + + static final _init$6 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void init(io.sentry.SentryOptions sentryOptions)` + static void init$6( + jni$_.JObject sentryOptions, + ) { + final _$sentryOptions = sentryOptions.reference; + _init$6(_class.reference.pointer, _id_init$6 as jni$_.JMethodIDPtr, + _$sentryOptions.pointer) + .check(); + } + + static final _id_close = _class.staticMethodId( + r'close', + r'()V', + ); + + static final _close = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void close()` + static void close() { + _close(_class.reference.pointer, _id_close as jni$_.JMethodIDPtr).check(); + } + + static final _id_captureEvent = _class.staticMethodId( + r'captureEvent', + r'(Lio/sentry/SentryEvent;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureEvent = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureEvent( + jni$_.JObject sentryEvent, + ) { + final _$sentryEvent = sentryEvent.reference; + return _captureEvent(_class.reference.pointer, + _id_captureEvent as jni$_.JMethodIDPtr, _$sentryEvent.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureEvent$1 = _class.staticMethodId( + r'captureEvent', + r'(Lio/sentry/SentryEvent;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureEvent$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureEvent$1( + jni$_.JObject sentryEvent, + jni$_.JObject scopeCallback, + ) { + final _$sentryEvent = sentryEvent.reference; + final _$scopeCallback = scopeCallback.reference; + return _captureEvent$1( + _class.reference.pointer, + _id_captureEvent$1 as jni$_.JMethodIDPtr, + _$sentryEvent.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureEvent$2 = _class.staticMethodId( + r'captureEvent', + r'(Lio/sentry/SentryEvent;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureEvent$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureEvent$2( + jni$_.JObject sentryEvent, + jni$_.JObject? hint, + ) { + final _$sentryEvent = sentryEvent.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureEvent$2( + _class.reference.pointer, + _id_captureEvent$2 as jni$_.JMethodIDPtr, + _$sentryEvent.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureEvent$3 = _class.staticMethodId( + r'captureEvent', + r'(Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureEvent$3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureEvent$3( + jni$_.JObject sentryEvent, + jni$_.JObject? hint, + jni$_.JObject scopeCallback, + ) { + final _$sentryEvent = sentryEvent.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback.reference; + return _captureEvent$3( + _class.reference.pointer, + _id_captureEvent$3 as jni$_.JMethodIDPtr, + _$sentryEvent.pointer, + _$hint.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureMessage = _class.staticMethodId( + r'captureMessage', + r'(Ljava/lang/String;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureMessage = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureMessage( + jni$_.JString string, + ) { + final _$string = string.reference; + return _captureMessage(_class.reference.pointer, + _id_captureMessage as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureMessage$1 = _class.staticMethodId( + r'captureMessage', + r'(Ljava/lang/String;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureMessage$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureMessage$1( + jni$_.JString string, + jni$_.JObject scopeCallback, + ) { + final _$string = string.reference; + final _$scopeCallback = scopeCallback.reference; + return _captureMessage$1( + _class.reference.pointer, + _id_captureMessage$1 as jni$_.JMethodIDPtr, + _$string.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureMessage$2 = _class.staticMethodId( + r'captureMessage', + r'(Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureMessage$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureMessage$2( + jni$_.JString string, + jni$_.JObject sentryLevel, + ) { + final _$string = string.reference; + final _$sentryLevel = sentryLevel.reference; + return _captureMessage$2( + _class.reference.pointer, + _id_captureMessage$2 as jni$_.JMethodIDPtr, + _$string.pointer, + _$sentryLevel.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureMessage$3 = _class.staticMethodId( + r'captureMessage', + r'(Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureMessage$3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureMessage$3( + jni$_.JString string, + jni$_.JObject sentryLevel, + jni$_.JObject scopeCallback, + ) { + final _$string = string.reference; + final _$sentryLevel = sentryLevel.reference; + final _$scopeCallback = scopeCallback.reference; + return _captureMessage$3( + _class.reference.pointer, + _id_captureMessage$3 as jni$_.JMethodIDPtr, + _$string.pointer, + _$sentryLevel.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureFeedback = _class.staticMethodId( + r'captureFeedback', + r'(Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureFeedback = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureFeedback( + jni$_.JObject feedback, + ) { + final _$feedback = feedback.reference; + return _captureFeedback(_class.reference.pointer, + _id_captureFeedback as jni$_.JMethodIDPtr, _$feedback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureFeedback$1 = _class.staticMethodId( + r'captureFeedback', + r'(Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureFeedback$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureFeedback$1( + jni$_.JObject feedback, + jni$_.JObject? hint, + ) { + final _$feedback = feedback.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureFeedback$1( + _class.reference.pointer, + _id_captureFeedback$1 as jni$_.JMethodIDPtr, + _$feedback.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureFeedback$2 = _class.staticMethodId( + r'captureFeedback', + r'(Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureFeedback$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureFeedback$2( + jni$_.JObject feedback, + jni$_.JObject? hint, + jni$_.JObject? scopeCallback, + ) { + final _$feedback = feedback.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback?.reference ?? jni$_.jNullReference; + return _captureFeedback$2( + _class.reference.pointer, + _id_captureFeedback$2 as jni$_.JMethodIDPtr, + _$feedback.pointer, + _$hint.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureException = _class.staticMethodId( + r'captureException', + r'(Ljava/lang/Throwable;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureException = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureException( + jni$_.JObject throwable, + ) { + final _$throwable = throwable.reference; + return _captureException(_class.reference.pointer, + _id_captureException as jni$_.JMethodIDPtr, _$throwable.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureException$1 = _class.staticMethodId( + r'captureException', + r'(Ljava/lang/Throwable;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureException$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureException$1( + jni$_.JObject throwable, + jni$_.JObject scopeCallback, + ) { + final _$throwable = throwable.reference; + final _$scopeCallback = scopeCallback.reference; + return _captureException$1( + _class.reference.pointer, + _id_captureException$1 as jni$_.JMethodIDPtr, + _$throwable.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureException$2 = _class.staticMethodId( + r'captureException', + r'(Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureException$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureException$2( + jni$_.JObject throwable, + jni$_.JObject? hint, + ) { + final _$throwable = throwable.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureException$2( + _class.reference.pointer, + _id_captureException$2 as jni$_.JMethodIDPtr, + _$throwable.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureException$3 = _class.staticMethodId( + r'captureException', + r'(Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureException$3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureException$3( + jni$_.JObject throwable, + jni$_.JObject? hint, + jni$_.JObject scopeCallback, + ) { + final _$throwable = throwable.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback.reference; + return _captureException$3( + _class.reference.pointer, + _id_captureException$3 as jni$_.JMethodIDPtr, + _$throwable.pointer, + _$hint.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureUserFeedback = _class.staticMethodId( + r'captureUserFeedback', + r'(Lio/sentry/UserFeedback;)V', + ); + + static final _captureUserFeedback = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void captureUserFeedback(io.sentry.UserFeedback userFeedback)` + static void captureUserFeedback( + jni$_.JObject userFeedback, + ) { + final _$userFeedback = userFeedback.reference; + _captureUserFeedback( + _class.reference.pointer, + _id_captureUserFeedback as jni$_.JMethodIDPtr, + _$userFeedback.pointer) + .check(); + } + + static final _id_addBreadcrumb = _class.staticMethodId( + r'addBreadcrumb', + r'(Lio/sentry/Breadcrumb;Lio/sentry/Hint;)V', + ); + + static final _addBreadcrumb = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb, io.sentry.Hint hint)` + static void addBreadcrumb( + Breadcrumb breadcrumb, + jni$_.JObject? hint, + ) { + final _$breadcrumb = breadcrumb.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + _addBreadcrumb( + _class.reference.pointer, + _id_addBreadcrumb as jni$_.JMethodIDPtr, + _$breadcrumb.pointer, + _$hint.pointer) + .check(); + } + + static final _id_addBreadcrumb$1 = _class.staticMethodId( + r'addBreadcrumb', + r'(Lio/sentry/Breadcrumb;)V', + ); + + static final _addBreadcrumb$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb)` + static void addBreadcrumb$1( + Breadcrumb breadcrumb, + ) { + final _$breadcrumb = breadcrumb.reference; + _addBreadcrumb$1(_class.reference.pointer, + _id_addBreadcrumb$1 as jni$_.JMethodIDPtr, _$breadcrumb.pointer) + .check(); + } + + static final _id_addBreadcrumb$2 = _class.staticMethodId( + r'addBreadcrumb', + r'(Ljava/lang/String;)V', + ); + + static final _addBreadcrumb$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void addBreadcrumb(java.lang.String string)` + static void addBreadcrumb$2( + jni$_.JString string, + ) { + final _$string = string.reference; + _addBreadcrumb$2(_class.reference.pointer, + _id_addBreadcrumb$2 as jni$_.JMethodIDPtr, _$string.pointer) + .check(); + } + + static final _id_addBreadcrumb$3 = _class.staticMethodId( + r'addBreadcrumb', + r'(Ljava/lang/String;Ljava/lang/String;)V', + ); + + static final _addBreadcrumb$3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public void addBreadcrumb(java.lang.String string, java.lang.String string1)` + static void addBreadcrumb$3( + jni$_.JString string, + jni$_.JString string1, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + _addBreadcrumb$3( + _class.reference.pointer, + _id_addBreadcrumb$3 as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer) + .check(); + } + + static final _id_setLevel = _class.staticMethodId( + r'setLevel', + r'(Lio/sentry/SentryLevel;)V', + ); + + static final _setLevel = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void setLevel(io.sentry.SentryLevel sentryLevel)` + static void setLevel( + jni$_.JObject? sentryLevel, + ) { + final _$sentryLevel = sentryLevel?.reference ?? jni$_.jNullReference; + _setLevel(_class.reference.pointer, _id_setLevel as jni$_.JMethodIDPtr, + _$sentryLevel.pointer) + .check(); + } + + static final _id_setTransaction = _class.staticMethodId( + r'setTransaction', + r'(Ljava/lang/String;)V', + ); + + static final _setTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void setTransaction(java.lang.String string)` + static void setTransaction( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setTransaction(_class.reference.pointer, + _id_setTransaction as jni$_.JMethodIDPtr, _$string.pointer) + .check(); + } + + static final _id_setUser = _class.staticMethodId( + r'setUser', + r'(Lio/sentry/protocol/User;)V', + ); + + static final _setUser = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void setUser(io.sentry.protocol.User user)` + static void setUser( + jni$_.JObject? user, + ) { + final _$user = user?.reference ?? jni$_.jNullReference; + _setUser(_class.reference.pointer, _id_setUser as jni$_.JMethodIDPtr, + _$user.pointer) + .check(); + } + + static final _id_setFingerprint = _class.staticMethodId( + r'setFingerprint', + r'(Ljava/util/List;)V', + ); + + static final _setFingerprint = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void setFingerprint(java.util.List list)` + static void setFingerprint( + jni$_.JList list, + ) { + final _$list = list.reference; + _setFingerprint(_class.reference.pointer, + _id_setFingerprint as jni$_.JMethodIDPtr, _$list.pointer) + .check(); + } + + static final _id_clearBreadcrumbs = _class.staticMethodId( + r'clearBreadcrumbs', + r'()V', + ); + + static final _clearBreadcrumbs = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void clearBreadcrumbs()` + static void clearBreadcrumbs() { + _clearBreadcrumbs(_class.reference.pointer, + _id_clearBreadcrumbs as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_setTag = _class.staticMethodId( + r'setTag', + r'(Ljava/lang/String;Ljava/lang/String;)V', + ); + + static final _setTag = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public void setTag(java.lang.String string, java.lang.String string1)` + static void setTag( + jni$_.JString? string, + jni$_.JString? string1, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + _setTag(_class.reference.pointer, _id_setTag as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) + .check(); + } + + static final _id_removeTag = _class.staticMethodId( + r'removeTag', + r'(Ljava/lang/String;)V', + ); + + static final _removeTag = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void removeTag(java.lang.String string)` + static void removeTag( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _removeTag(_class.reference.pointer, _id_removeTag as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_setExtra = _class.staticMethodId( + r'setExtra', + r'(Ljava/lang/String;Ljava/lang/String;)V', + ); + + static final _setExtra = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public void setExtra(java.lang.String string, java.lang.String string1)` + static void setExtra( + jni$_.JString? string, + jni$_.JString? string1, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + _setExtra(_class.reference.pointer, _id_setExtra as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) + .check(); + } + + static final _id_removeExtra = _class.staticMethodId( + r'removeExtra', + r'(Ljava/lang/String;)V', + ); + + static final _removeExtra = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void removeExtra(java.lang.String string)` + static void removeExtra( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _removeExtra(_class.reference.pointer, + _id_removeExtra as jni$_.JMethodIDPtr, _$string.pointer) + .check(); + } + + static final _id_getLastEventId = _class.staticMethodId( + r'getLastEventId', + r'()Lio/sentry/protocol/SentryId;', + ); + + static final _getLastEventId = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.protocol.SentryId getLastEventId()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject getLastEventId() { + return _getLastEventId( + _class.reference.pointer, _id_getLastEventId as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_pushScope = _class.staticMethodId( + r'pushScope', + r'()Lio/sentry/ISentryLifecycleToken;', + ); + + static final _pushScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.ISentryLifecycleToken pushScope()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject pushScope() { + return _pushScope( + _class.reference.pointer, _id_pushScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_pushIsolationScope = _class.staticMethodId( + r'pushIsolationScope', + r'()Lio/sentry/ISentryLifecycleToken;', + ); + + static final _pushIsolationScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.ISentryLifecycleToken pushIsolationScope()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject pushIsolationScope() { + return _pushIsolationScope(_class.reference.pointer, + _id_pushIsolationScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_popScope = _class.staticMethodId( + r'popScope', + r'()V', + ); + + static final _popScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void popScope()` + static void popScope() { + _popScope(_class.reference.pointer, _id_popScope as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_withScope = _class.staticMethodId( + r'withScope', + r'(Lio/sentry/ScopeCallback;)V', + ); + + static final _withScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void withScope(io.sentry.ScopeCallback scopeCallback)` + static void withScope( + jni$_.JObject scopeCallback, + ) { + final _$scopeCallback = scopeCallback.reference; + _withScope(_class.reference.pointer, _id_withScope as jni$_.JMethodIDPtr, + _$scopeCallback.pointer) + .check(); + } + + static final _id_withIsolationScope = _class.staticMethodId( + r'withIsolationScope', + r'(Lio/sentry/ScopeCallback;)V', + ); + + static final _withIsolationScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void withIsolationScope(io.sentry.ScopeCallback scopeCallback)` + static void withIsolationScope( + jni$_.JObject scopeCallback, + ) { + final _$scopeCallback = scopeCallback.reference; + _withIsolationScope( + _class.reference.pointer, + _id_withIsolationScope as jni$_.JMethodIDPtr, + _$scopeCallback.pointer) + .check(); + } + + static final _id_configureScope = _class.staticMethodId( + r'configureScope', + r'(Lio/sentry/ScopeCallback;)V', + ); + + static final _configureScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void configureScope(io.sentry.ScopeCallback scopeCallback)` + static void configureScope( + jni$_.JObject scopeCallback, + ) { + final _$scopeCallback = scopeCallback.reference; + _configureScope(_class.reference.pointer, + _id_configureScope as jni$_.JMethodIDPtr, _$scopeCallback.pointer) + .check(); + } + + static final _id_configureScope$1 = _class.staticMethodId( + r'configureScope', + r'(Lio/sentry/ScopeType;Lio/sentry/ScopeCallback;)V', + ); + + static final _configureScope$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public void configureScope(io.sentry.ScopeType scopeType, io.sentry.ScopeCallback scopeCallback)` + static void configureScope$1( + jni$_.JObject? scopeType, + jni$_.JObject scopeCallback, + ) { + final _$scopeType = scopeType?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback.reference; + _configureScope$1( + _class.reference.pointer, + _id_configureScope$1 as jni$_.JMethodIDPtr, + _$scopeType.pointer, + _$scopeCallback.pointer) + .check(); + } + + static final _id_bindClient = _class.staticMethodId( + r'bindClient', + r'(Lio/sentry/ISentryClient;)V', + ); + + static final _bindClient = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void bindClient(io.sentry.ISentryClient iSentryClient)` + static void bindClient( + jni$_.JObject iSentryClient, + ) { + final _$iSentryClient = iSentryClient.reference; + _bindClient(_class.reference.pointer, _id_bindClient as jni$_.JMethodIDPtr, + _$iSentryClient.pointer) + .check(); + } + + static final _id_isHealthy = _class.staticMethodId( + r'isHealthy', + r'()Z', + ); + + static final _isHealthy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public boolean isHealthy()` + static bool isHealthy() { + return _isHealthy( + _class.reference.pointer, _id_isHealthy as jni$_.JMethodIDPtr) + .boolean; + } + + static final _id_flush = _class.staticMethodId( + r'flush', + r'(J)V', + ); + + static final _flush = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.VarArgs<(jni$_.Int64,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `static public void flush(long j)` + static void flush( + int j, + ) { + _flush(_class.reference.pointer, _id_flush as jni$_.JMethodIDPtr, j) + .check(); + } + + static final _id_startSession = _class.staticMethodId( + r'startSession', + r'()V', + ); + + static final _startSession = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void startSession()` + static void startSession() { + _startSession( + _class.reference.pointer, _id_startSession as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_endSession = _class.staticMethodId( + r'endSession', + r'()V', + ); + + static final _endSession = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void endSession()` + static void endSession() { + _endSession(_class.reference.pointer, _id_endSession as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_startTransaction = _class.staticMethodId( + r'startTransaction', + r'(Ljava/lang/String;Ljava/lang/String;)Lio/sentry/ITransaction;', + ); + + static final _startTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.ITransaction startTransaction(java.lang.String string, java.lang.String string1)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject startTransaction( + jni$_.JString string, + jni$_.JString string1, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + return _startTransaction( + _class.reference.pointer, + _id_startTransaction as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_startTransaction$1 = _class.staticMethodId( + r'startTransaction', + r'(Ljava/lang/String;Ljava/lang/String;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;', + ); + + static final _startTransaction$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.ITransaction startTransaction(java.lang.String string, java.lang.String string1, io.sentry.TransactionOptions transactionOptions)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject startTransaction$1( + jni$_.JString string, + jni$_.JString string1, + jni$_.JObject transactionOptions, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + final _$transactionOptions = transactionOptions.reference; + return _startTransaction$1( + _class.reference.pointer, + _id_startTransaction$1 as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer, + _$transactionOptions.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_startTransaction$2 = _class.staticMethodId( + r'startTransaction', + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;', + ); + + static final _startTransaction$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.ITransaction startTransaction(java.lang.String string, java.lang.String string1, java.lang.String string2, io.sentry.TransactionOptions transactionOptions)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject startTransaction$2( + jni$_.JString string, + jni$_.JString string1, + jni$_.JString? string2, + jni$_.JObject transactionOptions, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + final _$string2 = string2?.reference ?? jni$_.jNullReference; + final _$transactionOptions = transactionOptions.reference; + return _startTransaction$2( + _class.reference.pointer, + _id_startTransaction$2 as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer, + _$string2.pointer, + _$transactionOptions.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_startTransaction$3 = _class.staticMethodId( + r'startTransaction', + r'(Lio/sentry/TransactionContext;)Lio/sentry/ITransaction;', + ); + + static final _startTransaction$3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.ITransaction startTransaction(io.sentry.TransactionContext transactionContext)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject startTransaction$3( + jni$_.JObject transactionContext, + ) { + final _$transactionContext = transactionContext.reference; + return _startTransaction$3( + _class.reference.pointer, + _id_startTransaction$3 as jni$_.JMethodIDPtr, + _$transactionContext.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_startTransaction$4 = _class.staticMethodId( + r'startTransaction', + r'(Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;', + ); + + static final _startTransaction$4 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.ITransaction startTransaction(io.sentry.TransactionContext transactionContext, io.sentry.TransactionOptions transactionOptions)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject startTransaction$4( + jni$_.JObject transactionContext, + jni$_.JObject transactionOptions, + ) { + final _$transactionContext = transactionContext.reference; + final _$transactionOptions = transactionOptions.reference; + return _startTransaction$4( + _class.reference.pointer, + _id_startTransaction$4 as jni$_.JMethodIDPtr, + _$transactionContext.pointer, + _$transactionOptions.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_startProfiler = _class.staticMethodId( + r'startProfiler', + r'()V', + ); + + static final _startProfiler = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void startProfiler()` + static void startProfiler() { + _startProfiler( + _class.reference.pointer, _id_startProfiler as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_stopProfiler = _class.staticMethodId( + r'stopProfiler', + r'()V', + ); + + static final _stopProfiler = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void stopProfiler()` + static void stopProfiler() { + _stopProfiler( + _class.reference.pointer, _id_stopProfiler as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_getSpan = _class.staticMethodId( + r'getSpan', + r'()Lio/sentry/ISpan;', + ); + + static final _getSpan = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.ISpan getSpan()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject? getSpan() { + return _getSpan(_class.reference.pointer, _id_getSpan as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_isCrashedLastRun = _class.staticMethodId( + r'isCrashedLastRun', + r'()Ljava/lang/Boolean;', + ); + + static final _isCrashedLastRun = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public java.lang.Boolean isCrashedLastRun()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JBoolean? isCrashedLastRun() { + return _isCrashedLastRun(_class.reference.pointer, + _id_isCrashedLastRun as jni$_.JMethodIDPtr) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_reportFullyDisplayed = _class.staticMethodId( + r'reportFullyDisplayed', + r'()V', + ); + + static final _reportFullyDisplayed = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void reportFullyDisplayed()` + static void reportFullyDisplayed() { + _reportFullyDisplayed(_class.reference.pointer, + _id_reportFullyDisplayed as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_continueTrace = _class.staticMethodId( + r'continueTrace', + r'(Ljava/lang/String;Ljava/util/List;)Lio/sentry/TransactionContext;', + ); + + static final _continueTrace = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.TransactionContext continueTrace(java.lang.String string, java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject? continueTrace( + jni$_.JString? string, + jni$_.JList? list, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + return _continueTrace( + _class.reference.pointer, + _id_continueTrace as jni$_.JMethodIDPtr, + _$string.pointer, + _$list.pointer) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_getTraceparent = _class.staticMethodId( + r'getTraceparent', + r'()Lio/sentry/SentryTraceHeader;', + ); + + static final _getTraceparent = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.SentryTraceHeader getTraceparent()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject? getTraceparent() { + return _getTraceparent( + _class.reference.pointer, _id_getTraceparent as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_getBaggage = _class.staticMethodId( + r'getBaggage', + r'()Lio/sentry/BaggageHeader;', + ); + + static final _getBaggage = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.BaggageHeader getBaggage()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject? getBaggage() { + return _getBaggage( + _class.reference.pointer, _id_getBaggage as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_captureCheckIn = _class.staticMethodId( + r'captureCheckIn', + r'(Lio/sentry/CheckIn;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureCheckIn = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.protocol.SentryId captureCheckIn(io.sentry.CheckIn checkIn)` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject captureCheckIn( + jni$_.JObject checkIn, + ) { + final _$checkIn = checkIn.reference; + return _captureCheckIn(_class.reference.pointer, + _id_captureCheckIn as jni$_.JMethodIDPtr, _$checkIn.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_logger = _class.staticMethodId( + r'logger', + r'()Lio/sentry/logger/ILoggerApi;', + ); + + static final _logger = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.logger.ILoggerApi logger()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject logger() { + return _logger(_class.reference.pointer, _id_logger as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_replay = _class.staticMethodId( + r'replay', + r'()Lio/sentry/IReplayApi;', + ); + + static final _replay = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.IReplayApi replay()` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JObject replay() { + return _replay(_class.reference.pointer, _id_replay as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_showUserFeedbackDialog = _class.staticMethodId( + r'showUserFeedbackDialog', + r'()V', + ); + + static final _showUserFeedbackDialog = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public void showUserFeedbackDialog()` + static void showUserFeedbackDialog() { + _showUserFeedbackDialog(_class.reference.pointer, + _id_showUserFeedbackDialog as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_showUserFeedbackDialog$1 = _class.staticMethodId( + r'showUserFeedbackDialog', + r'(Lio/sentry/SentryFeedbackOptions$OptionsConfigurator;)V', + ); + + static final _showUserFeedbackDialog$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public void showUserFeedbackDialog(io.sentry.SentryFeedbackOptions$OptionsConfigurator optionsConfigurator)` + static void showUserFeedbackDialog$1( + jni$_.JObject? optionsConfigurator, + ) { + final _$optionsConfigurator = + optionsConfigurator?.reference ?? jni$_.jNullReference; + _showUserFeedbackDialog$1( + _class.reference.pointer, + _id_showUserFeedbackDialog$1 as jni$_.JMethodIDPtr, + _$optionsConfigurator.pointer) + .check(); + } + + static final _id_showUserFeedbackDialog$2 = _class.staticMethodId( + r'showUserFeedbackDialog', + r'(Lio/sentry/protocol/SentryId;Lio/sentry/SentryFeedbackOptions$OptionsConfigurator;)V', + ); + + static final _showUserFeedbackDialog$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public void showUserFeedbackDialog(io.sentry.protocol.SentryId sentryId, io.sentry.SentryFeedbackOptions$OptionsConfigurator optionsConfigurator)` + static void showUserFeedbackDialog$2( + jni$_.JObject? sentryId, + jni$_.JObject? optionsConfigurator, + ) { + final _$sentryId = sentryId?.reference ?? jni$_.jNullReference; + final _$optionsConfigurator = + optionsConfigurator?.reference ?? jni$_.jNullReference; + _showUserFeedbackDialog$2( + _class.reference.pointer, + _id_showUserFeedbackDialog$2 as jni$_.JMethodIDPtr, + _$sentryId.pointer, + _$optionsConfigurator.pointer) + .check(); + } +} + +final class $Sentry$NullableType extends jni$_.JObjType { + @jni$_.internal + const $Sentry$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Sentry;'; + + @jni$_.internal + @core$_.override + Sentry? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : Sentry.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 => ($Sentry$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Sentry$NullableType) && + other is $Sentry$NullableType; + } +} + +final class $Sentry$Type extends jni$_.JObjType { + @jni$_.internal + const $Sentry$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Sentry;'; + + @jni$_.internal + @core$_.override + Sentry fromReference(jni$_.JReference reference) => Sentry.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => const $Sentry$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Sentry$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Sentry$Type) && other is $Sentry$Type; + } +} + +/// from: `io.sentry.Breadcrumb$Deserializer` +class Breadcrumb$Deserializer extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Breadcrumb$Deserializer.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = + jni$_.JClass.forName(r'io/sentry/Breadcrumb$Deserializer'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Breadcrumb$Deserializer$NullableType(); + static const type = $Breadcrumb$Deserializer$Type(); + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Breadcrumb$Deserializer() { + return Breadcrumb$Deserializer.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); + } + + static final _id_deserialize = _class.instanceMethodId( + r'deserialize', + r'(Lio/sentry/ObjectReader;Lio/sentry/ILogger;)Lio/sentry/Breadcrumb;', + ); + + static final _deserialize = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.Breadcrumb deserialize(io.sentry.ObjectReader objectReader, io.sentry.ILogger iLogger)` + /// The returned object must be released after use, by calling the [release] method. + Breadcrumb deserialize( + jni$_.JObject objectReader, + jni$_.JObject iLogger, + ) { + final _$objectReader = objectReader.reference; + final _$iLogger = iLogger.reference; + return _deserialize( + reference.pointer, + _id_deserialize as jni$_.JMethodIDPtr, + _$objectReader.pointer, + _$iLogger.pointer) + .object(const $Breadcrumb$Type()); + } +} + +final class $Breadcrumb$Deserializer$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $Breadcrumb$Deserializer$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Breadcrumb$Deserializer;'; + + @jni$_.internal + @core$_.override + Breadcrumb$Deserializer? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : Breadcrumb$Deserializer.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 => ($Breadcrumb$Deserializer$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Breadcrumb$Deserializer$NullableType) && + other is $Breadcrumb$Deserializer$NullableType; + } +} + +final class $Breadcrumb$Deserializer$Type + extends jni$_.JObjType { + @jni$_.internal + const $Breadcrumb$Deserializer$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Breadcrumb$Deserializer;'; + + @jni$_.internal + @core$_.override + Breadcrumb$Deserializer fromReference(jni$_.JReference reference) => + Breadcrumb$Deserializer.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $Breadcrumb$Deserializer$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Breadcrumb$Deserializer$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Breadcrumb$Deserializer$Type) && + other is $Breadcrumb$Deserializer$Type; + } +} + +/// from: `io.sentry.Breadcrumb$JsonKeys` +class Breadcrumb$JsonKeys extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Breadcrumb$JsonKeys.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'io/sentry/Breadcrumb$JsonKeys'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Breadcrumb$JsonKeys$NullableType(); + static const type = $Breadcrumb$JsonKeys$Type(); + static final _id_TIMESTAMP = _class.staticFieldId( + r'TIMESTAMP', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String TIMESTAMP` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get TIMESTAMP => + _id_TIMESTAMP.get(_class, const jni$_.JStringNullableType()); + + static final _id_MESSAGE = _class.staticFieldId( + r'MESSAGE', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String MESSAGE` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get MESSAGE => + _id_MESSAGE.get(_class, const jni$_.JStringNullableType()); + + static final _id_TYPE = _class.staticFieldId( + r'TYPE', + r'Ljava/lang/String;', + ); + + /// 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$_.JStringNullableType()); + + static final _id_DATA = _class.staticFieldId( + r'DATA', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String DATA` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get DATA => + _id_DATA.get(_class, const jni$_.JStringNullableType()); + + static final _id_CATEGORY = _class.staticFieldId( + r'CATEGORY', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String CATEGORY` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get CATEGORY => + _id_CATEGORY.get(_class, const jni$_.JStringNullableType()); + + static final _id_ORIGIN = _class.staticFieldId( + r'ORIGIN', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String ORIGIN` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get ORIGIN => + _id_ORIGIN.get(_class, const jni$_.JStringNullableType()); + + static final _id_LEVEL = _class.staticFieldId( + r'LEVEL', + r'Ljava/lang/String;', + ); + + /// from: `static public final java.lang.String LEVEL` + /// The returned object must be released after use, by calling the [release] method. + static jni$_.JString? get LEVEL => + _id_LEVEL.get(_class, const jni$_.JStringNullableType()); + + static final _id_new$ = _class.constructorId( + r'()V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Breadcrumb$JsonKeys() { + return Breadcrumb$JsonKeys.fromReference( + _new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr) + .reference); + } +} + +final class $Breadcrumb$JsonKeys$NullableType + extends jni$_.JObjType { + @jni$_.internal + const $Breadcrumb$JsonKeys$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Breadcrumb$JsonKeys;'; + + @jni$_.internal + @core$_.override + Breadcrumb$JsonKeys? fromReference(jni$_.JReference reference) => + reference.isNull + ? null + : Breadcrumb$JsonKeys.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 => ($Breadcrumb$JsonKeys$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Breadcrumb$JsonKeys$NullableType) && + other is $Breadcrumb$JsonKeys$NullableType; + } +} + +final class $Breadcrumb$JsonKeys$Type + extends jni$_.JObjType { + @jni$_.internal + const $Breadcrumb$JsonKeys$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Breadcrumb$JsonKeys;'; + + @jni$_.internal + @core$_.override + Breadcrumb$JsonKeys fromReference(jni$_.JReference reference) => + Breadcrumb$JsonKeys.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $Breadcrumb$JsonKeys$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Breadcrumb$JsonKeys$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Breadcrumb$JsonKeys$Type) && + other is $Breadcrumb$JsonKeys$Type; + } +} + +/// from: `io.sentry.Breadcrumb` +class Breadcrumb extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + Breadcrumb.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'io/sentry/Breadcrumb'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $Breadcrumb$NullableType(); + static const type = $Breadcrumb$Type(); + static final _id_new$ = _class.constructorId( + r'(Ljava/util/Date;)V', + ); + + static final _new$ = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void (java.util.Date date)` + /// The returned object must be released after use, by calling the [release] method. + factory Breadcrumb( + jni$_.JObject date, + ) { + final _$date = date.reference; + return Breadcrumb.fromReference(_new$(_class.reference.pointer, + _id_new$ as jni$_.JMethodIDPtr, _$date.pointer) + .reference); + } + + static final _id_new$1 = _class.constructorId( + r'(J)V', + ); + + static final _new$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>)>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public void (long j)` + /// The returned object must be released after use, by calling the [release] method. + factory Breadcrumb.new$1( + int j, + ) { + return Breadcrumb.fromReference( + _new$1(_class.reference.pointer, _id_new$1 as jni$_.JMethodIDPtr, j) + .reference); + } + + static final _id_fromMap = _class.staticMethodId( + r'fromMap', + r'(Ljava/util/Map;Lio/sentry/SentryOptions;)Lio/sentry/Breadcrumb;', + ); + + static final _fromMap = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb fromMap(java.util.Map map, io.sentry.SentryOptions sentryOptions)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb? fromMap( + jni$_.JMap map, + jni$_.JObject sentryOptions, + ) { + final _$map = map.reference; + final _$sentryOptions = sentryOptions.reference; + return _fromMap(_class.reference.pointer, _id_fromMap as jni$_.JMethodIDPtr, + _$map.pointer, _$sentryOptions.pointer) + .object(const $Breadcrumb$NullableType()); + } + + static final _id_http = _class.staticMethodId( + r'http', + r'(Ljava/lang/String;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _http = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb http(java.lang.String string, java.lang.String string1)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb http( + jni$_.JString string, + jni$_.JString string1, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + return _http(_class.reference.pointer, _id_http as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_http$1 = _class.staticMethodId( + r'http', + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Lio/sentry/Breadcrumb;', + ); + + static final _http$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb http(java.lang.String string, java.lang.String string1, java.lang.Integer integer)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb http$1( + jni$_.JString string, + jni$_.JString string1, + jni$_.JInteger? integer, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + final _$integer = integer?.reference ?? jni$_.jNullReference; + return _http$1(_class.reference.pointer, _id_http$1 as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer, _$integer.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_graphqlOperation = _class.staticMethodId( + r'graphqlOperation', + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _graphqlOperation = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb graphqlOperation(java.lang.String string, java.lang.String string1, java.lang.String string2)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb graphqlOperation( + jni$_.JString? string, + jni$_.JString? string1, + jni$_.JString? string2, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + final _$string2 = string2?.reference ?? jni$_.jNullReference; + return _graphqlOperation( + _class.reference.pointer, + _id_graphqlOperation as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer, + _$string2.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_graphqlDataFetcher = _class.staticMethodId( + r'graphqlDataFetcher', + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _graphqlDataFetcher = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb graphqlDataFetcher(java.lang.String string, java.lang.String string1, java.lang.String string2, java.lang.String string3)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb graphqlDataFetcher( + jni$_.JString? string, + jni$_.JString? string1, + jni$_.JString? string2, + jni$_.JString? string3, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + final _$string2 = string2?.reference ?? jni$_.jNullReference; + final _$string3 = string3?.reference ?? jni$_.jNullReference; + return _graphqlDataFetcher( + _class.reference.pointer, + _id_graphqlDataFetcher as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer, + _$string2.pointer, + _$string3.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_graphqlDataLoader = _class.staticMethodId( + r'graphqlDataLoader', + r'(Ljava/lang/Iterable;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _graphqlDataLoader = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb graphqlDataLoader(java.lang.Iterable iterable, java.lang.Class class, java.lang.Class class1, java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb graphqlDataLoader( + jni$_.JObject iterable, + jni$_.JObject? class$, + jni$_.JObject? class1, + jni$_.JString? string, + ) { + final _$iterable = iterable.reference; + final _$class$ = class$?.reference ?? jni$_.jNullReference; + final _$class1 = class1?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + return _graphqlDataLoader( + _class.reference.pointer, + _id_graphqlDataLoader as jni$_.JMethodIDPtr, + _$iterable.pointer, + _$class$.pointer, + _$class1.pointer, + _$string.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_navigation = _class.staticMethodId( + r'navigation', + r'(Ljava/lang/String;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _navigation = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb navigation(java.lang.String string, java.lang.String string1)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb navigation( + jni$_.JString string, + jni$_.JString string1, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + return _navigation( + _class.reference.pointer, + _id_navigation as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_transaction = _class.staticMethodId( + r'transaction', + r'(Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _transaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb transaction(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb transaction( + jni$_.JString string, + ) { + final _$string = string.reference; + return _transaction(_class.reference.pointer, + _id_transaction as jni$_.JMethodIDPtr, _$string.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_debug = _class.staticMethodId( + r'debug', + r'(Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _debug = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb debug(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb debug( + jni$_.JString string, + ) { + final _$string = string.reference; + return _debug(_class.reference.pointer, _id_debug as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_error = _class.staticMethodId( + r'error', + r'(Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _error = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb error(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb error( + jni$_.JString string, + ) { + final _$string = string.reference; + return _error(_class.reference.pointer, _id_error as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_info = _class.staticMethodId( + r'info', + r'(Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _info = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb info(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb info( + jni$_.JString string, + ) { + final _$string = string.reference; + return _info(_class.reference.pointer, _id_info as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_query = _class.staticMethodId( + r'query', + r'(Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _query = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb query(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb query( + jni$_.JString string, + ) { + final _$string = string.reference; + return _query(_class.reference.pointer, _id_query as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_ui = _class.staticMethodId( + r'ui', + r'(Ljava/lang/String;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _ui = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb ui(java.lang.String string, java.lang.String string1)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb ui( + jni$_.JString string, + jni$_.JString string1, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + return _ui(_class.reference.pointer, _id_ui as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_user = _class.staticMethodId( + r'user', + r'(Ljava/lang/String;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _user = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb user(java.lang.String string, java.lang.String string1)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb user( + jni$_.JString string, + jni$_.JString string1, + ) { + final _$string = string.reference; + final _$string1 = string1.reference; + return _user(_class.reference.pointer, _id_user as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_userInteraction = _class.staticMethodId( + r'userInteraction', + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/sentry/Breadcrumb;', + ); + + static final _userInteraction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb userInteraction(java.lang.String string, java.lang.String string1, java.lang.String string2)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb userInteraction( + jni$_.JString string, + jni$_.JString? string1, + jni$_.JString? string2, + ) { + final _$string = string.reference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + final _$string2 = string2?.reference ?? jni$_.jNullReference; + return _userInteraction( + _class.reference.pointer, + _id_userInteraction as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer, + _$string2.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_userInteraction$1 = _class.staticMethodId( + r'userInteraction', + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Lio/sentry/Breadcrumb;', + ); + + static final _userInteraction$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb userInteraction(java.lang.String string, java.lang.String string1, java.lang.String string2, java.lang.String string3, java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb userInteraction$1( + jni$_.JString string, + jni$_.JString? string1, + jni$_.JString? string2, + jni$_.JString? string3, + jni$_.JMap map, + ) { + final _$string = string.reference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + final _$string2 = string2?.reference ?? jni$_.jNullReference; + final _$string3 = string3?.reference ?? jni$_.jNullReference; + final _$map = map.reference; + return _userInteraction$1( + _class.reference.pointer, + _id_userInteraction$1 as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer, + _$string2.pointer, + _$string3.pointer, + _$map.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_userInteraction$2 = _class.staticMethodId( + r'userInteraction', + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Lio/sentry/Breadcrumb;', + ); + + static final _userInteraction$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `static public io.sentry.Breadcrumb userInteraction(java.lang.String string, java.lang.String string1, java.lang.String string2, java.util.Map map)` + /// The returned object must be released after use, by calling the [release] method. + static Breadcrumb userInteraction$2( + jni$_.JString string, + jni$_.JString? string1, + jni$_.JString? string2, + jni$_.JMap map, + ) { + final _$string = string.reference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + final _$string2 = string2?.reference ?? jni$_.jNullReference; + final _$map = map.reference; + return _userInteraction$2( + _class.reference.pointer, + _id_userInteraction$2 as jni$_.JMethodIDPtr, + _$string.pointer, + _$string1.pointer, + _$string2.pointer, + _$map.pointer) + .object(const $Breadcrumb$Type()); + } + + static final _id_new$2 = _class.constructorId( + r'()V', + ); + + static final _new$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory Breadcrumb.new$2() { + return Breadcrumb.fromReference( + _new$2(_class.reference.pointer, _id_new$2 as jni$_.JMethodIDPtr) + .reference); + } + + static final _id_new$3 = _class.constructorId( + r'(Ljava/lang/String;)V', + ); + + static final _new$3 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void (java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + factory Breadcrumb.new$3( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return Breadcrumb.fromReference(_new$3(_class.reference.pointer, + _id_new$3 as jni$_.JMethodIDPtr, _$string.pointer) + .reference); + } + + static final _id_getTimestamp = _class.instanceMethodId( + r'getTimestamp', + r'()Ljava/util/Date;', + ); + + static final _getTimestamp = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.util.Date getTimestamp()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getTimestamp() { + return _getTimestamp( + reference.pointer, _id_getTimestamp as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_getMessage = _class.instanceMethodId( + r'getMessage', + r'()Ljava/lang/String;', + ); + + static final _getMessage = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getMessage()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getMessage() { + return _getMessage(reference.pointer, _id_getMessage as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_setMessage = _class.instanceMethodId( + r'setMessage', + r'(Ljava/lang/String;)V', + ); + + static final _setMessage = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setMessage(java.lang.String string)` + void setMessage( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setMessage(reference.pointer, _id_setMessage as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getType = _class.instanceMethodId( + r'getType', + r'()Ljava/lang/String;', + ); + + static final _getType = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getType()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getType() { + return _getType(reference.pointer, _id_getType as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_setType = _class.instanceMethodId( + r'setType', + r'(Ljava/lang/String;)V', + ); + + static final _setType = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setType(java.lang.String string)` + void setType( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setType(reference.pointer, _id_setType as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getData = _class.instanceMethodId( + r'getData', + r'()Ljava/util/Map;', + ); + + static final _getData = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.util.Map getData()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap getData() { + return _getData(reference.pointer, _id_getData as jni$_.JMethodIDPtr) + .object>( + const jni$_.JMapType( + jni$_.JStringNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_getData$1 = _class.instanceMethodId( + r'getData', + r'(Ljava/lang/String;)Ljava/lang/Object;', + ); + + static final _getData$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public java.lang.Object getData(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getData$1( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _getData$1(reference.pointer, _id_getData$1 as jni$_.JMethodIDPtr, + _$string.pointer) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_setData = _class.instanceMethodId( + r'setData', + r'(Ljava/lang/String;Ljava/lang/Object;)V', + ); + + static final _setData = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void setData(java.lang.String string, java.lang.Object object)` + void setData( + jni$_.JString? string, + jni$_.JObject? object, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + _setData(reference.pointer, _id_setData as jni$_.JMethodIDPtr, + _$string.pointer, _$object.pointer) + .check(); + } + + static final _id_removeData = _class.instanceMethodId( + r'removeData', + r'(Ljava/lang/String;)V', + ); + + static final _removeData = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void removeData(java.lang.String string)` + void removeData( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _removeData(reference.pointer, _id_removeData as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getCategory = _class.instanceMethodId( + r'getCategory', + r'()Ljava/lang/String;', + ); + + static final _getCategory = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getCategory()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getCategory() { + return _getCategory( + reference.pointer, _id_getCategory as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_setCategory = _class.instanceMethodId( + r'setCategory', + r'(Ljava/lang/String;)V', + ); + + static final _setCategory = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setCategory(java.lang.String string)` + void setCategory( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setCategory(reference.pointer, _id_setCategory as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getOrigin = _class.instanceMethodId( + r'getOrigin', + r'()Ljava/lang/String;', + ); + + static final _getOrigin = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.String getOrigin()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? getOrigin() { + return _getOrigin(reference.pointer, _id_getOrigin as jni$_.JMethodIDPtr) + .object(const jni$_.JStringNullableType()); + } + + static final _id_setOrigin = _class.instanceMethodId( + r'setOrigin', + r'(Ljava/lang/String;)V', + ); + + static final _setOrigin = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setOrigin(java.lang.String string)` + void setOrigin( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setOrigin(reference.pointer, _id_setOrigin as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getLevel = _class.instanceMethodId( + r'getLevel', + r'()Lio/sentry/SentryLevel;', + ); + + static final _getLevel = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.SentryLevel getLevel()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getLevel() { + return _getLevel(reference.pointer, _id_getLevel as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_setLevel = _class.instanceMethodId( + r'setLevel', + r'(Lio/sentry/SentryLevel;)V', + ); + + static final _setLevel = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setLevel(io.sentry.SentryLevel sentryLevel)` + void setLevel( + jni$_.JObject? sentryLevel, + ) { + final _$sentryLevel = sentryLevel?.reference ?? jni$_.jNullReference; + _setLevel(reference.pointer, _id_setLevel as jni$_.JMethodIDPtr, + _$sentryLevel.pointer) + .check(); + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public boolean equals(java.lang.Object object)` + bool equals( + jni$_.JObject? object, + ) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _equals(reference.pointer, _id_equals as jni$_.JMethodIDPtr, + _$object.pointer) + .boolean; + } + + static final _id_hashCode$1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as jni$_.JMethodIDPtr) + .integer; + } + + static final _id_getUnknown = _class.instanceMethodId( + r'getUnknown', + r'()Ljava/util/Map;', + ); + + static final _getUnknown = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.util.Map getUnknown()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JMap? getUnknown() { + return _getUnknown(reference.pointer, _id_getUnknown as jni$_.JMethodIDPtr) + .object?>( + const jni$_.JMapNullableType( + jni$_.JStringNullableType(), jni$_.JObjectNullableType())); + } + + static final _id_setUnknown = _class.instanceMethodId( + r'setUnknown', + r'(Ljava/util/Map;)V', + ); + + static final _setUnknown = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setUnknown(java.util.Map map)` + void setUnknown( + jni$_.JMap? map, + ) { + final _$map = map?.reference ?? jni$_.jNullReference; + _setUnknown(reference.pointer, _id_setUnknown as jni$_.JMethodIDPtr, + _$map.pointer) + .check(); + } + + static final _id_compareTo = _class.instanceMethodId( + r'compareTo', + r'(Lio/sentry/Breadcrumb;)I', + ); + + static final _compareTo = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public int compareTo(io.sentry.Breadcrumb breadcrumb)` + int compareTo( + Breadcrumb breadcrumb, + ) { + final _$breadcrumb = breadcrumb.reference; + return _compareTo(reference.pointer, _id_compareTo as jni$_.JMethodIDPtr, + _$breadcrumb.pointer) + .integer; + } + + static final _id_serialize = _class.instanceMethodId( + r'serialize', + r'(Lio/sentry/ObjectWriter;Lio/sentry/ILogger;)V', + ); + + static final _serialize = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void serialize(io.sentry.ObjectWriter objectWriter, io.sentry.ILogger iLogger)` + void serialize( + jni$_.JObject objectWriter, + jni$_.JObject iLogger, + ) { + final _$objectWriter = objectWriter.reference; + final _$iLogger = iLogger.reference; + _serialize(reference.pointer, _id_serialize as jni$_.JMethodIDPtr, + _$objectWriter.pointer, _$iLogger.pointer) + .check(); + } + + bool operator <(Breadcrumb breadcrumb) { + return compareTo(breadcrumb) < 0; + } + + bool operator <=(Breadcrumb breadcrumb) { + return compareTo(breadcrumb) <= 0; + } + + bool operator >(Breadcrumb breadcrumb) { + return compareTo(breadcrumb) > 0; + } + + bool operator >=(Breadcrumb breadcrumb) { + return compareTo(breadcrumb) >= 0; + } +} + +final class $Breadcrumb$NullableType extends jni$_.JObjType { + @jni$_.internal + const $Breadcrumb$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Breadcrumb;'; + + @jni$_.internal + @core$_.override + Breadcrumb? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : Breadcrumb.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 => ($Breadcrumb$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Breadcrumb$NullableType) && + other is $Breadcrumb$NullableType; + } +} + +final class $Breadcrumb$Type extends jni$_.JObjType { + @jni$_.internal + const $Breadcrumb$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/Breadcrumb;'; + + @jni$_.internal + @core$_.override + Breadcrumb fromReference(jni$_.JReference reference) => + Breadcrumb.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $Breadcrumb$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($Breadcrumb$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($Breadcrumb$Type) && other is $Breadcrumb$Type; + } +} + +/// from: `io.sentry.ScopesAdapter` +class ScopesAdapter extends jni$_.JObject { + @jni$_.internal + @core$_.override + final jni$_.JObjType $type; + + @jni$_.internal + ScopesAdapter.fromReference( + jni$_.JReference reference, + ) : $type = type, + super.fromReference(reference); + + static final _class = jni$_.JClass.forName(r'io/sentry/ScopesAdapter'); + + /// The type which includes information such as the signature of this class. + static const nullableType = $ScopesAdapter$NullableType(); + static const type = $ScopesAdapter$Type(); + static final _id_getInstance = _class.staticMethodId( + r'getInstance', + r'()Lio/sentry/ScopesAdapter;', + ); + + static final _getInstance = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `static public io.sentry.ScopesAdapter getInstance()` + /// The returned object must be released after use, by calling the [release] method. + static ScopesAdapter? getInstance() { + return _getInstance( + _class.reference.pointer, _id_getInstance as jni$_.JMethodIDPtr) + .object(const $ScopesAdapter$NullableType()); + } + + static final _id_isEnabled = _class.instanceMethodId( + r'isEnabled', + r'()Z', + ); + + static final _isEnabled = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public boolean isEnabled()` + bool isEnabled() { + return _isEnabled(reference.pointer, _id_isEnabled as jni$_.JMethodIDPtr) + .boolean; + } + + static final _id_captureEvent = _class.instanceMethodId( + r'captureEvent', + r'(Lio/sentry/SentryEvent;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureEvent = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureEvent( + jni$_.JObject sentryEvent, + jni$_.JObject? hint, + ) { + final _$sentryEvent = sentryEvent.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureEvent( + reference.pointer, + _id_captureEvent as jni$_.JMethodIDPtr, + _$sentryEvent.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureEvent$1 = _class.instanceMethodId( + r'captureEvent', + r'(Lio/sentry/SentryEvent;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureEvent$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureEvent(io.sentry.SentryEvent sentryEvent, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureEvent$1( + jni$_.JObject sentryEvent, + jni$_.JObject? hint, + jni$_.JObject scopeCallback, + ) { + final _$sentryEvent = sentryEvent.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback.reference; + return _captureEvent$1( + reference.pointer, + _id_captureEvent$1 as jni$_.JMethodIDPtr, + _$sentryEvent.pointer, + _$hint.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureMessage = _class.instanceMethodId( + r'captureMessage', + r'(Ljava/lang/String;Lio/sentry/SentryLevel;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureMessage = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureMessage( + jni$_.JString string, + jni$_.JObject sentryLevel, + ) { + final _$string = string.reference; + final _$sentryLevel = sentryLevel.reference; + return _captureMessage( + reference.pointer, + _id_captureMessage as jni$_.JMethodIDPtr, + _$string.pointer, + _$sentryLevel.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureMessage$1 = _class.instanceMethodId( + r'captureMessage', + r'(Ljava/lang/String;Lio/sentry/SentryLevel;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureMessage$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureMessage(java.lang.String string, io.sentry.SentryLevel sentryLevel, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureMessage$1( + jni$_.JString string, + jni$_.JObject sentryLevel, + jni$_.JObject scopeCallback, + ) { + final _$string = string.reference; + final _$sentryLevel = sentryLevel.reference; + final _$scopeCallback = scopeCallback.reference; + return _captureMessage$1( + reference.pointer, + _id_captureMessage$1 as jni$_.JMethodIDPtr, + _$string.pointer, + _$sentryLevel.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureFeedback = _class.instanceMethodId( + r'captureFeedback', + r'(Lio/sentry/protocol/Feedback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureFeedback = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureFeedback( + jni$_.JObject feedback, + ) { + final _$feedback = feedback.reference; + return _captureFeedback(reference.pointer, + _id_captureFeedback as jni$_.JMethodIDPtr, _$feedback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureFeedback$1 = _class.instanceMethodId( + r'captureFeedback', + r'(Lio/sentry/protocol/Feedback;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureFeedback$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureFeedback$1( + jni$_.JObject feedback, + jni$_.JObject? hint, + ) { + final _$feedback = feedback.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureFeedback$1( + reference.pointer, + _id_captureFeedback$1 as jni$_.JMethodIDPtr, + _$feedback.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureFeedback$2 = _class.instanceMethodId( + r'captureFeedback', + r'(Lio/sentry/protocol/Feedback;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureFeedback$2 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureFeedback(io.sentry.protocol.Feedback feedback, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureFeedback$2( + jni$_.JObject feedback, + jni$_.JObject? hint, + jni$_.JObject? scopeCallback, + ) { + final _$feedback = feedback.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback?.reference ?? jni$_.jNullReference; + return _captureFeedback$2( + reference.pointer, + _id_captureFeedback$2 as jni$_.JMethodIDPtr, + _$feedback.pointer, + _$hint.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureEnvelope = _class.instanceMethodId( + r'captureEnvelope', + r'(Lio/sentry/SentryEnvelope;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureEnvelope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureEnvelope(io.sentry.SentryEnvelope sentryEnvelope, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureEnvelope( + jni$_.JObject sentryEnvelope, + jni$_.JObject? hint, + ) { + final _$sentryEnvelope = sentryEnvelope.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureEnvelope( + reference.pointer, + _id_captureEnvelope as jni$_.JMethodIDPtr, + _$sentryEnvelope.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureException = _class.instanceMethodId( + r'captureException', + r'(Ljava/lang/Throwable;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureException = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureException( + jni$_.JObject throwable, + jni$_.JObject? hint, + ) { + final _$throwable = throwable.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureException( + reference.pointer, + _id_captureException as jni$_.JMethodIDPtr, + _$throwable.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureException$1 = _class.instanceMethodId( + r'captureException', + r'(Ljava/lang/Throwable;Lio/sentry/Hint;Lio/sentry/ScopeCallback;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureException$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureException(java.lang.Throwable throwable, io.sentry.Hint hint, io.sentry.ScopeCallback scopeCallback)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureException$1( + jni$_.JObject throwable, + jni$_.JObject? hint, + jni$_.JObject scopeCallback, + ) { + final _$throwable = throwable.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback.reference; + return _captureException$1( + reference.pointer, + _id_captureException$1 as jni$_.JMethodIDPtr, + _$throwable.pointer, + _$hint.pointer, + _$scopeCallback.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureUserFeedback = _class.instanceMethodId( + r'captureUserFeedback', + r'(Lio/sentry/UserFeedback;)V', + ); + + static final _captureUserFeedback = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void captureUserFeedback(io.sentry.UserFeedback userFeedback)` + void captureUserFeedback( + jni$_.JObject userFeedback, + ) { + final _$userFeedback = userFeedback.reference; + _captureUserFeedback( + reference.pointer, + _id_captureUserFeedback as jni$_.JMethodIDPtr, + _$userFeedback.pointer) + .check(); + } + + static final _id_startSession = _class.instanceMethodId( + r'startSession', + r'()V', + ); + + static final _startSession = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void startSession()` + void startSession() { + _startSession(reference.pointer, _id_startSession as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_endSession = _class.instanceMethodId( + r'endSession', + r'()V', + ); + + static final _endSession = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void endSession()` + void endSession() { + _endSession(reference.pointer, _id_endSession as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_close = _class.instanceMethodId( + r'close', + r'(Z)V', + ); + + static final _close = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int32,)>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public void close(boolean z)` + void close( + bool z, + ) { + _close(reference.pointer, _id_close as jni$_.JMethodIDPtr, z ? 1 : 0) + .check(); + } + + static final _id_close$1 = _class.instanceMethodId( + r'close', + r'()V', + ); + + static final _close$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void close()` + void close$1() { + _close$1(reference.pointer, _id_close$1 as jni$_.JMethodIDPtr).check(); + } + + static final _id_addBreadcrumb = _class.instanceMethodId( + r'addBreadcrumb', + r'(Lio/sentry/Breadcrumb;Lio/sentry/Hint;)V', + ); + + static final _addBreadcrumb = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb, io.sentry.Hint hint)` + void addBreadcrumb( + Breadcrumb breadcrumb, + jni$_.JObject? hint, + ) { + final _$breadcrumb = breadcrumb.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + _addBreadcrumb(reference.pointer, _id_addBreadcrumb as jni$_.JMethodIDPtr, + _$breadcrumb.pointer, _$hint.pointer) + .check(); + } + + static final _id_addBreadcrumb$1 = _class.instanceMethodId( + r'addBreadcrumb', + r'(Lio/sentry/Breadcrumb;)V', + ); + + static final _addBreadcrumb$1 = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void addBreadcrumb(io.sentry.Breadcrumb breadcrumb)` + void addBreadcrumb$1( + Breadcrumb breadcrumb, + ) { + final _$breadcrumb = breadcrumb.reference; + _addBreadcrumb$1(reference.pointer, + _id_addBreadcrumb$1 as jni$_.JMethodIDPtr, _$breadcrumb.pointer) + .check(); + } + + static final _id_setLevel = _class.instanceMethodId( + r'setLevel', + r'(Lio/sentry/SentryLevel;)V', + ); + + static final _setLevel = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setLevel(io.sentry.SentryLevel sentryLevel)` + void setLevel( + jni$_.JObject? sentryLevel, + ) { + final _$sentryLevel = sentryLevel?.reference ?? jni$_.jNullReference; + _setLevel(reference.pointer, _id_setLevel as jni$_.JMethodIDPtr, + _$sentryLevel.pointer) + .check(); + } + + static final _id_setTransaction = _class.instanceMethodId( + r'setTransaction', + r'(Ljava/lang/String;)V', + ); + + static final _setTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setTransaction(java.lang.String string)` + void setTransaction( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _setTransaction(reference.pointer, _id_setTransaction as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_setUser = _class.instanceMethodId( + r'setUser', + r'(Lio/sentry/protocol/User;)V', + ); + + static final _setUser = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setUser(io.sentry.protocol.User user)` + void setUser( + jni$_.JObject? user, + ) { + final _$user = user?.reference ?? jni$_.jNullReference; + _setUser(reference.pointer, _id_setUser as jni$_.JMethodIDPtr, + _$user.pointer) + .check(); + } + + static final _id_setFingerprint = _class.instanceMethodId( + r'setFingerprint', + r'(Ljava/util/List;)V', + ); + + static final _setFingerprint = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setFingerprint(java.util.List list)` + void setFingerprint( + jni$_.JList list, + ) { + final _$list = list.reference; + _setFingerprint(reference.pointer, _id_setFingerprint as jni$_.JMethodIDPtr, + _$list.pointer) + .check(); + } + + static final _id_clearBreadcrumbs = _class.instanceMethodId( + r'clearBreadcrumbs', + r'()V', + ); + + static final _clearBreadcrumbs = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void clearBreadcrumbs()` + void clearBreadcrumbs() { + _clearBreadcrumbs( + reference.pointer, _id_clearBreadcrumbs as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_setTag = _class.instanceMethodId( + r'setTag', + r'(Ljava/lang/String;Ljava/lang/String;)V', + ); + + static final _setTag = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void setTag(java.lang.String string, java.lang.String string1)` + void setTag( + jni$_.JString? string, + jni$_.JString? string1, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + _setTag(reference.pointer, _id_setTag as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) + .check(); + } + + static final _id_removeTag = _class.instanceMethodId( + r'removeTag', + r'(Ljava/lang/String;)V', + ); + + static final _removeTag = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void removeTag(java.lang.String string)` + void removeTag( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _removeTag(reference.pointer, _id_removeTag as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_setExtra = _class.instanceMethodId( + r'setExtra', + r'(Ljava/lang/String;Ljava/lang/String;)V', + ); + + static final _setExtra = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void setExtra(java.lang.String string, java.lang.String string1)` + void setExtra( + jni$_.JString? string, + jni$_.JString? string1, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$string1 = string1?.reference ?? jni$_.jNullReference; + _setExtra(reference.pointer, _id_setExtra as jni$_.JMethodIDPtr, + _$string.pointer, _$string1.pointer) + .check(); + } + + static final _id_removeExtra = _class.instanceMethodId( + r'removeExtra', + r'(Ljava/lang/String;)V', + ); + + static final _removeExtra = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void removeExtra(java.lang.String string)` + void removeExtra( + jni$_.JString? string, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + _removeExtra(reference.pointer, _id_removeExtra as jni$_.JMethodIDPtr, + _$string.pointer) + .check(); + } + + static final _id_getLastEventId = _class.instanceMethodId( + r'getLastEventId', + r'()Lio/sentry/protocol/SentryId;', + ); + + static final _getLastEventId = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.protocol.SentryId getLastEventId()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getLastEventId() { + return _getLastEventId( + reference.pointer, _id_getLastEventId as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_pushScope = _class.instanceMethodId( + r'pushScope', + r'()Lio/sentry/ISentryLifecycleToken;', + ); + + static final _pushScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.ISentryLifecycleToken pushScope()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject pushScope() { + return _pushScope(reference.pointer, _id_pushScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_pushIsolationScope = _class.instanceMethodId( + r'pushIsolationScope', + r'()Lio/sentry/ISentryLifecycleToken;', + ); + + static final _pushIsolationScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.ISentryLifecycleToken pushIsolationScope()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject pushIsolationScope() { + return _pushIsolationScope( + reference.pointer, _id_pushIsolationScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_popScope = _class.instanceMethodId( + r'popScope', + r'()V', + ); + + static final _popScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void popScope()` + void popScope() { + _popScope(reference.pointer, _id_popScope as jni$_.JMethodIDPtr).check(); + } + + static final _id_withScope = _class.instanceMethodId( + r'withScope', + r'(Lio/sentry/ScopeCallback;)V', + ); + + static final _withScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void withScope(io.sentry.ScopeCallback scopeCallback)` + void withScope( + jni$_.JObject scopeCallback, + ) { + final _$scopeCallback = scopeCallback.reference; + _withScope(reference.pointer, _id_withScope as jni$_.JMethodIDPtr, + _$scopeCallback.pointer) + .check(); + } + + static final _id_withIsolationScope = _class.instanceMethodId( + r'withIsolationScope', + r'(Lio/sentry/ScopeCallback;)V', + ); + + static final _withIsolationScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void withIsolationScope(io.sentry.ScopeCallback scopeCallback)` + void withIsolationScope( + jni$_.JObject scopeCallback, + ) { + final _$scopeCallback = scopeCallback.reference; + _withIsolationScope( + reference.pointer, + _id_withIsolationScope as jni$_.JMethodIDPtr, + _$scopeCallback.pointer) + .check(); + } + + static final _id_configureScope = _class.instanceMethodId( + r'configureScope', + r'(Lio/sentry/ScopeType;Lio/sentry/ScopeCallback;)V', + ); + + static final _configureScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void configureScope(io.sentry.ScopeType scopeType, io.sentry.ScopeCallback scopeCallback)` + void configureScope( + jni$_.JObject? scopeType, + jni$_.JObject scopeCallback, + ) { + final _$scopeType = scopeType?.reference ?? jni$_.jNullReference; + final _$scopeCallback = scopeCallback.reference; + _configureScope(reference.pointer, _id_configureScope as jni$_.JMethodIDPtr, + _$scopeType.pointer, _$scopeCallback.pointer) + .check(); + } + + static final _id_bindClient = _class.instanceMethodId( + r'bindClient', + r'(Lio/sentry/ISentryClient;)V', + ); + + static final _bindClient = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void bindClient(io.sentry.ISentryClient iSentryClient)` + void bindClient( + jni$_.JObject iSentryClient, + ) { + final _$iSentryClient = iSentryClient.reference; + _bindClient(reference.pointer, _id_bindClient as jni$_.JMethodIDPtr, + _$iSentryClient.pointer) + .check(); + } + + static final _id_isHealthy = _class.instanceMethodId( + r'isHealthy', + r'()Z', + ); + + static final _isHealthy = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public boolean isHealthy()` + bool isHealthy() { + return _isHealthy(reference.pointer, _id_isHealthy as jni$_.JMethodIDPtr) + .boolean; + } + + static final _id_flush = _class.instanceMethodId( + r'flush', + r'(J)V', + ); + + static final _flush = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Int64,)>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, jni$_.JMethodIDPtr, int)>(); + + /// from: `public void flush(long j)` + void flush( + int j, + ) { + _flush(reference.pointer, _id_flush as jni$_.JMethodIDPtr, j).check(); + } + + static final _id_clone = _class.instanceMethodId( + r'clone', + r'()Lio/sentry/IHub;', + ); + + static final _clone = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.IHub clone()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject clone() { + return _clone(reference.pointer, _id_clone as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_forkedScopes = _class.instanceMethodId( + r'forkedScopes', + r'(Ljava/lang/String;)Lio/sentry/IScopes;', + ); + + static final _forkedScopes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public io.sentry.IScopes forkedScopes(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject forkedScopes( + jni$_.JString string, + ) { + final _$string = string.reference; + return _forkedScopes(reference.pointer, + _id_forkedScopes as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_forkedCurrentScope = _class.instanceMethodId( + r'forkedCurrentScope', + r'(Ljava/lang/String;)Lio/sentry/IScopes;', + ); + + static final _forkedCurrentScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public io.sentry.IScopes forkedCurrentScope(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject forkedCurrentScope( + jni$_.JString string, + ) { + final _$string = string.reference; + return _forkedCurrentScope(reference.pointer, + _id_forkedCurrentScope as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_forkedRootScopes = _class.instanceMethodId( + r'forkedRootScopes', + r'(Ljava/lang/String;)Lio/sentry/IScopes;', + ); + + static final _forkedRootScopes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public io.sentry.IScopes forkedRootScopes(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject forkedRootScopes( + jni$_.JString string, + ) { + final _$string = string.reference; + return _forkedRootScopes(reference.pointer, + _id_forkedRootScopes as jni$_.JMethodIDPtr, _$string.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_makeCurrent = _class.instanceMethodId( + r'makeCurrent', + r'()Lio/sentry/ISentryLifecycleToken;', + ); + + static final _makeCurrent = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.ISentryLifecycleToken makeCurrent()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject makeCurrent() { + return _makeCurrent( + reference.pointer, _id_makeCurrent as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_getScope = _class.instanceMethodId( + r'getScope', + r'()Lio/sentry/IScope;', + ); + + static final _getScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.IScope getScope()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getScope() { + return _getScope(reference.pointer, _id_getScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_getIsolationScope = _class.instanceMethodId( + r'getIsolationScope', + r'()Lio/sentry/IScope;', + ); + + static final _getIsolationScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.IScope getIsolationScope()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getIsolationScope() { + return _getIsolationScope( + reference.pointer, _id_getIsolationScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_getGlobalScope = _class.instanceMethodId( + r'getGlobalScope', + r'()Lio/sentry/IScope;', + ); + + static final _getGlobalScope = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.IScope getGlobalScope()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getGlobalScope() { + return _getGlobalScope( + reference.pointer, _id_getGlobalScope as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_getParentScopes = _class.instanceMethodId( + r'getParentScopes', + r'()Lio/sentry/IScopes;', + ); + + static final _getParentScopes = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.IScopes getParentScopes()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getParentScopes() { + return _getParentScopes( + reference.pointer, _id_getParentScopes as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_isAncestorOf = _class.instanceMethodId( + r'isAncestorOf', + r'(Lio/sentry/IScopes;)Z', + ); + + static final _isAncestorOf = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public boolean isAncestorOf(io.sentry.IScopes iScopes)` + bool isAncestorOf( + jni$_.JObject? iScopes, + ) { + final _$iScopes = iScopes?.reference ?? jni$_.jNullReference; + return _isAncestorOf(reference.pointer, + _id_isAncestorOf as jni$_.JMethodIDPtr, _$iScopes.pointer) + .boolean; + } + + static final _id_captureTransaction = _class.instanceMethodId( + r'captureTransaction', + r'(Lio/sentry/protocol/SentryTransaction;Lio/sentry/TraceContext;Lio/sentry/Hint;Lio/sentry/ProfilingTraceData;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureTransaction(io.sentry.protocol.SentryTransaction sentryTransaction, io.sentry.TraceContext traceContext, io.sentry.Hint hint, io.sentry.ProfilingTraceData profilingTraceData)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureTransaction( + jni$_.JObject sentryTransaction, + jni$_.JObject? traceContext, + jni$_.JObject? hint, + jni$_.JObject? profilingTraceData, + ) { + final _$sentryTransaction = sentryTransaction.reference; + final _$traceContext = traceContext?.reference ?? jni$_.jNullReference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + final _$profilingTraceData = + profilingTraceData?.reference ?? jni$_.jNullReference; + return _captureTransaction( + reference.pointer, + _id_captureTransaction as jni$_.JMethodIDPtr, + _$sentryTransaction.pointer, + _$traceContext.pointer, + _$hint.pointer, + _$profilingTraceData.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_captureProfileChunk = _class.instanceMethodId( + r'captureProfileChunk', + r'(Lio/sentry/ProfileChunk;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureProfileChunk = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureProfileChunk(io.sentry.ProfileChunk profileChunk)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureProfileChunk( + jni$_.JObject profileChunk, + ) { + final _$profileChunk = profileChunk.reference; + return _captureProfileChunk( + reference.pointer, + _id_captureProfileChunk as jni$_.JMethodIDPtr, + _$profileChunk.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_startTransaction = _class.instanceMethodId( + r'startTransaction', + r'(Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;', + ); + + static final _startTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.ITransaction startTransaction(io.sentry.TransactionContext transactionContext, io.sentry.TransactionOptions transactionOptions)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject startTransaction( + jni$_.JObject transactionContext, + jni$_.JObject transactionOptions, + ) { + final _$transactionContext = transactionContext.reference; + final _$transactionOptions = transactionOptions.reference; + return _startTransaction( + reference.pointer, + _id_startTransaction as jni$_.JMethodIDPtr, + _$transactionContext.pointer, + _$transactionOptions.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_startProfiler = _class.instanceMethodId( + r'startProfiler', + r'()V', + ); + + static final _startProfiler = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void startProfiler()` + void startProfiler() { + _startProfiler(reference.pointer, _id_startProfiler as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_stopProfiler = _class.instanceMethodId( + r'stopProfiler', + r'()V', + ); + + static final _stopProfiler = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void stopProfiler()` + void stopProfiler() { + _stopProfiler(reference.pointer, _id_stopProfiler as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_setSpanContext = _class.instanceMethodId( + r'setSpanContext', + r'(Ljava/lang/Throwable;Lio/sentry/ISpan;Ljava/lang/String;)V', + ); + + static final _setSpanContext = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public void setSpanContext(java.lang.Throwable throwable, io.sentry.ISpan iSpan, java.lang.String string)` + void setSpanContext( + jni$_.JObject throwable, + jni$_.JObject iSpan, + jni$_.JString string, + ) { + final _$throwable = throwable.reference; + final _$iSpan = iSpan.reference; + final _$string = string.reference; + _setSpanContext(reference.pointer, _id_setSpanContext as jni$_.JMethodIDPtr, + _$throwable.pointer, _$iSpan.pointer, _$string.pointer) + .check(); + } + + static final _id_getSpan = _class.instanceMethodId( + r'getSpan', + r'()Lio/sentry/ISpan;', + ); + + static final _getSpan = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.ISpan getSpan()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getSpan() { + return _getSpan(reference.pointer, _id_getSpan as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_setActiveSpan = _class.instanceMethodId( + r'setActiveSpan', + r'(Lio/sentry/ISpan;)V', + ); + + static final _setActiveSpan = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public void setActiveSpan(io.sentry.ISpan iSpan)` + void setActiveSpan( + jni$_.JObject? iSpan, + ) { + final _$iSpan = iSpan?.reference ?? jni$_.jNullReference; + _setActiveSpan(reference.pointer, _id_setActiveSpan as jni$_.JMethodIDPtr, + _$iSpan.pointer) + .check(); + } + + static final _id_getTransaction = _class.instanceMethodId( + r'getTransaction', + r'()Lio/sentry/ITransaction;', + ); + + static final _getTransaction = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.ITransaction getTransaction()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getTransaction() { + return _getTransaction( + reference.pointer, _id_getTransaction as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_getOptions = _class.instanceMethodId( + r'getOptions', + r'()Lio/sentry/SentryOptions;', + ); + + static final _getOptions = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.SentryOptions getOptions()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject getOptions() { + return _getOptions(reference.pointer, _id_getOptions as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } + + static final _id_isCrashedLastRun = _class.instanceMethodId( + r'isCrashedLastRun', + r'()Ljava/lang/Boolean;', + ); + + static final _isCrashedLastRun = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public java.lang.Boolean isCrashedLastRun()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JBoolean? isCrashedLastRun() { + return _isCrashedLastRun( + reference.pointer, _id_isCrashedLastRun as jni$_.JMethodIDPtr) + .object(const jni$_.JBooleanNullableType()); + } + + static final _id_reportFullyDisplayed = _class.instanceMethodId( + r'reportFullyDisplayed', + r'()V', + ); + + static final _reportFullyDisplayed = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni$_.JThrowablePtr Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public void reportFullyDisplayed()` + void reportFullyDisplayed() { + _reportFullyDisplayed( + reference.pointer, _id_reportFullyDisplayed as jni$_.JMethodIDPtr) + .check(); + } + + static final _id_continueTrace = _class.instanceMethodId( + r'continueTrace', + r'(Ljava/lang/String;Ljava/util/List;)Lio/sentry/TransactionContext;', + ); + + static final _continueTrace = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.TransactionContext continueTrace(java.lang.String string, java.util.List list)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? continueTrace( + jni$_.JString? string, + jni$_.JList? list, + ) { + final _$string = string?.reference ?? jni$_.jNullReference; + final _$list = list?.reference ?? jni$_.jNullReference; + return _continueTrace( + reference.pointer, + _id_continueTrace as jni$_.JMethodIDPtr, + _$string.pointer, + _$list.pointer) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_getTraceparent = _class.instanceMethodId( + r'getTraceparent', + r'()Lio/sentry/SentryTraceHeader;', + ); + + static final _getTraceparent = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.SentryTraceHeader getTraceparent()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getTraceparent() { + return _getTraceparent( + reference.pointer, _id_getTraceparent as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_getBaggage = _class.instanceMethodId( + r'getBaggage', + r'()Lio/sentry/BaggageHeader;', + ); + + static final _getBaggage = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.BaggageHeader getBaggage()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getBaggage() { + return _getBaggage(reference.pointer, _id_getBaggage as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_captureCheckIn = _class.instanceMethodId( + r'captureCheckIn', + r'(Lio/sentry/CheckIn;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureCheckIn = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function(jni$_.Pointer, + jni$_.JMethodIDPtr, jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureCheckIn(io.sentry.CheckIn checkIn)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureCheckIn( + jni$_.JObject checkIn, + ) { + final _$checkIn = checkIn.reference; + return _captureCheckIn(reference.pointer, + _id_captureCheckIn as jni$_.JMethodIDPtr, _$checkIn.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_getRateLimiter = _class.instanceMethodId( + r'getRateLimiter', + r'()Lio/sentry/transport/RateLimiter;', + ); + + static final _getRateLimiter = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.transport.RateLimiter getRateLimiter()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject? getRateLimiter() { + return _getRateLimiter( + reference.pointer, _id_getRateLimiter as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectNullableType()); + } + + static final _id_captureReplay = _class.instanceMethodId( + r'captureReplay', + r'(Lio/sentry/SentryReplayEvent;Lio/sentry/Hint;)Lio/sentry/protocol/SentryId;', + ); + + static final _captureReplay = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs< + ( + jni$_.Pointer, + jni$_.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + jni$_.Pointer)>(); + + /// from: `public io.sentry.protocol.SentryId captureReplay(io.sentry.SentryReplayEvent sentryReplayEvent, io.sentry.Hint hint)` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject captureReplay( + jni$_.JObject sentryReplayEvent, + jni$_.JObject? hint, + ) { + final _$sentryReplayEvent = sentryReplayEvent.reference; + final _$hint = hint?.reference ?? jni$_.jNullReference; + return _captureReplay( + reference.pointer, + _id_captureReplay as jni$_.JMethodIDPtr, + _$sentryReplayEvent.pointer, + _$hint.pointer) + .object(const jni$_.JObjectType()); + } + + static final _id_logger = _class.instanceMethodId( + r'logger', + r'()Lio/sentry/logger/ILoggerApi;', + ); + + static final _logger = jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + )>(); + + /// from: `public io.sentry.logger.ILoggerApi logger()` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JObject logger() { + return _logger(reference.pointer, _id_logger as jni$_.JMethodIDPtr) + .object(const jni$_.JObjectType()); + } +} + +final class $ScopesAdapter$NullableType extends jni$_.JObjType { + @jni$_.internal + const $ScopesAdapter$NullableType(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/ScopesAdapter;'; + + @jni$_.internal + @core$_.override + ScopesAdapter? fromReference(jni$_.JReference reference) => reference.isNull + ? null + : ScopesAdapter.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 => ($ScopesAdapter$NullableType).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($ScopesAdapter$NullableType) && + other is $ScopesAdapter$NullableType; + } +} + +final class $ScopesAdapter$Type extends jni$_.JObjType { + @jni$_.internal + const $ScopesAdapter$Type(); + + @jni$_.internal + @core$_.override + String get signature => r'Lio/sentry/ScopesAdapter;'; + + @jni$_.internal + @core$_.override + ScopesAdapter fromReference(jni$_.JReference reference) => + ScopesAdapter.fromReference( + reference, + ); + @jni$_.internal + @core$_.override + jni$_.JObjType get superType => const jni$_.JObjectNullableType(); + + @jni$_.internal + @core$_.override + jni$_.JObjType get nullableType => + const $ScopesAdapter$NullableType(); + + @jni$_.internal + @core$_.override + final superCount = 1; + + @core$_.override + int get hashCode => ($ScopesAdapter$Type).hashCode; + + @core$_.override + bool operator ==(Object other) { + return other.runtimeType == ($ScopesAdapter$Type) && + other is $ScopesAdapter$Type; + } +} + /// from: `android.graphics.Bitmap$CompressFormat` class Bitmap$CompressFormat extends jni$_.JObject { @jni$_.internal diff --git a/packages/flutter/lib/src/native/java/sentry_native_java.dart b/packages/flutter/lib/src/native/java/sentry_native_java.dart index 83c3f1a098..77305db9b9 100644 --- a/packages/flutter/lib/src/native/java/sentry_native_java.dart +++ b/packages/flutter/lib/src/native/java/sentry_native_java.dart @@ -242,4 +242,59 @@ class SentryNativeJava extends SentryNativeChannel { await _envelopeSender?.close(); return super.close(); } + + @override + void addBreadcrumb(Breadcrumb breadcrumb) => + tryCatchSync('addBreadcrumb', () { + using((arena) { + final nativeOptions = native.ScopesAdapter.getInstance()?.getOptions() + ?..releasedBy(arena); + if (nativeOptions == null) return; + final jMap = _dartToJMap(breadcrumb.toJson(), arena); + final nativeBreadcrumb = + native.Breadcrumb.fromMap(jMap, nativeOptions) + ?..releasedBy(arena); + if (nativeBreadcrumb == null) return; + native.Sentry.addBreadcrumb$1(nativeBreadcrumb); + }); + }); + + @override + void clearBreadcrumbs() => tryCatchSync('clearBreadcrumbs', () { + native.Sentry.clearBreadcrumbs(); + }); +} + +JObject? _dartToJObject(Object? value, Arena arena) => switch (value) { + null => null, + String s => s.toJString()..releasedBy(arena), + bool b => b.toJBoolean()..releasedBy(arena), + int i => i.toJLong()..releasedBy(arena), + double d => d.toJDouble()..releasedBy(arena), + List l => _dartToJList(l, arena), + Map m => _dartToJMap(m, arena), + _ => null + }; + +JList _dartToJList(List values, Arena arena) { + final jlist = JList.array(JObject.nullableType)..releasedBy(arena); + + for (final value in values) { + final jObj = _dartToJObject(value, arena); + jlist.add(jObj); + } + + return jlist; +} + +JMap _dartToJMap(Map json, Arena arena) { + final jmap = JMap.hash(JString.type, JObject.nullableType)..releasedBy(arena); + + for (final entry in json.entries) { + final key = entry.key.toJString()..releasedBy(arena); + final value = _dartToJObject(entry.value, arena); + jmap[key] = value; + } + + return jmap; } diff --git a/packages/flutter/lib/src/native/method_channel_helper.dart b/packages/flutter/lib/src/native/method_channel_helper.dart deleted file mode 100644 index bd3c8864b8..0000000000 --- a/packages/flutter/lib/src/native/method_channel_helper.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:meta/meta.dart'; - -/// Makes sure no invalid data is sent over method channels. -@internal -class MethodChannelHelper { - static dynamic normalize(dynamic data) { - if (data == null) { - return null; - } - if (_isPrimitive(data)) { - return data; - } else if (data is List) { - return _normalizeList(data); - } else if (data is Map) { - return normalizeMap(data); - } else { - return data.toString(); - } - } - - static Map? normalizeMap(Map? data) { - if (data == null) { - return null; - } - return data.map((key, value) => MapEntry(key, normalize(value))); - } - - static List? _normalizeList(List? data) { - if (data == null) { - return null; - } - return data.map((e) => normalize(e)).toList(); - } - - static bool _isPrimitive(dynamic value) { - return value == null || value is String || value is num || value is bool; - } -} diff --git a/packages/flutter/lib/src/native/native_scope_observer.dart b/packages/flutter/lib/src/native/native_scope_observer.dart index 8ba1a18947..468442e5fe 100644 --- a/packages/flutter/lib/src/native/native_scope_observer.dart +++ b/packages/flutter/lib/src/native/native_scope_observer.dart @@ -39,12 +39,12 @@ class NativeScopeObserver implements ScopeObserver { } @override - Future addBreadcrumb(Breadcrumb breadcrumb) async { + FutureOr addBreadcrumb(Breadcrumb breadcrumb) async { await _native.addBreadcrumb(breadcrumb); } @override - Future clearBreadcrumbs() async { + FutureOr clearBreadcrumbs() async { await _native.clearBreadcrumbs(); } diff --git a/packages/flutter/lib/src/native/sentry_native_channel.dart b/packages/flutter/lib/src/native/sentry_native_channel.dart index fd6c05c1be..84c530701e 100644 --- a/packages/flutter/lib/src/native/sentry_native_channel.dart +++ b/packages/flutter/lib/src/native/sentry_native_channel.dart @@ -8,11 +8,11 @@ import 'package:meta/meta.dart'; import '../../sentry_flutter.dart'; import '../replay/replay_config.dart'; -import 'method_channel_helper.dart'; import 'native_app_start.dart'; import 'sentry_native_binding.dart'; import 'sentry_native_invoker.dart'; import 'sentry_safe_method_channel.dart'; +import 'utils/data_normalizer.dart'; /// Provide typed methods to access native layer via MethodChannel. @internal @@ -134,7 +134,7 @@ class SentryNativeChannel username: user.username, email: user.email, ipAddress: user.ipAddress, - data: MethodChannelHelper.normalizeMap(user.data), + data: normalizeMap(user.data), // ignore: deprecated_member_use extras: user.extras, geo: user.geo, @@ -150,30 +150,20 @@ class SentryNativeChannel } @override - Future addBreadcrumb(Breadcrumb breadcrumb) async { - final normalizedBreadcrumb = Breadcrumb( - message: breadcrumb.message, - category: breadcrumb.category, - data: MethodChannelHelper.normalizeMap(breadcrumb.data), - level: breadcrumb.level, - type: breadcrumb.type, - timestamp: breadcrumb.timestamp, - // ignore: invalid_use_of_internal_member - unknown: breadcrumb.unknown, - ); - await channel.invokeMethod( - 'addBreadcrumb', - {'breadcrumb': normalizedBreadcrumb.toJson()}, - ); + FutureOr addBreadcrumb(Breadcrumb breadcrumb) async { + assert(false, "addBreadcrumb should not be used through method channels."); } @override - Future clearBreadcrumbs() => channel.invokeMethod('clearBreadcrumbs'); + FutureOr clearBreadcrumbs() async { + assert( + false, "clearBreadcrumbs should not be used through method channels."); + } @override Future setContexts(String key, dynamic value) => channel.invokeMethod( 'setContexts', - {'key': key, 'value': MethodChannelHelper.normalize(value)}, + {'key': key, 'value': normalize(value)}, ); @override @@ -183,7 +173,7 @@ class SentryNativeChannel @override Future setExtra(String key, dynamic value) => channel.invokeMethod( 'setExtra', - {'key': key, 'value': MethodChannelHelper.normalize(value)}, + {'key': key, 'value': normalize(value)}, ); @override diff --git a/packages/flutter/lib/src/native/utils/data_normalizer.dart b/packages/flutter/lib/src/native/utils/data_normalizer.dart new file mode 100644 index 0000000000..8d0535ae30 --- /dev/null +++ b/packages/flutter/lib/src/native/utils/data_normalizer.dart @@ -0,0 +1,27 @@ +import 'package:meta/meta.dart'; + +/// Normalizes data for serialization across native boundaries. +/// Converts non-primitive types to strings for safe serialization. +@internal +dynamic normalize(dynamic data) { + if (data == null) return null; + if (_isPrimitive(data)) return data; + if (data is List) return _normalizeList(data); + if (data is Map) return normalizeMap(data); + return data.toString(); +} + +@internal +Map? normalizeMap(Map? data) { + if (data == null) return null; + return data.map((key, value) => MapEntry(key, normalize(value))); +} + +List? _normalizeList(List? data) { + if (data == null) return null; + return data.map((e) => normalize(e)).toList(); +} + +bool _isPrimitive(dynamic value) { + return value == null || value is String || value is num || value is bool; +} diff --git a/packages/flutter/test/sentry_native_channel_test.dart b/packages/flutter/test/sentry_native_channel_test.dart index 7288d00971..3cd2d925f6 100644 --- a/packages/flutter/test/sentry_native_channel_test.dart +++ b/packages/flutter/test/sentry_native_channel_test.dart @@ -10,8 +10,8 @@ import 'package:mockito/mockito.dart'; import 'package:sentry/src/platform/mock_platform.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:sentry_flutter/src/native/factory.dart'; -import 'package:sentry_flutter/src/native/method_channel_helper.dart'; import 'package:sentry_flutter/src/native/sentry_native_binding.dart'; +import 'package:sentry_flutter/src/native/utils/data_normalizer.dart'; import 'package:sentry_flutter/src/replay/replay_config.dart'; import 'mocks.dart'; @@ -59,7 +59,7 @@ void main() { username: user.username, email: user.email, ipAddress: user.ipAddress, - data: MethodChannelHelper.normalizeMap(user.data), + data: normalizeMap(user.data), // ignore: deprecated_member_use extras: user.extras, geo: user.geo, @@ -77,41 +77,36 @@ void main() { }); test('addBreadcrumb', () async { + final matcher = _nativeUnavailableMatcher( + mockPlatform, + includeLookupSymbol: true, + includeFailedToLoadClassException: true, + ); + final breadcrumb = Breadcrumb( data: {'object': Object()}, ); - final normalizedBreadcrumb = Breadcrumb( - message: breadcrumb.message, - category: breadcrumb.category, - data: MethodChannelHelper.normalizeMap(breadcrumb.data), - level: breadcrumb.level, - type: breadcrumb.type, - timestamp: breadcrumb.timestamp, - // ignore: invalid_use_of_internal_member - unknown: breadcrumb.unknown, - ); - when(channel.invokeMethod( - 'addBreadcrumb', {'breadcrumb': normalizedBreadcrumb.toJson()})) - .thenAnswer((_) => Future.value()); - await sut.addBreadcrumb(breadcrumb); + expect(() => sut.addBreadcrumb(breadcrumb), matcher); - verify(channel.invokeMethod( - 'addBreadcrumb', {'breadcrumb': normalizedBreadcrumb.toJson()})); + verifyZeroInteractions(channel); }); test('clearBreadcrumbs', () async { - when(channel.invokeMethod('clearBreadcrumbs')) - .thenAnswer((_) => Future.value()); + final matcher = _nativeUnavailableMatcher( + mockPlatform, + includeLookupSymbol: true, + includeFailedToLoadClassException: true, + ); - await sut.clearBreadcrumbs(); + expect(() => sut.clearBreadcrumbs(), matcher); - verify(channel.invokeMethod('clearBreadcrumbs')); + verifyZeroInteractions(channel); }); test('setContexts', () async { final value = {'object': Object()}; - final normalizedValue = MethodChannelHelper.normalize(value); + final normalizedValue = normalize(value); when(channel.invokeMethod('setContexts', { 'key': 'fixture-key', 'value': normalizedValue @@ -134,7 +129,7 @@ void main() { test('setExtra', () async { final value = {'object': Object()}; - final normalizedValue = MethodChannelHelper.normalize(value); + final normalizedValue = normalize(value); when(channel.invokeMethod( 'setExtra', {'key': 'fixture-key', 'value': normalizedValue})) .thenAnswer((_) => Future.value()); diff --git a/packages/flutter/test/method_channel_helper_test.dart b/packages/flutter/test/utils/data_normalizer_test.dart similarity index 76% rename from packages/flutter/test/method_channel_helper_test.dart rename to packages/flutter/test/utils/data_normalizer_test.dart index 12729e7313..e1cc2fc1fd 100644 --- a/packages/flutter/test/method_channel_helper_test.dart +++ b/packages/flutter/test/utils/data_normalizer_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:sentry_flutter/src/native/method_channel_helper.dart'; import 'package:collection/collection.dart'; +import 'package:sentry_flutter/src/native/utils/data_normalizer.dart'; void main() { group('normalize', () { @@ -13,21 +13,21 @@ void main() { 'string': 'Foo', }; - var actual = MethodChannelHelper.normalizeMap(expected); + var actual = normalizeMap(expected); expect( DeepCollectionEquality().equals(actual, expected), true, ); - expect(MethodChannelHelper.normalize(null), null); - expect(MethodChannelHelper.normalize(1), 1); - expect(MethodChannelHelper.normalize(1.1), 1.1); - expect(MethodChannelHelper.normalize(true), true); - expect(MethodChannelHelper.normalize('Foo'), 'Foo'); + expect(normalize(null), null); + expect(normalize(1), 1); + expect(normalize(1.1), 1.1); + expect(normalize(true), true); + expect(normalize('Foo'), 'Foo'); }); test('object', () { - expect(MethodChannelHelper.normalize(_CustomObject()), 'CustomObject()'); + expect(normalize(_CustomObject()), 'CustomObject()'); }); test('object in list', () { @@ -38,7 +38,7 @@ void main() { 'object': ['CustomObject()'] }; - var actual = MethodChannelHelper.normalize(input); + var actual = normalize(input); expect( DeepCollectionEquality().equals(actual, expected), true, @@ -53,7 +53,7 @@ void main() { 'object': {'object': 'CustomObject()'} }; - var actual = MethodChannelHelper.normalize(input); + var actual = normalize(input); expect( DeepCollectionEquality().equals(actual, expected), true, @@ -71,7 +71,7 @@ void main() { 'string': 'Foo', }; - var actual = MethodChannelHelper.normalizeMap(expected); + var actual = normalizeMap(expected); expect( DeepCollectionEquality().equals(actual, expected), true, @@ -83,7 +83,7 @@ void main() { 'list': [null, 1, 1.1, true, 'Foo'], }; - var actual = MethodChannelHelper.normalizeMap(expected); + var actual = normalizeMap(expected); expect( DeepCollectionEquality().equals(actual, expected), true, @@ -101,7 +101,7 @@ void main() { }, }; - var actual = MethodChannelHelper.normalizeMap(expected); + var actual = normalizeMap(expected); expect( DeepCollectionEquality().equals(actual, expected), true, @@ -112,7 +112,7 @@ void main() { var input = {'object': _CustomObject()}; var expected = {'object': 'CustomObject()'}; - var actual = MethodChannelHelper.normalizeMap(input); + var actual = normalizeMap(input); expect( DeepCollectionEquality().equals(actual, expected), true, @@ -127,7 +127,7 @@ void main() { 'object': ['CustomObject()'] }; - var actual = MethodChannelHelper.normalizeMap(input); + var actual = normalizeMap(input); expect( DeepCollectionEquality().equals(actual, expected), true, @@ -142,7 +142,7 @@ void main() { 'object': {'object': 'CustomObject()'} }; - var actual = MethodChannelHelper.normalizeMap(input); + var actual = normalizeMap(input); expect( DeepCollectionEquality().equals(actual, expected), true,